Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> WildCards to match Date
hi, I'm trying to match a date in my database with wildcards in the format of DD-MM-YYYY...for example, *-12-1998 should match with any dates of Dec in 1998.... .A gentleman called Steve pointed out some of my syntax error this afternoon......thanks Steve... I'm a newbie and just got started....thanks guys..
I'm using Pro C...
here is what I have in the program
EXEC SQL declare curdob cursor for
select dob,name from Contacts whereto_date(dob,'DD-MM-YYYY') like to_date(:tdob,'DD-MM-YYYY') ORDER BY to_date(dob,'DD-MM-YYYY'),name;
But when I tested if the above operated correctly or not, using (sqlca.sqlcode<0) , it always tell me it's <0 which means that the above code was not excute correctly....what was wrong????? Thank you..
Variable Descriptions:
dob: date column name in the table (varchar)
name: name column in the table. (varchar)
:tdob: the string date I read from the input... (Varch
:cmatchdob: a string to store date.....(Varchar)
Thanks. Received on Mon Sep 25 2000 - 19:04:20 CDT
![]() |
![]() |