0

Hi! I have this code in my program

sqlstat= "select bookNum from booktitle"
sqlstat2="select bookNum, bookName from booklist where bookNum not in " & sqlstat & "and bookAuthor like '" ListBook.SelectedItem & "'"

but it has "Incorrect syntax near the keyword 'and'" error...
please help me with this...
response is much appreciated... thanks :)

2
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by gerchi152
0

thanks thines01... i did it this way

sqlstat= "select bookNum from booktitle"
sqlstat2="select bookNum, bookName from booklist where bookNum not in (" & sqlstat & ") and bookAuthor like '" & ListBook.SelectedItem & "'"

just missing some characters... thank you :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.