Problem with passing value into sql query

I have a problem with the sql statement…
I am passing values from form.

item=request.form(“oitem”)

sql="select * from recipt a,invtrecipt b where a.reciptid=b.reciptid order by recipt_name =‘“& item &”’"
Set rs=con.Execute(sql)

error message:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near ‘=’.

Same sql statement is executing and giving output in sql server…
When it comes to ASP the item value is not accepting…

is anything wrong with my sql query…

yes

what you need to do is construct the SQL statement with actual values, and then test it right in the database (use sqlserver management studio or whatever you have), not via asp

i think you will find the error message informative

hmm…
yes …

Problem with my sql statement…

and the error message is … ?

Are you becoming like Confucius these days, Rudy? :rofl:

I have used Joins …Then it is working fine

table1: recipt

itemid
item
recipeid(PK)

table2:invtrecipt

item1
recipeid(fk)

sql=“select a.itemid,a.item,b.item1 from recipt as a JOIN invtrecipt as b ON
(a.recipid=b.recipid) where item='”& item &“'”