Viewing 15 posts - 181 through 195 (of 532 total)
I know this wasn't your main issue, but it is true that OPENQUERY is still limited to a query string that will fit on one page ... so varchar(8000).
Now, I'm...
July 27, 2010 at 1:40 pm
You wouldn't want the quirky update method for this because it's not needed and therefore the performance hit would be unwarranted. It's a fairly simple join, but there are...
July 27, 2010 at 12:46 pm
You're already pulling your weeks from a table "time t". Why not just add a fiscalYear column to that table and group on it and/or just add where t.fiscalYear...
July 27, 2010 at 12:40 pm
brian.cook (7/27/2010)
SELECT TOP 1 [ProjectID]
FROM [BE].[dbo].[2010Projects]
ORDER BY [ProjectID] DESC
That should give me the latest...
July 27, 2010 at 11:35 am
Yes, the problem is the lack of single quotes around the dates in the string.
And yes, it is important enough that it's worth repeating: with this methodology you're basically asking...
July 26, 2010 at 6:01 pm
I made a slight change ... we need something specific to order our items by. Now it may be that you want them in order of the Code value,...
July 26, 2010 at 5:45 pm
I'm pretty sure there is a more elegant way to code this, but this will do what you're asking:
declare @t_tally table (N int) --hopefully you have a real tally table...
July 23, 2010 at 4:31 pm
Yes, you can just take that out if you don't need it.
July 23, 2010 at 3:29 pm
malleswarareddy_m (7/22/2010)
July 23, 2010 at 1:11 pm
I saw this same situation you describe recently. When hard coding the date values I got a seek and everything was fine. When I put the same date...
July 23, 2010 at 1:08 pm
If you're doing a lot of cleanup before you can import, I would suggest that you take a look at SSIS. It's a very handy tool with a lot...
July 23, 2010 at 1:00 pm
Jeff Moden (7/22/2010)
Wayne and BT...Ummm... what happens if you're missing a week of data with either of your fine solutions? 🙂
Well, it depends! That would obviously be a problem...
July 22, 2010 at 8:51 pm
Just for future reference, it helps if you put your data in a usable format like this:
CREATE TABLE #Temp
(
[CP Code] varchar(50),
[Date] date,
[Total Pageviews] bigint,
[Total Volume in MB] decimal(16,4),
)
INSERT INTO #Temp
SELECT...
July 22, 2010 at 6:23 pm
SELECT sno,
id,
product,
ROW_NUMBER() OVER(PARTITION BY id ORDER BY sno)
FROM yourTable
ORDER BY sno
July 22, 2010 at 5:00 pm
Viewing 15 posts - 181 through 195 (of 532 total)