Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8491

How can I create first date if I have Month and a Year as user input in Stored Procedure?

$
0
0

I am creating a stored procedure in which one of the input parameter is YEAR_MONTH.

I need to find data from a table which has two columns as START_DATE & END_DATE. So, I need to find data from this table according to user input.

I need to create year and month into a date so that I can compare it with start/end date of table.

 

I tried like this for comparing month in my where clause. But it won't work as it returns multiple values.

 

(SELECTEXTRACT(MONTHFROMSTART_DATE) FROM

"VLC"."VLC.Z_PRJ_VLC_XS.DATABASE_TABLES.MASTER_DATA_TABLES::Z_D_LOCATION") <= :V_IP_MONTH

 

Is there any way to find date from year and month?

If you have some other way to compare then it will also work.

Thanks.


Viewing all articles
Browse latest Browse all 8491

Trending Articles