Viewing 15 posts - 2,986 through 3,000 (of 5,504 total)
You don't have a "source" defined to apply the WHERE clause to. Your source is a table with one row and one column holding the month of getdate():
IF Exists (
SELECT...
August 18, 2010 at 6:26 am
to "quote" Bob Dylan:
"How many chars can I split with this code
before it will starting to fail?
The answer, my friend, is written in the link[/url].
The answer is...
August 18, 2010 at 5:21 am
See the CrossTab link in my signature and change your query accordingly.
Then read the DynamicCrossTab article (also refernced in my signature) to make it dynamic.
Give it a try and see...
August 17, 2010 at 7:29 am
That's one of the reasons I prefer using the "old-fashioned" cross tab method over PIVOT.
One of the other reasons is to make it dynamic more easily.
August 17, 2010 at 6:41 am
I'm just guessing that it is caused by the IN clause.
Why don't you use DELETE FROM <tablename> WHERE Id =10 instead?
If there is more than one value, use a subquery...
August 17, 2010 at 4:03 am
Based on the very limited information provided so far: reduce the number of rows in the table or in your select statement (the former by archiving data and the latter...
August 17, 2010 at 3:40 am
I would use the "quirky update" method, assuming you're using SS2K and not SS2K5 or higher (in this case ROW_NUMBER() would be my preferred method).
The quirky update method is described...
August 17, 2010 at 3:17 am
There are several options I can think of:
1) Analyze the index job if it can be optimized (e.g. only roerganize/rebuild indexes that need to be touched basd on fragmentation level)
2)...
August 16, 2010 at 4:53 pm
That's weird...
Usually the usage of a format file takes care of conversion errors. If not, a staging table could be used to load the data. However, the final table should...
August 16, 2010 at 4:37 pm
You might want to be a little more specific what you're really looking for...
If you don't want to provide a start and end date, what will be the logic to...
August 16, 2010 at 3:02 pm
If you're "unhappy" with the system messages, create your own message and deal with the system generated messages by using a TRY/CATCH block.
I'd be curious to know the business case...
August 16, 2010 at 2:37 pm
Aspg (8/16/2010)
Nobody around !
Well, that's not really true...
I, personally, decided not to reply since you're asking for a fix to your loop solution knowing there are alternatives available.
So, instead of...
August 16, 2010 at 2:24 pm
Hi,
here's the solution using the view instead of the Tally solution (I only changed @SQL2):
SELECT @SQL2 = COALESCE(@SQL2,'')
+ ' SUM(CASE WHEN WeekEndDate = ' + QUOTENAME(d.WeekEndDate,'''')
+ ' THEN TotalPageviews ELSE...
August 16, 2010 at 2:09 pm
I would use UNPIVOT (EDIT: or UNION ALL if the system is before SS2K5) to normalize the data and a MAX() aggregation grouped by ClientID.
For a coded version I'd like...
August 16, 2010 at 1:09 pm
Viewing 15 posts - 2,986 through 3,000 (of 5,504 total)