Toad displays RRRR [message #280471] |
Tue, 13 November 2007 15:27 |
Slow_moe
Messages: 7 Registered: November 2007 Location: Oslo
|
Junior Member |
|
|
Hi everybody, I've searched my Toad settings and just cannot
find this out.. If I start up fresh and simply run
SELECT TRUNC (SYSDATE)
FROM DUAL
by pressing F9 i get the expected 13.11.2007,
but if I run it with F5 I get
TRUNC(SYSD
----------
13.11.RRRR
1 row selected.
Anybody?
|
|
|
|
Re: Toad displays RRRR [message #280546 is a reply to message #280544] |
Wed, 14 November 2007 01:16 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
By the look of your two outcomes, I'd say that there are two separate format-masks for those. You probably have an invalid format mask defined for the RRRR.
|
|
|
Re: Toad displays RRRR [message #280651 is a reply to message #280544] |
Wed, 14 November 2007 05:40 |
Slow_moe
Messages: 7 Registered: November 2007 Location: Oslo
|
Junior Member |
|
|
Hi, my Toad is version 9.0.1.8 and the OS is Vista Home ed.
Are you suggesting it's a setting in the database and not
in Toad, Frank? Where do I look up format masks to check if
they are different. I don't get why it's OK in the grid and
not in the script output, though.
Thanks both for your help!
|
|
|
Re: Toad displays RRRR [message #280655 is a reply to message #280651] |
Wed, 14 November 2007 06:12 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
If you look in the TOAD options, there is a specific date format mask for the data grid. Everywhere else should default to the normal NLS date format.
|
|
|
|
Re: Toad displays RRRR [message #280995 is a reply to message #280788] |
Thu, 15 November 2007 06:23 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
I'd be suprised if changing the Db helped - this is a TOAD thing.
If I run that statement with F5 I get the stunningly useful outputO
V
-
0
7
1 row selected.
We're on 10.2.0.1.0
|
|
|
|
Re: Toad displays RRRR [message #281004 is a reply to message #281001] |
Thu, 15 November 2007 06:44 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
Ahhhh mea culpa.
I didn't notice the scroll bar on the window.
I'm actually getting the result:
S
-
1
5
-
N
O
V
-
0
7
1 row selected.
|
|
|
|
Re: Toad displays RRRR [message #281023 is a reply to message #281011] |
Thu, 15 November 2007 07:24 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
For some reason, the script runner seems to think that sysdate is a 1 chr wide column. If you give it something where it can work out the colum,n width then it's fine, but a date just throws it:
SELECT 'aaaaa',to_char(sysdate,'dd-mm-yyyy'), sysdate, to_Date('01-01-1900','dd-mm-yyyy')
FROM casts where rownum <=1;
'AAAA TO_CHAR(SY S T
----- ---------- - -
aaaaa 15-11-2007 1 0
5 1
- -
N J
O A
V N
- -
0 0
7 0
1 row selected.
|
|
|
Re: Toad displays RRRR [message #281029 is a reply to message #281023] |
Thu, 15 November 2007 07:32 |
Slow_moe
Messages: 7 Registered: November 2007 Location: Oslo
|
Junior Member |
|
|
That's just weird!
Unfortunately I'm at work so I can't access my home-db
where the R-problem resides. However, I've connected to
three different db's here at work, and I get
TRUNC(SYS
---------
15-NOV-07
from all, which I would like to change to
15.11.2007 for one of them, but don't know how.
Cheers,
A
|
|
|
Re: Toad displays RRRR [message #281041 is a reply to message #281029] |
Thu, 15 November 2007 07:56 |
|
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
In TOAD (8.6.1 - it may differ in your version), go to View menu, select "Options ...". "Data Grids" node, "Data". On the right side of the screen you'll see "Display" section - change "Date format" as desired.
|
|
|