|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Query Question
What would be the correct syntax to search these two fields, one called "product_id" and the other "width(in)"? I've tried this:
Select product_id, width(in) From table But I get an error message saying "incorrect syntax near the keyword 'IN'? It thinks I'm using the sql syntax "in" but I'm not. That's part of the name of the column.
__________________
Keep it Prodigy, Keep it Real |
|
#2
|
||||
|
||||
|
be more specific...what are you wanting to search the fields for?
|
|
#3
|
||||
|
||||
|
I'm not searching anything specifically. The query like the one I'm trying to work is all I need to run.
|
|
#4
|
||||
|
||||
|
I'm not understanding what you are trying to do with the width(in) part.
If you aren't searching for anything specific, then why not just do this? Code:
Select product_id, width From table |
|
#5
|
||||
|
||||
|
No it's because the "(in)" is part of "width". So the column name is "width(in)". But if I try to run it like that it won't work. You see what I mean?
|
|
#6
|
||||
|
||||
|
Try
Code:
Select product_id, [width(in)] From table |
|
#7
|
||||
|
||||
|
There it is. Exactly what I needed. Thanks Memnoch!
![]() |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Query Question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|