Home » SQL & PL/SQL » SQL & PL/SQL » dateadd in plsql?
dateadd in plsql? [message #435979] Sun, 20 December 2009 08:50 Go to next message
pyscho
Messages: 134
Registered: December 2009
Senior Member
I'm in the processw of converting TSQL to PLSQL and come across a slight problem.

DATEADD(MONTH, @months * -1, GETDATE())

Is there a way to do the same thing in plsql, so that I can go back a certain number of months.
Re: dateadd in plsql? [message #435980 is a reply to message #435979] Sun, 20 December 2009 08:55 Go to previous messageGo to next message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes, it is easy with a function that exists in the link I posted in your previous topic.

Regards
Michel

[Updated on: Sun, 20 December 2009 08:56]

Report message to a moderator

Re: dateadd in plsql? [message #436001 is a reply to message #435979] Mon, 21 December 2009 00:02 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
ADD_MONTHS

regards,
Delna
Re: dateadd in plsql? [message #436008 is a reply to message #436001] Mon, 21 December 2009 01:21 Go to previous messageGo to next message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I already posted him the link, please read the whole topic and do not go against other posters.

Regards
Michel
Re: dateadd in plsql? [message #436022 is a reply to message #436008] Mon, 21 December 2009 02:50 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Michel sir,

Quote:
I already posted him the link,


Currently, before this post, there are total four posts here.
And I don't see any link in them, except one, I provided in third post.

regards,
Delna
Re: dateadd in plsql? [message #436028 is a reply to message #436022] Mon, 21 December 2009 03:05 Go to previous messageGo to next message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This is why I said "read the whole topic before posting".
I said to OP:
Quote:
it is easy with a function that exists in the link I posted in your previous topic.

OP posted several questions at the same time, all shows a lack in reading documentation, I already posted him the link.
You should read what I said, my point was obvious and you should not post against this.

Regards
Michel
Re: dateadd in plsql? [message #436046 is a reply to message #436028] Mon, 21 December 2009 03:37 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Agree with
Quote:
do not go against other posters.


But as I didn't see any point to point answer or link, I replied with the function name containing link.

regards,
Delna
Re: dateadd in plsql? [message #436049 is a reply to message #436046] Mon, 21 December 2009 03:50 Go to previous messageGo to next message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
But as I didn't see any point to point answer or link

But doesn't the following clear:
Quote:
in the link I posted in your previous topic.

Doesn't it? Doesn't it? Doesn't it?

Regards
Michel
Re: dateadd in plsql? [message #436055 is a reply to message #436049] Mon, 21 December 2009 04:06 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Michel Cadot wrote on Mon, 21 December 2009 10:50
Quote:
But as I didn't see any point to point answer or link

But doesn't the following clear:
Quote:
in the link I posted in your previous topic.

Doesn't it? Doesn't it? Doesn't it?

Regards
Michel

How would this help other people? You cannot expect them to search for other posts by the same poster.
Re: dateadd in plsql? [message #436057 is a reply to message #436055] Mon, 21 December 2009 04:23 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Exactly,

Quote:
How would this help other people? You cannot expect them to search for other posts by the same poster.

Frank sir theft my thought and one step ahead me, expressed also. ./fa/1986/0/

regards,
Delna
Re: dateadd in plsql? [message #436061 is a reply to message #436055] Mon, 21 December 2009 04:50 Go to previous messageGo to next message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
How would this help other people? You cannot expect them to search for other posts by the same poster.

I agree so we must give a full answer to lazy guy just to help the other ones?

Regards
Michel

[Updated on: Mon, 21 December 2009 04:52]

Report message to a moderator

Re: dateadd in plsql? [message #436179 is a reply to message #436061] Tue, 22 December 2009 00:53 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Michel Cadot wrote on Mon, 21 December 2009 11:50
Quote:
How would this help other people? You cannot expect them to search for other posts by the same poster.

I agree so we must give a full answer to lazy guy just to help the other ones?

Regards
Michel

You don't HAVE to answer. If you feel a person does not deserve a full answer, move on to the next topic. Don't bash others for giving them answers though. Remember that this is a community. Its existence depends on multiple people being involved.
Re: dateadd in plsql? [message #436192 is a reply to message #436179] Tue, 22 December 2009 01:22 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Correct.
Whether or not to give reply to any post is fully subjective. One may be interested in giving reply to one post while other may not be.

Moreover, moving some active users to other post (of those lazy users) from current post is not correct way. And even more, it was not clearly specified where to move.

I think, this is understandable. Smile

regards,
Delna
icon10.gif  Re: dateadd in plsql? [message #436321 is a reply to message #436192] Tue, 22 December 2009 22:02 Go to previous messageGo to next message
rahulvb
Messages: 924
Registered: October 2009
Location: Somewhere Near Equator.
Senior Member
OK Lady Wins.

Cool
Re: dateadd in plsql? [message #436337 is a reply to message #436321] Tue, 22 December 2009 22:35 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Quote:
OK Lady Wins.
Laughing

Nothing like winning or loosing...
I was just expressing my ideas, nothing else.

regards,
Delna
Re: dateadd in plsql? [message #436340 is a reply to message #436337] Tue, 22 December 2009 22:41 Go to previous messageGo to next message
rahulvb
Messages: 924
Registered: October 2009
Location: Somewhere Near Equator.
Senior Member
Quote:
Nothing like winning or loosing...


Cool That was just Small Cracker in Rumble of gurus. Laughing
Re: dateadd in plsql? [message #436362 is a reply to message #436340] Wed, 23 December 2009 01:25 Go to previous message
Michel Cadot
Messages: 64130
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You're currently acting like a troll.
The discussion was ended, you have no need to awake it with stupid comment.

Regards
Michel
Previous Topic: Multiple Partition in a Single Query
Next Topic: To get the name of the object(table/view) throwimg exception
Goto Forum:
  


Current Time: Wed Dec 07 06:56:45 CST 2016

Total time taken to generate the page: 0.10841 seconds