Hello,
I have to check all fields on NULL for several tables in an Informix SE database.
I am doing the following:
Determine the table columns:
select_column.sql:
SELECT colname FROM syscolumns
WHERE tabid = (SELECT tabid FROM) WHERE tabname = "fyar1sta")
dbaccess myDB select_column.sql >> ar1_spalte.txt
select_ar1_NULL.awk:
#! / Bin / awk -f
{printf "SELECT article,% s FROM fyar1sta WHERE% s is null; \ n", $ 1, $ 1}
./select_ar1_NULL.awk ar1_spalte.txt> select_ar1_NULL.sql
The select_ar1_NULL.sql file now contains for each Field from fyar1sta a row with a select query that checks for NULL.
My approach works basically, but I would be interested in how to do this with a stored procedure in Informix SE, where I have no experience with SPL.
Greeting
Ralf
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 483 |
Nodes: | 16 (2 / 14) |
Uptime: | 227:18:59 |
Calls: | 9,608 |
Calls today: | 6 |
Files: | 13,686 |
Messages: | 6,154,932 |