PDA

View Full Version : Sybase SQL Debugging


MikeVic
12-13-2007, 03:45 PM
So, I've written some longish SQL script for sybase... and it's giving me a bunch of Incorrect syntax near the keyword 'end'. and Incorrect syntax near the keyword 'else'.

Of course it doesn't tell me where, but I have at least a dozen of these. I'm looking line-by-line and see nothing wrong. Does anyone know if there's a debugger for sybase SQL? :) So I can go line-by-line and see where it fails and maybe why?

I'm doing a lot of if..else in this script.

Fidatelo
12-13-2007, 04:12 PM
Best way to debug is to start commenting lines out. Get it down to the basic pieces, make sure it runs, then start adding more in...

MikeVic
12-13-2007, 04:15 PM
Yeah I could... I was hoping I didn't have to resort to that with this script. :) Thanks.

cartman
12-13-2007, 04:40 PM
What I usually did for Sybase debugging was to set up a similar environment in Microsoft SQL Server. The query should be 100% portable, and you get more info from the MS query analyzer than out of the Sybase one. If you don't have a MSSQL environment handy, the Desktop version is a free download.