Does anyone have a query to search all columns in all tables in a Pervasive database for a specific value?
I am struggling to find any info on this.
Seems easy to do in sql server but not with Pervasive.
Does anyone have a query to search all columns in all tables in a Pervasive database for a specific value?
I am struggling to find any info on this.
Seems easy to do in sql server but not with Pervasive.
--returns a list of all tables sorted by table name: Select * from X$File order by xf$name
--returns a list of all columns (in order) and their attributes for a table called "Person": select X$Field.* from X$Field, X$File where xe$File = xf$id and xf$name = 'Person' and xe$DataType < 200 order by xe$offset
You could use some sort of stored procedure to run through them all. This is a SQL server stored proc that you might be able to use as a guide.
http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm
You don't need a stored procedure. You can do it with this query:
Changing to the name of the column you are looking for.
For example, to find a column named "Name", you would use the statement:
and the results are: