PL-SQL Command.
-
Hi, Problem: Get all records from MyTable where mydate value is equal to ‘12/31/2006’. Note: Disregard TimeStamp I know the solution in T-SQL but in PL-SQL i'm just a newbie. Can you please help me to convert the below T-SQL comannd to PL-SQL. ---TSQL Solution 1: Use 24hrs timespan SELECT * FROM MyTable WHERE MyDate BETWEEN '12/31/2006 12:00:00.000 AM' AND '12/31/2006 12:59:59.999 PM' ---TSQL Solution 2: REMOVE TimeStamp SELECT * FROM MyTable WHERE RTRIM(CONVERT(VARCHAR(11),MyDate,101)) = ‘12/31/2006’ Thanks,
-
Hi, Problem: Get all records from MyTable where mydate value is equal to ‘12/31/2006’. Note: Disregard TimeStamp I know the solution in T-SQL but in PL-SQL i'm just a newbie. Can you please help me to convert the below T-SQL comannd to PL-SQL. ---TSQL Solution 1: Use 24hrs timespan SELECT * FROM MyTable WHERE MyDate BETWEEN '12/31/2006 12:00:00.000 AM' AND '12/31/2006 12:59:59.999 PM' ---TSQL Solution 2: REMOVE TimeStamp SELECT * FROM MyTable WHERE RTRIM(CONVERT(VARCHAR(11),MyDate,101)) = ‘12/31/2006’ Thanks,
Doesn't PL/SQL still have a Truncate or DateTruncate function? (Haven't used Oracle for many years.)