Named Query-Is it possible to only have one column show in a named query?

Is it possible to only have one column show in a named query? I just want certain columns to show, not every column in my query database.

Thank you!

If your named query is using something like

select * from table

then every single column will be selected from the database. You will want to explicitly select the columns you want

select foo, bar from table

Unless, you want to have certain columns returned from the query, but have some hidden in a table binding which is where you would use columns prop to make those certain ones not visible.
image

2 Likes

I do have the SELECT statement. This what I have:

SELECT ‘SHIFT’ FROM PUBLIC.“MES_TABLES::PROCESS”

Then when I execute that statement I get:

You are selecting the literal string 'Shift', not a column named Shift. You must be very deliberate with use of quotes in most programming contexts.

I would expect:
SELECT SHIFT FROM PUBLIC.MES_TABLES::PROCESS
to work.

1 Like

In the SQL standard, single quotes are used for constant values and double quotes are used for identifiers like schema, table, and column names. Some brands support variations of the latter for backwards compatibility, but single quotes are always values.

3 Likes