Link to home
Start Free TrialLog in
Avatar of PearlJamFanatic
PearlJamFanatic

asked on

table name in uppercase

If there a query that i can write that will return the results from either of the query whichever returns rows. The character case of the table name could be in any case and not known to me at design time.

select COLUMN_NAME from all_tab_columns where TABLE_NAME='abcdefg'

select COLUMN_NAME from all_tab_columns where TABLE_NAME='ABCDEFG'

or any other case like 'Abcdefg' or 'AbCdEfg'

this query is to be run in oracle and sybase DBs

Avatar of OP_Zaharin
OP_Zaharin
Flag of Malaysia image

- in Oracle you can use UPPER or LOWER to forced the data to be in uppercase/lowercase

select COLUMN_NAME from all_tab_columns where UPPER(TABLE_NAME) = UPPER('abcdefg')
SOLUTION
Avatar of OP_Zaharin
OP_Zaharin
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of awking00
awking00
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial