Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

number of field from prop:sql

Status
Not open for further replies.

newtoclarion

Programmer
Jul 20, 2011
66
0
0
SA
Hi
how do I know how many fields will be output when using a Query "select * from ...." using {prop:sql}

thank you
 
IF you use TABLE{PROP:SQL} = 'SELECT * FROM TABLE' you get all fields from TABLE.
WITH NEXT(TABLE) you sync the hole row.
 
My dear I know that I will get all fields from table with * . the question is I want to know how many.
 
In Oracle for example, you can make a select in/before your other Main-Statement.

select count(*)
from ALL_TAB_COLUMNS
where TABLE_NAME = 'TABLE'
 
Also in SQL you will get the number of columns using:
SELECT count(*)
FROM INFORMATION_SCHEMA.COLUMNS
where TABLE_NAME = 'TableName'


but this is not the case, I gave an example as * to make it easier to explain but the query could be:

Select F1,F2 from Table

what I want to know is the number of output ( 2 in this case) although the Table could have 10 fields





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top