0

I have a long SyBase SQL query that causes a truncation error. If I run it in ISQL, I get the error with the line number, however, the line number is the beginning of the query so it doesn't tell me which field is causing the truncation error. How can I debug this and get more relevent info about the error?

evg02gsa3
  • 533
  • 5
  • 16

1 Answers1

0

I use print command to find place with error. For example:

print '1'
select * from tab
print '2'
insert into tab..
print '3'
update ...
print '4'

You can also use ASE ISQL tool. There is tool for debug, see How to debug in the Debug menu.

Robert
  • 24,191
  • 8
  • 59
  • 72
  • Thank you but wouldn't it tell you on which line the error occured? I'm looking for a way to find on which column the truncation occured or which part of the query causes the truncation. The query as a whole is considered to be on a single line by the error message. – evg02gsa3 Jan 12 '15 at 14:48
  • Well, I fixed the error by checking all columns manually. I can't replicate it anymore. Thanks anyways. – evg02gsa3 Jan 13 '15 at 13:52