Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PROCEDURE CONVERSION

Status
Not open for further replies.

jrc1

IS-IT--Management
Apr 17, 2001
24
US
I am looking at converting the following Oracle procedcures to function in MS SQL Server 7. Any thoughts would be greatly appreciated.

begin-procedure Convert-date-to-ora-mmddyy
begin-select on-error=SQLerror
to_date($conv_dt,'MMDDYY') &ora_date
from dual
end-select
end-procedure

begin-procedure Convert-date-to-ora-yymmdd
begin-select on-error=SQLerror
to_date($conv_dt,'YYMMDD') &ora_date_YYMMDD
from dual
end-select
end-procedure
 
Convert current date to various formats in SQL Server.
[tt]
Format SQL
mm/dd/yy select convert(char(8),getdate(),1)
mm/dd/yyyy select convert(char(8),getdate(),101)
mmddyy replace(select convert(char(8),getdate(),1),'/','')
mmddyyyy replace(select convert(char(8),getdate(),101),'/','')
yy/mm/dd select convert(char(8),getdate(),11)
yyyy/mm/dd select convert(char(8),getdate(),111)
yymmdd select convert(char(8),getdate(),13)
yymmdd select convert(char(8),getdate(),113)[/tt] Terry
_____________________________________
Man's mind stretched to a new idea never goes back to its original dimensions. - Oliver Wendell Holmes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top