Showing posts with label seperate. Show all posts
Showing posts with label seperate. Show all posts

Tuesday, March 20, 2012

Current date Prior year date

In details two seperate formulas for date (current range ie: 4/1/06 to 4/30/06), second formula for prior year same month and day range. Grouping is daily.
The formulas work but are seperated by range not picked. How do I get the date ranges side by side for comparison. I am not using cross-tab.
Any help always appreciated.

ok, after starting from square one I finally have the data I was looking for but....
formatting and suppression not doing as I had hoped.
The report looks like this:

Column1 Column2 Column3 Column4 Column5
Current date data data Prior Year data
4/1/05: Fri 200
4/2/05: Sat 47
4/1/06: Sat 247
4/3/06: Mon 30

How do I get these to line up in the same row without subreports?
I have suppressed everything I can think of...

HelpCan you post some sample data and the result you want?

Sunday, February 19, 2012

CTE with multiple update statements?

HI Gurus

I have written one CTE (common table expression) and trying to use same CTE with three seperate UPDATE statements which gives me error saying "Invalid Object name" (it works fine when I try to use with 1 update statement (any one from three update statements)


Isnt it possible that I can use 1 CTE with mutiple update statements?

waiting for your reply....

A CTE can be used multiple times in a single statement but not in multiple statements. You would need a table variable or temporary table if you will have multiple references.

More CTE documentation in BOL here: http://msdn2.microsoft.com/en-us/library/ms175972.aspx

|||thanx for your reply