Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL2000 Join Syntax
Message
From
07/09/2006 08:39:51
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01151337
Message ID:
01151696
Views:
15
Actually, as Naomi pointed out, ISNULL() for SQL Server is basically the equivalent of NVL(). Switching between queries for VFP and SQL has been messing me up lately! I thought it was bad enough switching between VFP and Delphi (as I used to do). :o)



>I see Sergey and Chad have given you working code. FWIW I suspect the ISNULL() was messing you up. Wouldn't that be NVL() instead? If nothing else, ISNULL() returns a logical value.
>
>
>>Passing the query to SQL2000/SQL2005,
>>
>>Goal:
>>
>>1. I want to pull ALL of the records in table1 where not_in_srv = 1 regardless
>>2. Include matching records in table2 IF any exist (some table1 records will have a matching record in table2 and some will not) the link is hydr_id in both tables
>>
>>SELECT * FROM table1 INNER JOIN table2 ON table2.hydr_id = table1.hydr_id  ;
>>     WHERE (ISNULL(table1.not_in_srv,0) = 1)
>>
>>I keep getting strange results.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform