dbTalk Databases Forums  

Re: Playing With Truncate and Date

comp.databases.oracle.server comp.databases.oracle.server


Discuss Re: Playing With Truncate and Date in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michel Cadot
 
Posts: n/a

Default Re: Playing With Truncate and Date - 03-04-2011 , 10:27 AM






"Nimish" <nimishsoft (AT) gmail (DOT) com> a écrit dans le message de news:
b35b4edf-2e2a-4801-a971-790f8c442784...oglegroups.com...
Quote:
Check Out This link
http://nimishgarg.blogspot.com/2011/...-and-date.html
Nothing more (rather much less) than the documentation and even wrong:

SQL> SELECT TRUNC( TO_DATE('27-FEB-2011') -1,'DAY')+1 FROM DUAL;
SELECT TRUNC( TO_DATE('27-FEB-2011') -1,'DAY')+1 FROM DUAL
*
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected

Regards
Michel

Reply With Quote
  #2  
Old   
John Hurley
 
Posts: n/a

Default Re: Playing With Truncate and Date - 03-06-2011 , 08:04 AM






Michel:

# SQL> SELECT TRUNC( TO_DATE('27-FEB-2011') -1,'DAY')+1 FROM DUAL;

....ERROR at line 1: ORA-01858: a non-numeric character was found where
a numeric was expected

Works for me ...

Reply With Quote
  #3  
Old   
Maxim Demenko
 
Posts: n/a

Default Re: Playing With Truncate and Date - 03-06-2011 , 08:43 AM



On 06.03.2011 15:04, John Hurley wrote:
Quote:
Michel:

# SQL> SELECT TRUNC( TO_DATE('27-FEB-2011') -1,'DAY')+1 FROM DUAL;

....ERROR at line 1: ORA-01858: a non-numeric character was found where
a numeric was expected

Works for me ...

It is just the question of time, till somebody changes nls environment
(it might be yourself).

What Michel implied (i suppose) to tell
1) it is bad to rely on implicit conversion, if you can avoid it
2) it is worse, if such conversions are nls dependent, as it may
introduce problems which are hard to identify
3) it is worse to promote such bad practice, as somebody, not aware of
it, may take it for good practice.

Best regards

Maxim

Reply With Quote
  #4  
Old   
Michel Cadot
 
Posts: n/a

Default Re: Playing With Truncate and Date - 03-06-2011 , 09:45 AM



"Maxim Demenko" <mdemenko (AT) gmail (DOT) com> a écrit dans le message de news: 4D739D94.809 (AT) gmail (DOT) com...
Quote:
On 06.03.2011 15:04, John Hurley wrote:
Michel:

# SQL> SELECT TRUNC( TO_DATE('27-FEB-2011') -1,'DAY')+1 FROM DUAL;

....ERROR at line 1: ORA-01858: a non-numeric character was found where
a numeric was expected

Works for me ...


It is just the question of time, till somebody changes nls environment
(it might be yourself).

What Michel implied (i suppose) to tell
1) it is bad to rely on implicit conversion, if you can avoid it
2) it is worse, if such conversions are nls dependent, as it may
introduce problems which are hard to identify
3) it is worse to promote such bad practice, as somebody, not aware of
it, may take it for good practice.

Best regards

Maxim
Exactly!

Regards
Michel

Reply With Quote
  #5  
Old   
John Hurley
 
Posts: n/a

Default Re: Playing With Truncate and Date - 03-06-2011 , 12:12 PM



Maxim:

# What Michel implied (i suppose) to tell
1) it is bad to rely on implicit conversion, if you can avoid it
2) it is worse, if such conversions are nls dependent, as it may
introduce problems which are hard to identify
3) it is worse to promote such bad practice, as somebody, not aware
of it, may take it for good practice.

Now that makes sense. I did not look long at all at the referenced
blog that had the material. I assumed ( apparently incorrectly ) that
the writer would have at least given some background about what their
environment was that their examples worked in.

Reply With Quote
  #6  
Old   
Michel Cadot
 
Posts: n/a

Default Re: Playing With Truncate and Date - 03-06-2011 , 01:22 PM



"John Hurley" <hurleyjohnb (AT) yahoo (DOT) com> a écrit dans le message de news:
a490c259-132b-4b3a-a7f3-31f97dc0fd98...oglegroups.com...
Quote:
Maxim:

