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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

selecting all columns

Status
Not open for further replies.

naushi

ISP
Jan 18, 2002
89
US
I have to select all the columns from a table but I want to display one column with supressed leading zeroes. I can use ltrim(col,'0') for the specified column and it does supress the xeroes. How can I use select * from.....without having to type the rest of the column names. Is ther ea way to select * from with the exception. Any ideas will be welcome.

Note: I treid linking the table in Access but the ltrim syntax errors out. I tried ltrim(col) in Access - it does not supress zeroes since it is a character field.

Regards,
Naushi Hussain
Naushi.hussain@honeywell.com
 
Hi,
AFAIK, the only way to do it without specifying
all the columns each time is to build a view and use it for the select statement ( at least you will only have to write it once)

[profile]
 
hi,

u can use select *, ltrim(col,'0') from _____

i just cant remember if this will work... but u can try,...

regards..
 
Hi,
Nope , that construct fails:
Code:
select *,ltrim(empl_nm) from hr_public where rownum < 12
        *
ERROR at line 1:
ORA-00923: FROM keyword not found where expected

Nice thought though...


[profile]
 
Turkbear, this may work:

select hr_public.*,ltrim(hr_public.empl_nm) from hr_public where rownum < 12



Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top