Viewing 12 posts - 1 through 12 (of 12 total)
just finished my testing and it appears that the derived table is not filtered by what it is linked to.
September 23, 2008 at 7:22 pm
Cool,
do i need to declare the temp table first?
When inserting is it just?
INTO INTO #t1
EXEC sp @param1, @param2
September 18, 2008 at 7:23 pm
SQL2005 Management Studio will not connect to any versions previous to 2000.
I have installed SQL7 enterprise manager and they work fine side by side.
thanks
August 5, 2008 at 5:34 pm
I completely agree, i had never known of any cases where the datetime had to be split - but for what ever reason (unknown to me) this database has it...
May 15, 2008 at 8:11 pm
Thanks guys.
These forums rely on guys like you to share your wealth of knowledge.
- keep up the good work,
cheers,
Paul
May 15, 2008 at 8:08 pm
last stats updated on
TableNAmeIndexNameStatsDate
tblDataLogTraceRawDataPK_tblDataLoggerTrace2008-05-09 17:29:54.317
tblDataLogTraceRawDataTempPK_tblDataLoggerTraceTemp2008-05-12 16:39:55.070
Execution plan
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|--Merge Join(Left Anti Semi Join, MERGE: ([rdt].[DataLoggerTraceID], [rdt].[ReadingDateTime])=([rd].[DataLoggerTraceID], [rd].[ReadingDateTime]), RESIDUAL: ([dbQRSPeriod].[dbo].[tblDataLogTraceRawData].[ReadingDateTime] as [rd].[ReadingDateTime]=[dbQRSPer
|--Clustered Index Scan...
May 12, 2008 at 5:39 pm
ok, i have re-written the proc as follows.
SELECTrdt.DataLoggerTraceID
, rdt.ReadingDateTime
, rdt.Tonnes
, rdt.TonneRate
FROMdbo.tblDataLogTraceRawDataTemp as rdt
WHERE NOT EXISTS(
SELECT 'y'
FROM dbo.tblDataLogTraceRawData rd
WHERE rd.ReadingDateTime = rdt.ReadingDateTime
AND rd.DataLoggerTraceID = rdt.DataLoggerTraceID
)
It is still...
May 12, 2008 at 5:02 pm
The columns names and data types are being provided from the application calling the sp.
May 8, 2008 at 6:04 pm
If i use a local temp table do i use the prefix # ?
ie #tbl123
Is this the best solution?
1.Create the local temp table.
2.Use DynamicSQL to alter the local temp table
eg.
declare...
May 8, 2008 at 6:03 pm
Thanks Michael,
without asking you to write the solution for me (although feel free 🙂 ) , can you point me in the direction of some example code which would be...
April 21, 2008 at 11:32 pm
Viewing 12 posts - 1 through 12 (of 12 total)