Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2005
    Location
    Nanded, India
    Posts
    397

    Unanswered: Server Query Syntax Help

    Hi,

    Following is my one of the field of Server table and it s data (SQL Server 2000 Desktop Ver.)

    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 field? (anywhere in the data column)

    With kind regards,
    Ashfaque

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    You want "Like" with some wildcards. More info in BOL.
    Paul

  3. #3
    Join Date
    Jan 2005
    Location
    Nanded, India
    Posts
    397
    Probably this would be the fastest respond to the thread in the whole forum.

    Thanks Paul.

    I tried LIKE (Like n'*R/C*') but did not work out.

    Can u please clarify how to use it?

    Regards,
    Ashfaque

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Had you looked in BOL as recommended, you'd have realized you used the wrong wildcard character.
    Paul

  5. #5
    Join Date
    Jan 2005
    Location
    Nanded, India
    Posts
    397
    Sorry,

    As am new bee to Server I did not understand BOL. What do mean by?

  6. #6
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    Quote Originally Posted by Ashfaque
    Sorry,

    As am new bee to Server I did not understand BOL. What do mean by?
    BOL - Books Online
    http://msdn2.microsoft.com/en-us/library/ms179859.aspx
    Last edited by rudra; 11-06-06 at 01:41.
    Success is the ability to go from one failure to another with no loss of enthusiasm.
    - Sir Winston Churchill
    Joydeep

  7. #7
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Books Online, the primary reference tool of any SQL Server user. It should have been included with your SQL Server installation.
    Paul

  8. #8
    Join Date
    Jan 2005
    Location
    Nanded, India
    Posts
    397
    Thanks again..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •