tags:

views:

41

answers:

2

Hello all,

Here's a dumb question which I can't find an answer to: I have a table which contains 20 fields, a few of which are date/time. I am interested in pulling all the fields. I would like to pull the datetime fields using the to_char function but don't want to individually list out all the other fields. Is there an easy way to do this?

I tried select *, tochar(dtfield) as dt2 and select tochar(dtfield) as dt2, * and both give errors.

Thanks for all your help! JC

+2  A: 

You may need to qualify the * with the table name (or alias):

select tablename.*, tochar(dtfield) ...
Mark Wilkins
This works, thank you!
JC
@JC: mark as answer, then?
ANeves
Cooldown timer on mark as answered (4 minutes left)
JC
A: 

You've got no from clause that you've shared. You have to select from a table, did you just omit it in your example?

Daniel DiPaolo