I have this script written in SQL Server 2008 and need to convert it to Oracle SQL this way I can run it in Oracle SQL Developer. Would anyone know the correct syntax? The main things here I would like to know are the following: 1) Declaring local variables 2) Setting local variables 3) Use the local variables 4) Using dates. Thanks very much for your help in advanced.
DECLARE @Name VARCHAR(55)
DECLARE @Age INT
DECLARE @StartDate DATETIME
DECLARE @EndDate DATETIME
SET @NAME = 'Tim'
SET @Age = 55
SET @StartDate = '5/10/1999'
SET @EndDate = '9/22/2008'
SELECT *
FROM TblIdentifier ident
WHERE Name = @Name AND
Age = @Age AND
Birthday BETWEEN @StartDate AND @EndDate
ORDER BY ident.ID