Subject | Looking for tables and columns. |
---|---|
Author | William Gonz�les S. |
Post date | 2005-11-13T21:10:24Z |
Hello, I am migrating a SQL Server DB to FB, my
application uses SQL queries to verify if a certain
table exists and if a certain column exists in a
table, the sentences are:
//Does the table exist?
select name from sysobjects where (name =
'TABLE_NAME') and (type = 'U')
//Does the column exist?
select name from syscolumns where name = 'COLUMN_NAME'
//Does the column (COL_NAME) exist in the TABLE
'TBL_NAME'?
select syscolumns.name
from syscolumns, sysobjects
where syscolumns.id = sysobjects.id
and sysobjects.name = 'TBL_NAME' and sysobjects.type
= 'U'
and syscolumns.name = 'COL_NAME'
How can I do this in FB? It is posibble to do it with
SQL queries?
Thanks in advance,
William GS
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
application uses SQL queries to verify if a certain
table exists and if a certain column exists in a
table, the sentences are:
//Does the table exist?
select name from sysobjects where (name =
'TABLE_NAME') and (type = 'U')
//Does the column exist?
select name from syscolumns where name = 'COLUMN_NAME'
//Does the column (COL_NAME) exist in the TABLE
'TBL_NAME'?
select syscolumns.name
from syscolumns, sysobjects
where syscolumns.id = sysobjects.id
and sysobjects.name = 'TBL_NAME' and sysobjects.type
= 'U'
and syscolumns.name = 'COL_NAME'
How can I do this in FB? It is posibble to do it with
SQL queries?
Thanks in advance,
William GS
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com