Select Query

mdmatiullah

New member
Local time
Today, 21:12
Joined
Jun 15, 2011
Messages
6
Hi,
I have dept no separated with comma in a string str1 and a table of deptno Table named as 'dept' and field as deptno .I want to search the string str1 in table dept and get the deptno that does n't exist in table dept .

Thanks
Md.Matiullah
 
Aircode:
Code:
str1 = Replace(str1, ",", ",'")

strSQL = "SELECT * " & _
         "FROM dept " & _
         "WHERE deptno IN ('" & str1 & "');"
strSQL will now contain the SQL statement you can use in your form or report.
 

Users who are viewing this thread

Back
Top Bottom