Hi all,
I need to retrive records where a particular id is in a field. This field has more than one code in each record (seperated by commas) so I used the like operator and then tried both *'s (syntax error) and %'s (invalid character) to make sure i get the code nop matter where it is in the record. Below is my code, this seems straight forwward, am I doing something wrong?
Thanks in Advance
Tara
if( Request( "SLRN_ID" ) <> "" ) then
sql = "SELECT [Drawing Detail File].StNo, [Drawing Detail File].*, [Drawing Type Master File].DwgTypeD " & _
"FROM [Drawing Detail File] INNER JOIN [Drawing Type Master File] ON [Drawing Detail File].DwgType = [Drawing Type Master File].DwgType " & _
"WHERE ((([Drawing Detail File].SLRN_ID) Like '" % & Request( "SLRN_ID" ) & % "' )) AND (([Drawing Detail File].DwgType)='PP' Or ([Drawing Detail File].DwgType)='ES') AND (([Drawing Detail File].Scan)=Yes) "
'response.write sql
I need to retrive records where a particular id is in a field. This field has more than one code in each record (seperated by commas) so I used the like operator and then tried both *'s (syntax error) and %'s (invalid character) to make sure i get the code nop matter where it is in the record. Below is my code, this seems straight forwward, am I doing something wrong?
Thanks in Advance
Tara
if( Request( "SLRN_ID" ) <> "" ) then
sql = "SELECT [Drawing Detail File].StNo, [Drawing Detail File].*, [Drawing Type Master File].DwgTypeD " & _
"FROM [Drawing Detail File] INNER JOIN [Drawing Type Master File] ON [Drawing Detail File].DwgType = [Drawing Type Master File].DwgType " & _
"WHERE ((([Drawing Detail File].SLRN_ID) Like '" % & Request( "SLRN_ID" ) & % "' )) AND (([Drawing Detail File].DwgType)='PP' Or ([Drawing Detail File].DwgType)='ES') AND (([Drawing Detail File].Scan)=Yes) "
'response.write sql