On Mon, 27 Jan 2003 00:24:58 -0700 (MST) Doug Hughes <[EMAIL PROTECTED]> wrote:
> I've got some fields in an oracle table where the internal format > is date. I'm currently using a select * type query to return > all the colums of the table (36), and the date fields come back > as 'MM/DD/YYYY'. > I could enumerate every column and for each data field do > a select to_char(field,'MM/DD/YYYY HH24:MI:SS'), but that > seems rather tedious and I was thinking there must be a better > way. Is there some way to do the equivalent of an alter system > to set the NLS_DATE_FORMAT for retrieving date fields? You'll need to check the fine Oracle SQL manual to be sure, but I think "ALTER SESSION SET NLS DATE FORMAT TO 'YYYY/MM/DD HH24:MI:SS'" or something similar would do what you want. I recommend putting the year first since that makes sorting and parsing easier. -- Mac :}) ** I normally forward private questions to the appropriate mail list. ** Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age.
