by Ray » Sat, 26 Jul 2003 05:11:26
I have setup an ODBC account of my UniData (Prelude) database. The
ODBC account is /ud/ODBC-LIVE and it point to my production Prelude
database /ud/TSH-DATA. Now, I have correctly installed the ODBC
drivers and I can create views from Visual Schema Generator on NT.
Here is my quandry and I hope someone can help. When I create views
using VSG I want to be able to quickly determine the fields and the
types of the fields so that I can create copies of those tables in SQL
Server. In SQL Server I would issue the following command sp_help
table_name and in Oracle I would issue desc table_name. If I am in
/ud/ODBC-LIVE and I type sql I get the prompt just fine. But I have no
way of quickly determining the fields and types for a particular
table. Is there an equivalent command in UniData SQL? I did see 2
tables SQLTables and SQLColumns and they do in fact contain the tables
and columns of the views that I created. But I am looking for a more
efficient way of doing this. Here is why, using VSG to create the
views is rather time consuming and I figure if I can just query the
list of table (files) in the dictionary (in VSG if you hit list you
can see the list of tables, how do I do this from either the TCL sql
interperter or from ODBC) but I cannot see this list from ODBC? I
would like to automate the process of creating views if this is
possible, there are many tables in the database and converting them
over 1 at a time will take weeks. It would be so much easier to script
this whole process by simply getting a list of all the tables (like in
VSG) then iterating through this list and having VGS create a view
with all fields for each table (file) that is there?