There seems to be some difference's between versions of SQL Anywhere on how to get a list of columns and data types for a table. This is the SQL I use:
In some cases, it appears that it doesn't pick up all the columns for a table. Is it the join to systypes? What SQL can I use across all versions to extract the information in the above query? Thanks, Brad |
@Brad: Here's a tip: Study the Version 9 catalog tables, and NEVER EVER use any of the SYS. or DBO. view names, either in V9 or earlier, or in V10 and later (where everything changed). The old views like SYSCOLUMNS suck big wampum, lead to confusion and worse... stick to the REAL TABLES. The kicker comes in V10 and later, when all the old tables became views themselves... but these views are designed for backward compatibility and all but one of them work quite well. Bottom line, never use SYSCOLUMNS, but SYSCOLUMN is ok. An expanded rant is available on request :)
Breck, I would love a more expanded rant personally.
@Breck: Me, too:)