SQL Language (MOSC)

MOSC Banner

Issues with correct date formatting in where clauses

edited May 22, 2014 1:19PM in SQL Language (MOSC) 8 commentsAnswered ✓

Hi Folks

I am trying to figure out the most accurate and efficient way to select on a date in a where clause

I have been down this road before and I keep getting mixed up so hoping you can assist

vercdate is defined as a date in my table

define x_date1=20140101
define x_date2=20141231

variable v_date1 varchar2(8)
variable v_date2 varchar2(8)

exec :v_date1  :=&x_date1;
exec :v_date2  :=&x_date2;

i am trying the following clauses with bind and defined variables and not sure which syntax would be most efficient and accurate

Any advise is greatly appreciated

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center