Viewing 15 posts - 7,531 through 7,545 (of 10,144 total)
It's not rocket science, converting a query into a stored procedure or vice versa. So why not let us assume that you are writing a stored procedure? Then if you...
August 11, 2010 at 9:16 am
The Dixie Flatline (8/11/2010)
The comics world lost a great humorist when...
August 11, 2010 at 8:53 am
sc-w (8/11/2010)
Could you do me a favour? I'm not getting my head round how this works.
The part of my query below is the bit that works out...
August 11, 2010 at 8:34 am
The Dixie Flatline (8/11/2010)
GilaMonster (8/10/2010)
LutzM (8/10/2010)
You're not talking about Elephant or Zebra biltong, are you?
No, just beef to start with, wouldn't want to scare the poor Americans :-D. Kudu biltong...
August 11, 2010 at 8:11 am
CELKO (8/11/2010)
August 11, 2010 at 7:58 am
sc-w (8/11/2010)
August 11, 2010 at 7:49 am
donmakaveli41 (8/11/2010)
The column prefix 'a' does not match with a table name or alias...
August 11, 2010 at 7:24 am
The order by in the window function in the CTE in your original query will return a random row from the available dupes.
Is this intentional?
August 11, 2010 at 7:22 am
donmakaveli41 (8/11/2010)
Chris Morris-439714 (8/11/2010)
What about alias ata?
where ata.type_name = a.type_name AND at.simulator = 0 AND f.atd IS NOT NULL
Yes I've edited my post to correct this. It's not like that...
August 11, 2010 at 7:04 am
rjohal-500813 (8/11/2010)
Memorise all this and you are bound to ace the exam...
ROTFLOL! 😀
August 11, 2010 at 6:48 am
What about alias ata?
where ata.type_name = a.type_name AND at.simulator = 0 AND f.atd IS NOT NULL
If I were you I'd chuck out this query and start again, it looks like...
August 11, 2010 at 6:24 am
dennisv (8/11/2010)
I'm hoping someone can combine these (or at least the last two) for me which should speed it up a lot.
I know this will take some time and thank...
August 11, 2010 at 6:08 am
-- make some sample data
DROP TABLE #Archive
DROP TABLE #Current
CREATE TABLE #Current (objectId INT IDENTITY(1,1), Data1 VARCHAR(5), lastModified DATETIME)
INSERT INTO #Current (Data1, lastModified)
SELECT 'A', GETDATE()-5 UNION ALL
SELECT 'B', GETDATE()-4 UNION ALL
SELECT...
August 11, 2010 at 5:09 am
You could try preaggregating the source query:
;WITH ParameterList AS (
SELECT convert(varchar(max),decryptbypassphrase('SKey',PARAMETERNAME)) PARAMETERNAME
FROM MST_PARAMETER
),
Preaggregate AS (
SELECT PARAMETERNAME, -- extra columns required here
Col1 = SUM(Col1),
Col2 = SUM(Col2),
Col3 =...
August 11, 2010 at 4:04 am
LutzM (8/10/2010)
GilaMonster (8/10/2010)
August 11, 2010 at 2:12 am
Viewing 15 posts - 7,531 through 7,545 (of 10,144 total)