|
|
Question : Extract DDL for a view using the SQL client
|
|
Hi,
I am using Adaptive Server IQ 12.
I need to extract the DDL of a view.
I can't use the 'Interactive SQL Java' tool to do this as it doesn't work on my machine (I assume due to some Java installation issue)
I can use the 'Interactive SQL Classic' tool to run SQL. This tool does work but it only lets me run SQL.
Is there a way I can use the standard SQL tool to extract DDL.
In SQL Server I can select from the sysobjects and syscomments table to extract the DDL. Is there a similar method in Sybase?
|
Answer : Extract DDL for a view using the SQL client
|
|
IQ has used ASA as its internal catalog store since 12.x, so alas, ASE code is not useful here.
It's very annoying that none of the standard Sybase tools have any way to reverse-engineer DDL!
I either make do with PowerDesigner - not free, but there are free evals available from the Sybase site - or through hacking my own SQL to reverse-engineer.
If you haven't already, register at codexchange.sybase.com (free) where there is an IQ project. It contains some SQL to reverse engineer. I haven't tested it against 12.6 so I don't know how good it is. (12.6 does introduce some changes that are relevant.)
My own code isn't quite 100% yet - it doesn't deal with multiple-column primary keys yet, I'm still working on that.
|
|
|
|
|