What's wrong with this syntax? 
Author Message
 What's wrong with this syntax?

I don't get a parse error for the below query (made up some table
structures with those fields) on 7.2devel, what version are you
running?

Quote:

> SELECT id_1 FROM table1 WHERE state_code IN ('AZ','DE')
> UNION
> SELECT id_1 FROM table1 WHERE zip_code IN ('12345','54321');

> Above SQL statement running fine.
> Now I added

> SELECT id_2 FROM table2 WHERE id_1 IN (
> SELECT id_1 FROM table1 WHERE state_code IN ('AZ','DE')
> UNION
> SELECT id_1 FROM table1 WHERE zip_code IN ('12345','54321')
> );

> Now I got parse error at or near "union"
> Please tell me what's wrong with the 2nd SQL statement.
> Thank you!

---------------------------(end of broadcast)---------------------------



Sat, 10 Jan 2004 02:50:02 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. What's wrong with this syntax?

2. What's wrong with my syntax ???

3. Problems using new v7.2 features (or, What's wrong with this syntax?)

4. SQL Syntax Help - Incorrect syntax near '%'.

5. What is wrong with this LOCATE syntax?

6. Sqlj claims sql syntax wrong

7. Whats wrong with BCP syntax ?

8. run-time error 3001, syntax is wrong?

9. Replace function not working - wrong syntax issue?

10. wrong SQL syntax or ...?

11. What is wrong with my simple SQL syntax?


 
Powered by phpBB® Forum Software