i have one sp which return values for the specific periods sp1
now i have another sp ,which has all the values for all the periods. sp 2
now what i ahve to do it for missing periods in sp1, i need to get values from sp 2.
i need to do it in third sp3.how to check for what priods is missing and get values
I think we need to know better about those sps.
How does your sp1 and sp2 works? This is, wich values sp receives and what is the output?
1) Are you returning a table as output, or do you insert data into some table?
2) How are you running those sp? you run 1 time during the day or multiple times?
3) Those are run from a report?
I would suggest you to do something like
this will give you the diferences. In other way, periods missing. If you have the resultset in table, great. If not, this isn't the solution for you.
(1) YES I AM RUNING TABE AS OUTPUT
(2) DEPENDS ON HOW MANY TIMES return runs
i did except doesnt work
there r two dates in 2 sp,with datetime datatype
that i need check what is missing