On 2013.07.29 6:08 PM, Roman Fleysher wrote:
Thank you, SQLiters, for confirmation. Yes, the set up is unusual. I have a
table which essentially maps existing column names to the names the users want
to see.
columnRenameTable(table, column, showAS)
The goal was to use this mapping for
SELECT
> I was going to say, try using a SQL prepared statement.
>
> For example, in Postgres you can write something like this:
>
> execute format( 'SELECT %I FROM table that has that columnName',
>(SELECT columnName FROM columnNameTable WHERE condition how to
> select limit 1) );
>
> But I don
name come from a table?
On 7/29/2013 8:32 PM, Roman Fleysher wrote:
> I think the answer to my question is "NO", but may be I missed something...
>
> Can column name come from a table, i.e. from another select? Example:
>
> SELECT (SELECT columnName FROM columnNameTable WHER
On 2013.07.29 5:32 PM, Roman Fleysher wrote:
Dear SQLiters,
I think the answer to my question is "NO", but may be I missed something...
Can column name come from a table, i.e. from another select? Example:
SELECT (SELECT columnName FROM columnNameTable WHERE condition how to select
limit 1)
F
You should be able to craft the query outside of the database and then
treat it like a normal query. You have to be very careful about doing
this, and it generally isn't a good idea.
If you do take this approach, make sure that you properly sanitize the
column names, especially if they are provide
On 7/29/2013 8:32 PM, Roman Fleysher wrote:
I think the answer to my question is "NO", but may be I missed something...
Can column name come from a table, i.e. from another select? Example:
SELECT (SELECT columnName FROM columnNameTable WHERE condition how to select
limit 1)
FROM table which h
6 matches
Mail list logo