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 |
rob_j_egan
Starting Member
4 Posts |
Posted - 2002-03-21 : 06:11:33
|
How do i select 2 fields where an other exists/contains information. One table only.cheers rob |
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2002-03-21 : 08:37:09
|
your question is a bit vague...(and examples of your input/output data usually help more)but the following might be what you want.select field1, field2 from table3 where field4 is not nulla "field existing" and a "field containing information" are not exactly the same thimg.if the field doesn't exist, then it definitely CAN'T hold anything.....so your question above could be read as 'does field4 exist' or does field4 contain data (given that it exists)If a query references a field that doesn't exist then it will fail to even execute - unless you look up the internal access/sql tables to see if a field is defined in a table....but technically in this case the query that references the field in this way, is referencing/lloking for it as a value/record in a system table. |
 |
|
|
|
|