Hello set,

 

Thank you very much! I will test it this week.

 

Best regards.

 

Olaf

 


WITH TMP(FieldName, FieldPos) AS
(SELECT RDB$FIELD_NAME, RDB$FIELD_POSITION+1
FROM RDB$RELATION_FIELDS
WHERE RDB$RELATION_NAME = :MyTableName
ORDER BY RDB$FIELD_POSITION)

SELECT 'SELECT ' || LIST(FieldName) || ' FROM ' || cast(:MyTableName as
Char(31)) || ' WHERE ... '
FROM TMP
WHERE FieldPos in (2, 3) /*If you want field number 2 and 3*/

The result will be the SQL you want.

HTH,
Set





[Non-text portions of this message have been removed]

Reply via email to