Results 1 to 2 of 2

Thread: Query Help - Using LIKE

  1. #1
    Join Date
    Sep 2007
    Posts
    2

    Query Help - Using LIKE

    Need help. Here is my current query:

    Code:
    SELECT  DISTINCT   H_ImportItems.Series, H_ImportItems.Operating, H_ImportItems.Spacer, H_ImportItems.Gas, H_ImportItems.Ilite, H_ImportItems.IThick, 
               H_ImportItems.Clite, H_ImportItems.CThick, H_ImportItems.Olite, H_ImportItems.OThick, H_ImportItems.Grids, NFRC.U, NFRC.SHGC, NFRC.VLT, NFRC.NFRCID
    
    FROM       H_ImportItems INNER JOIN NFRC ON
               
               H_ImportItems.Series = NFRC.Series AND
               NFRC.Grids = H_ImportItems.Grids AND 
               NFRC.Spacer = H_ImportItems.Spacer AND 
               NFRC.Gas = H_ImportItems.Gas AND 
               NFRC.Ilite = H_ImportItems.ILite AND 
               NFRC.IThick = H_ImportItems.IThick AND 
               NFRC.Clite = H_ImportItems.Clite AND 
               NFRC.CThick = H_ImportItems.CThick AND 
               NFRC.Olite = H_ImportItems.OLite AND 
               NFRC.OThick = H_ImportItems.OThick
    
    WHERE      NFRC.Active = 'True'
    
    ORDER BY   H_ImportItems.Series
    Where I have a problem is H_ImportItems.Series sometimes has "added" characters at the end or beginning when compared to NFRC.Series

    ie: NFRC.Series = 3500 ... which is equivalent to H_ImportItems.Series = 3500PW

    What I think I need is the proper syntax for:

    Code:
    H_ImportItems.Series LIKE %NFRC.Series%
    That obviously gives an error, so now I am confused!! Not too experienced with SQL, so maybe I am going about this the wrong way. Please help! Thank you

  2. #2
    Join Date
    Sep 2007
    Posts
    2
    Resolved in another forum, here is solution, FYI

    Code:
    H_ImportItems.Series LIKE '%' + NFRC.Series + '%'

Posting Permissions

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