Jes Sie

Jes Sie

  • 701
  • 1.2k
  • 264.5k

Inserting query based on a parameter from other table

Jun 21 2018 2:43 AM
I have 2 tables namely:
 
tblRequest with fields id (PK,int), RequestedBooks (int), reason (nvarchar(500))
& tblResponse with fields id (int), BookDescription (nvarchar(50)), requestID(FK, int)
 
Now, if the requested books are only 3, how to make an insert statement for tblResponse that should only dispatch 3 books. Above that, It will deny the insert. 
 
Thanks again, everyone. 
 

Answers (2)