Viewing 15 posts - 16 through 30 (of 42 total)
Because you said it needs to start over at the beginning of each year, I added in more rows for 2011 to test/demonstrate the results of that.
IF OBJECT_ID('tempdb..#Totals') IS NOT...
June 22, 2012 at 1:23 pm
There are columns with different data, in my results:
user_seeks, user_scans, user_lookups, and user_updates
If you don't want the values you listed to repeat, you need to either exclude the above columns...
June 22, 2012 at 9:11 am
Andrew in WV (6/21/2012)
ColdCoffee (2/16/2012)
Here is the link : CREATE PROCEDURE
To...
June 21, 2012 at 9:09 am
ChrisM@Work (6/21/2012)
jeffem (6/21/2012)
June 21, 2012 at 8:33 am
ChrisM@Work (6/21/2012)
jeffem (6/21/2012)
ChrisM@Work (6/21/2012)
David Webb-200187 (6/19/2012)
Let's say you had 50 rows, all with a quantity of 1. The target quantity was 5.
How would you want that brought back? ...
June 21, 2012 at 7:52 am
ChrisM@Work (6/21/2012)
David Webb-200187 (6/19/2012)
Let's say you had 50 rows, all with a quantity of 1. The target quantity was 5.
How would you want that brought back? All the...
June 21, 2012 at 7:28 am
Les Cardwell (6/19/2012)
Chasing,>>All the possible combinations of those rows that added to 5?
All the possible DISTINCT combinations.
In the vein of being pedantic (because that's the only way I can...
June 19, 2012 at 2:48 pm
Thanks to both of you for the replies!
And for the excellent personal service, I'll get my company to spring for the published version of the book, instead of just...
June 14, 2012 at 12:09 pm
ChrisM@Work (6/13/2012)
jeffem (6/13/2012)
Though the answers have already been shared, it can be useful to have the options for CONVERT() available at your disposal. This link[/url] can be a useful primer...
Only...
June 13, 2012 at 9:54 am
Though the answers have already been shared, it can be useful to have the options for CONVERT() available at your disposal. This link[/url] can be a useful primer...
June 13, 2012 at 9:49 am
David Moutray (6/5/2012)
Also, Google is fallible. There are...
June 7, 2012 at 12:47 pm
Adam Machanic (6/4/2012)
I'm pretty sure that was the AVN show, not PASS. And they were talking about colons, not commas.
Ew.
June 7, 2012 at 12:45 pm
ReginaR1975 (6/5/2012)
SELECT CASE WHEN MONTH(DueDate)=5 THEN DueDate END AS DTFROM [AdventureWorks].[Purchasing].[PurchaseOrderDetail]
where DueDate is not null
I want to clarify something that misled you here, since you're using CASE statements.
See, the...
June 7, 2012 at 9:39 am
adonetok (6/7/2012)
It works.
Since the date is controled by @CSV I deleted the following statement in @SQL.
AND OrderDate BETWEEN ''' +
...
June 7, 2012 at 9:09 am
adonetok (6/6/2012)
Hi Jeffem,If I want to get sum of 12 months, how to modify your existing code?
Try this...
DECLARE @CSV VARCHAR(4000)
DECLARE @SQL VARCHAR(8000)
DECLARE @StartDate DATE
DECLARE @EndDate DATE
SET @StartDate...
June 6, 2012 at 4:32 pm
Viewing 15 posts - 16 through 30 (of 42 total)