# What Michel implied (i suppose) to tell
1) it is bad to rely on implicit conversion, if you can avoid it
2) it is worse, if such conversions are nls dependent, as it may
introduce problems which are hard to identify
3) it is worse to promote such bad practice, as somebody, not aware
of it, may take it for good practice.

Now that makes sense. I did not look long at all at the referenced
blog that had the material.

Quote:
I assumed ( apparently incorrectly ) that
the writer would have at least given some background about what their
environment was that their examples worked in.
For this, it would be necessary that the writer is aware of the limits
of his examples which is likely to not be the case for those that needs
to auto-promote their blog.

Regards
Michel

Reply With Quote
  #7  
Old   
Maxim Demenko
 
Posts: n/a

Default Re: Playing With Truncate and Date - 03-06-2011 , 01:36 PM



On 06.03.2011 20:22, Michel Cadot wrote:
Quote:
"John Hurley"<hurleyjohnb (AT) yahoo (DOT) com> a écrit dans le message de news:
a490c259-132b-4b3a-a7f3-31f97dc0fd98...oglegroups.com...

For this, it would be necessary that the writer is aware of the limits
of his examples which is likely to not be the case for those that needs
to auto-promote their blog.

Regards
Michel


Well, it seems, in many cases, these aren't *his* examples, he just
sometimes forget to mention it...

http://forums.oracle.com/forums/mess...196352#9196352

At least, the pointed by Rob van Wijk
http://nimishgarg.blogspot.com/2010/...al-column.html
still doesn't reflect the original otn post
http://forums.oracle.com/forums/thre...84628&tstart=2

Best regards

Maxim

Reply With Quote
  #8  
Old   
Nimish Garg
 
Posts: n/a

Default Re: Playing With Truncate and Date - 03-07-2011 , 09:51 PM



On Mar 7, 12:36*am, Maxim Demenko <mdeme... (AT) gmail (DOT) com> wrote:
Quote:
On 06.03.2011 20:22, Michel Cadot wrote:

"John Hurley"<hurleyjo... (AT) yahoo (DOT) com> *a crit dans le message de news:
a490c259-132b-4b3a-a7f3-31f97dc0f... (AT) o21g2000prh (DOT) googlegroups.com...

For this, it would be necessary that the writer is aware of the limits
of his examples which is likely to not be the case for those that needs
to auto-promote their blog.

Regards
Michel

Well, it seems, in many cases, these aren't *his* examples, he just
sometimes forget to mention it...

http://forums.oracle.com/forums/mess...196352#9196352

At least, the pointed by Rob van Wijkhttp://nimishgarg.blogspot.com/2010/09/oracle-11g-virtual-column.html
still doesn't reflect the original otn posthttp://forums.oracle.com/forums/thread.jspa?threadID=1084628&tstart=2

Best regards

Maxim
if u see this thread here
http://forums.oracle.com/forums/mess...196352#9196352

as per the suggestions, i hv added a link on my post
http://nimishgarg.blogspot.com/2010/...oncat-and.html

and also have removed the page
http://nimishgarg.blogspot.com/2010/...vior-with.html

what else i can do here ????

Reply With Quote
  #9  
Old   
Maxim Demenko
 
Posts: n/a

Default Re: Playing With Truncate and Date - 03-08-2011 , 01:49 AM



On 8 Mrz., 04:51, Nimish Garg <nimishs... (AT) gmail (DOT) com> wrote:

Quote:
as per the suggestions, i hv added a link on my posthttp://nimishgarg.blogspot.com/2010/07/oracle-differece-between-wmcon...
In the mentioned otn thread was suggested, that you add a reference on
*all* your posts, where you used examples not invented by you. You
have added reference only on *one* your blogpost. In my previous reply
i mentioned at least one of your blogpost, which doesn't reflect the
original source as of now.

Quote:
and also have removed the pagehttp://nimishgarg.blogspot.com/2010/10/count-and-count-distinct-behav...

what else i can do here ????
I have no idea what you can do, but in our country, the minister who
used other's work without paying credit, has resigned - just to
mention some possible alternatives...

Best regards

Maxim

Reply With Quote
  #10  
Old   
yossarian
 
Posts: n/a

Default Re: Playing With Truncate and Date - 03-08-2011 , 03:07 AM



Maxim Demenko wrote:

Quote:
I have no idea what you can do, but in our country, the minister who
used other's work without paying credit, has resigned - just to
mention some possible alternatives...
Lucky country... our (prime) minister has done worse but he's still
sitting on his chair...

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.