| Author |
If and else statements in SQL Query
|
Melvin Reynold
Greenhorn
Joined: Jun 12, 2009
Posts: 15
|
|
Im getting this error using Aqua Data Studio for below query. Thanks.
>[Error] Script lines: 1-13 -------------------------
ERROR: syntax error at or near "IF"
Line: 1
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26193
|
|
Melvin,
To the best of my knowledge, SQL doesn't have an if statement. Is that a database specific command/stored procedure? What database are you using?
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Melvin Reynold
Greenhorn
Joined: Jun 12, 2009
Posts: 15
|
|
|
Im using this statement in XML. For the database i think its DB2.
|
 |
 |
|
|
subject: If and else statements in SQL Query
|
|
|