The DESCRIBE TABLE command appears to return a table, but when I tried
Expand|Select|Wrap|Line Numbers
- SELECT * FROM (DESCRIBE TABLE [TABLENAME])
Can anyone point me to a solution on how to get the datatype of a field (or other table metadata) in a form that I could use in this situation, or another solution that would affect the same result? Anything would be much appreciated.
::UPDATE::
OK, I've figured out a query to get the field names, but now I need to query for each of the items I generated in the join of the two tables. I'll post the code for the subquery below. For background, there are only 2 tables in the schema, so I don't need to explicitly define which tables I want to get the data from since I explicitly define the schema in which only the 2 tables I want to look at exist. Here's the code for the subquery
Expand|Select|Wrap|Line Numbers
- SELECT TABNAME||'.'||COLNAME variable FROM SYSCAT.COLUMNS WHERE TABSCHEMA = 'DBGUESTG' AND (TYPENAME = 'CHARACTER' OR TYPENAME = 'VARCHAR')