0

I need to know how I can get the line number where the error has occurred when a SQL is executed in IBM Data Studio (4.1).

It always prints the SQL error description but does not indicate what line the error has occurred at. This is unhelpful when the SQL is 100's of lines. Is there an option that can be enabled for this feature in Preferences?

NuCradle
  • 665
  • 1
  • 9
  • 31
  • An example is perhaps required. Is this a proc/function or a query? (i.e., does it actually have multiple "lines"? Or are the merely displayed on multiple lines for convenience? Can you show a a 3-5 line example that perhaps queries a catalog view and demonstrates the error? Make it possible for us to examine the situation. – user2338816 Jun 21 '17 at 05:57
  • @user2338816 The crux of the question was not about a particular error. I am asking if Data Studio, like SQL Developer, shows you the exact line where the error has occurred. Does the Data Studio do the same thing? For instance, I have a query with 200+ lines, and when executed, a user gets the following, `THE VALUE OF A STRING ARGUMENT WAS NOT ACCEPTABLE TO THE DECFLOAT FUNCTION. SQLCODE=-420, SQLSTATE=22018, DRIVER=4.16.53`. This is not really helpful when there are many such functions used in the query. – NuCradle Aug 07 '17 at 17:33

1 Answers1

0

There is a Stored Procedure debugger in Data Studio, but if you are asking about getting a "line-number" error from a single, large SQL statement, that is something that would need to be a Db2 "enhancement" rather than something that Data Studio cold solve. Feel free to raise (or vote on) an RFE on this subject https://www.ibm.com/developerworks/rfe/

Paul Vernon
  • 3,818
  • 1
  • 10
  • 23