View Full Version : Server Query Syntax Help


Ashfaque
11-03-2006, 10:12 PM
Hi,

Following is my one of the field of Server table and it s data

WORK_DESC
G/B SHADE
VALVE R/C
R/C
R/C ISU IND
CP FLANGE R/C
R/C
FAB. KICK LINE
COAT R/C LINE
R/C


To get the specific data of this WORK_DESC from table, I used following query which results fine.

SELECT RpoMstId, RPO_No, Start_Date, WORK_DESC
FROM T_RPO_Master
WHERE (WORK_DESC = N'R/C')

Which results:

R/C
R/C
R/C

What would be the syntax if I need to represent the data that has ‘R/C’ prefix or suffix in the data? (anywhere in the data)

With kind regards,
Ashfaque

pdx_man
11-07-2006, 01:00 PM
Prefix:
WHERE (WORK_DESC LIKE ('R/C%')

Suffix:
WHERE (WORK_DESC LIKE ('%R/C')

Anywhere:
WHERE (WORK_DESC LIKE ('%R/C%')

Ashfaque
11-11-2006, 09:47 PM
Thanks pdx_man..

It works now.

Ashfaque