Viewing 15 posts - 46 through 60 (of 65 total)
I'm glad I could help and thanks for the feedback.
Dave
January 31, 2012 at 1:52 am
Rich
That would work just as well for a single stock item. However, the OP goes onto to say
The said Query is Perfect for Single Stock No. For example as...
January 31, 2012 at 1:06 am
Looking in BOL for the OVER clause http://msdn.microsoft.com/en-us/library/ms189461(v=sql.90).aspx"> http://msdn.microsoft.com/en-us/library/ms189461(v=sql.90).aspx we see
Aggregate Window Functions
<OVER_CLAUSE> :: =
OVER ( [ PARTITION BY value_expression ,...
January 30, 2012 at 1:02 am
This is totally untested but may provide a pointer
Select
CT_STOCKNO_P,
CT_STOCKSUMMARY,
CT_QUANTITY,
TR_QUANTITY,
TR_UNITCOST,
TR_TYPECODE,
TR_DATE,
MIN(TR_DATE) OVER (PARTITION BY TR_TYPECODE) AS FIRSTDATE,
MAX(TR_DATE) OVER (PARTITION BY TR_TYPECODE) AS LASTDATE
From ST_COMMODITYTYPE
Inner Join ST_TRANSACTIONS
ON ST_TRANSACTIONS.TR_STOCKNO=ST_COMMODITYTYPE.CT_STOCKNO_P
WHERE CT_STOCKNO_P='01-01-01-010' and (TR_TYPECODE =...
January 29, 2012 at 12:59 pm
I just tried this on 2008 and the replace works as expected. The -- has been replaced with an empty string, the - is left asis. I don't have access...
January 24, 2012 at 1:20 pm
Hi
Does the following link help? http://www.ureader.com/msg/11578059.aspx or have I misunderstood the requirement?
Dave
December 30, 2011 at 6:47 am
There is a maintenance cleanup task that should do this. See http://msdn.microsoft.com/en-us/library/ms345177.aspx for details.
Dave
December 22, 2011 at 1:23 am
I thought I had a Eureka moment. My thinking was what would happen if you replaced the iif clause with
Iif(Parameters!Provider.Value = "KC", " WHERE rss.Provider IN ('XYZ', 'ABC')", "...
December 2, 2011 at 1:55 am
Can you test both static queries and post the results of both?
Dave
December 1, 2011 at 3:36 pm
Everything looks good to me, as Jason suggests.
Is @Provider a single value or is it allowed to contain multiple values?
Dave
December 1, 2011 at 3:25 pm
Just to check that he two different versions of the query are
SELECT rss.TripDate
,rss.Provider
,rss.[Route]
...
December 1, 2011 at 2:55 pm
Does the version of the query where you say there would be a lot of duplicated code actually work as expectecd?
Dave
December 1, 2011 at 2:25 pm
How did you fix the original problem (what is the updated expression)? What type of variable is @Provider?
Dave
December 1, 2011 at 1:48 pm
I also like this type of questiion. It tests several levels of understanding.
The explanation is also well constructed, however I think it also contains a couple of typos where...
November 16, 2011 at 3:34 am
Is there sufficient space available in the backup location?
November 4, 2011 at 12:03 pm
Viewing 15 posts - 46 through 60 (of 65 total)