nambastha
nambastha

Reputation: 127

SqlServer to Oracle PLSQL conversion

How this sqlserver code should look like in Oracle?

set @Date= (select Convert(nvarchar(30), (select YEAR(Getdate()))) + 
            Convert(nvarchar(10), (SELECT RIGHT('00' + @month, 2))) + 
            Convert(nvarchar(10), (SELECT RIGHT('00' + @day, 2))));

Upvotes: 0

Views: 53

Answers (1)

user330315
user330315

Reputation:

some_var := to_char(sysdate,'yyyy-mm-dd');

More details on the to_char() function are in the manual:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/functions200.htm#SQLRF06129

Upvotes: 1

Related Questions