Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rc113943
Starting Member
2 Posts |
Posted - 2007-09-06 : 10:42:16
|
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.NFRCIDFROM 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.OThickWHERE NFRC.Active = 'True'ORDER BY H_ImportItems.Series[/CODE]Where I have a problem is H_ImportItems.Series sometimes has "added" characters at the end or beginning when compared to NFRC.Seriesie: NFRC.Series = 3500 ... which is equivalent to H_ImportItems.Series = 3500PWWhat I think I need is the proper syntax for: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 :) |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-09-06 : 10:46:30
|
H_ImportItems.Series LIKE '%' + NFRC.Series + '%'_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
|
|
|
|