• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

If and else statements in SQL Query

 
Melvin Reynold
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34229
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Melvin Reynold
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im using this statement in XML. For the database i think its DB2.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic