How to check if a column is present in a physical table

How to check if a column is present in a physical table

  
Outsystems,

I want to check if a column is present in the table .I have the physical table name with me .
I wrote query like this and there is api named GetResultSet to which the argument is SQL below.
Is it right way of doing it. My constaraint is I only have physical table name with me at runtime.


"SELECT COLUMN_NAME
FROM " + PhysicalTableName 

Hello!

Sorry for not being a direct answer, but why do you need this? Maybe you should look at the this component.

Is the physical table outside you OutSystems platform? Have you tried to use the Integration Studio to connect this table to you platform instead?

If you want to run a query on a physical tablename, you should use the following advanced query:

SELECT column_name FROM os@PhysicalTableName

Where you strip the first two characters from the input parameter PhysicalTableName.

For instance: ossys_entity will be sys_entity, because the ossys, oslog, etc. are reserved words and this way you can bypass these.

Kind regards,

Remco Dekkinga

Guys the question is over a year old. I'm pretty sure the OP doesn't need an answer anymore :).

@Remco: that's a cool solution for querying an ossys table. I think I used a declare + inline parameter, but this is easier.

Infact Kilian, but maybe it can help others.