kereni
23rd June 2002, 12:05
I want to write Informix SQL script that will create an output file with all BAAN tables for a specified company. For this I’m using the following SQL:
OUTPUT TO "tablelist" WITHOUT HEADINGS
SELECT tabname FROM systables WHERE tabname LIKE '%%%%%%%%%000'

This creates an output file with all tables of company 000. Now I want to use the TRIM function to remove the first ‘t’ and company number so I can use this file with bdbpre.

Any suggestions?

gfasbender
23rd June 2002, 17:49
How about:


SELECT substr(tabname,2,8) FROM systables WHERE tabname LIKE '%000'

kereni
23rd June 2002, 18:13
Thanks for the idea very nice but I the Informix don't find and procedure called substr or substring.