Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Convert code from SQL Server 2000 to SQL Plus for Oracle

Re: Convert code from SQL Server 2000 to SQL Plus for Oracle

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Tue, 08 Apr 2003 19:59:55 GMT
Message-ID: <MPG.18fcca188cb63ed4989725@news.la.sbcglobal.net>


forbrich_at_telusplanet.net said...
> Karsten Farrell wrote:
>
> > It's been a while since I did TransactSQL, but I think your code can be
> > reduced to:
> >
> > select to_char(sysdate,'dd-Mon-yyyy'),
> > to_char(last_day(sysdate),'dd-Mon-yyyy')
> > from dual;
>
> So when did the (informal) policy change so that we actually provide
> answers? <g>
>

You *do* have a point there! Actually, I just remember how stunned I was when I first encountered TransactSQL (though it was in Sybase) after some ten years with Oracle ... got to where I hated those at-signs with a passion ... very awkward for me to type. Was so glad when that company (a dot-com) went belly-up and I could return to Oracle. But I might be prejudiced. :)

However, if you try my solution, you'll see that I didn't really provide the answer. Hehe ... the first value should have been:

  '01-' || to_char(sysdate,'Mon-yyyy')

but I didn't catch that when I was typing.

-- 
/Karsten
DBA > retired > DBA
Received on Tue Apr 08 2003 - 14:59:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US