Page 1 of 1

Need DB2 SQL Query

PostPosted: Fri Apr 15, 2016 10:49 pm
by venki3
I am looking for a SQL query for the scenario:
" I need all the card numbers (CARD_NUM) with duplicate entries in table "CC_DETAILS" with overlapping dates for PAID and INCUR dates. Example:

CARD_NUM   CHAR         12      767000411349
PAID_BGN_DT   DATE         10      2014-01-01
PAID_END_DT   DATE         10      2017-01-01
INCUR_BGN_DT  DATE         10      2014-01-01
INCUR_END_DT  DATE         10      2016-01-01

CARD_NUM   CHAR         12      767000411349
PAID_BGN_DT   DATE         10      2016-01-01
PAID_END_DT   DATE         10      2017-01-01
INCUR_BGN_DT  DATE         10      2015-01-01
INCUR_END_DT  DATE         10      2017-01-01


Coded

Re: Need DB2 SQL Query

PostPosted: Sat Apr 16, 2016 3:32 am
by prino
And what do you plan to pay for this information?

This is a HELP forum, not a we do your work for you one...

Re: Need DB2 SQL Query

PostPosted: Mon Apr 25, 2016 7:39 pm
by NicC
You will also have to explain more. Please supply sample input data and expected output data. Use the code tags (with code=old) to preserve spacing.

Re: Need DB2 SQL Query

PostPosted: Sun May 08, 2016 5:51 pm
by Raja190
Hi Venki,
your qustion is not clear and as suggested please post some example like whats the input data and what is the expected output.

also post if you have tried any SQL for this. so we could fine tune it.