plx help its urgent

Who is online?  0 guests and 0 members
Home  »  Forums   »  microsoft business intelligence   »  reporting services   » plx help its urgent

plx help its urgent

Topic RSS Feed

Posts under the topic: plx help its urgent

Posted: 4/13/2012

Padawan 378  points  Padawan
  • Joined on: 4/3/2012
  • Posts: 189
fine.
i am giving sample data.

i have 1 stored prc sp1,which has table values function ,so its return table.

output.

fromdate todate value

06/30/2009 07/30/2009 12.30
7/30/2009 08/30/2009 4.5
8/30/2009 09/30/2009 5.6

now i have another sp2


fromdate todate value

06/30/2009 07/30/2009 12.30
7/30/2009 08/30/2009 4.5
8/30/2009 09/30/2009 5.6
9/30/2009 10/30/2009 5.6

now see in sp1 this(9/30/2009 10/30/2009 5.6) is missing.

i need to add this thing and i need to make it dynamic.

i have third sp3, in which i need to implement this logic.

now in my sp3 i am execute like this

exec sp3
fromdate = ' '
todate = ' '


i need to check in sp3 whatever values are missing in sp1.

if i am check using fromdate , to date its not working. need to check whatever dates are missing between them and then i need to add values

plz help me

Posted: 4/14/2012

Jedi Knight 1516  points  Jedi Knight
  • Joined on: 1/3/2010
  • Posts: 266

I believe you created this topic before, under another title.

What do you need to garantee? That all days exists, if not, insert into some table?

As I replied in that topic, you need to execute each sp and insert the output lets say to:

exec sp1 - into table_sp1

exec sp2 - into table_sp2

Then you need to do something like this:

select convert(varchar,date_column,112) as column_to_compare

from table_sp2

EXCEPT

select convert(varchar,date_column,112) as column_to_compare

from table_sp1

this will return:

20090930

That's the date that differs from sp2 and sp1. Am I right?

 


Page 1 of 1 (2 items)