2
Answers

Inserting query based on a parameter from other table

Photo of Jes Sie

Jes Sie

7y
787
1
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)