Viewing 15 posts - 9,946 through 9,960 (of 10,144 total)
asmaa.sbaihi, you should run some experiments to establish exactly what you need in your query.
Something along the lines of...
This is your baseline, run it and record the results:
SELECT COUNT(DISTINCT(RecordedCalls.ID)) AS...
March 5, 2008 at 10:19 am
JLSSCH (3/4/2008)
All (especially Ralph):There are three JOIN clauses and only two ON clauses. Each JOIN clause should have a corresponding ON clause.
Again, good luck all!!!!
Nope, the joins are correctly...
March 5, 2008 at 9:41 am
Nice bit of investigative work there, Tim. Who would have guessed it from the error message?
Cheers
ChrisM
March 4, 2008 at 2:37 am
I'm sorry Tim. Better luck tomorrow.
March 3, 2008 at 10:03 am
Aha! I think you want to do it this way round...
UPDATE i SET catalogue_number = a.nwCode
FROM [sage].cleaningnet.dbo.ImportTimStock i
INNER JOIN ProductsWaitingApproval a
ON a.sku COLLATE SQL_Latin1_General_CP1_CI_AI = i.product --COLLATE Latin1_General_CI_AS...
March 3, 2008 at 9:56 am
Nice work, Srdjan! And...good point as always, Matt.
It's not often that this technique actually speeds up a process; it's more useful as a tool for analysing and simplifying long, overcomplex...
March 3, 2008 at 9:38 am
Grrr!
Have you recorded the collation cast of a.sku and i.product?
March 3, 2008 at 9:30 am
Hi Tim
This should do it...
UPDATE i SET catalogue_number = a.sku
FROM [sage].cleaningnet.dbo.ImportTimStock i
INNER JOIN ProductsWaitingApproval a
ON a.sku = i.product COLLATE Latin1_General_CI_AS
INNER JOIN [tmCleaningNet].dbo.products b ...
March 3, 2008 at 9:10 am
Thanks for the prompt reply Tim. I've seen this error before doing the same i.e. updating a table on one server from another linked server, where the collation is different....
March 3, 2008 at 8:40 am
Try this, Tim. If the SELECT works ok, then comment the SELECT and uncomment the UPDATE.
--UPDATE i SET catalogue_number = a.sku COLLATE Latin1_General_CI_AS
SELECT i.ImportTimStock, a.sku COLLATE Latin1_General_CI_AS
FROM [sage].cleaningnet.dbo.ImportTimStock i
INNER JOIN...
March 3, 2008 at 8:15 am
eddy (3/3/2008)
I have managed to come to a solution in the following way,
Can any expert please advice me if this is the right way to do this,
SELECT ...
March 3, 2008 at 7:42 am
Srdjan Svrdlan (3/3/2008)
So did anyone have time to look at the execution plans?
No, not yet, but playing with the code, it seems that this whole query could be "tamed" considerably...
March 3, 2008 at 6:05 am
You're welcome Ryan. If you're not already familiar with this type of structure - the inner SELECT - then read up on derived tables. The generally accepted term for the...
February 29, 2008 at 1:34 pm
David Jackson (2/29/2008)
I mean I knew you could do this without a correlated sub-query, but I was struggling...
February 29, 2008 at 9:35 am
VAIYDEYANATHAN.V.S (10/25/2007)
How to convert mm/dd/yyyy date format to yyyymmdd -try this!!!!!!!!!!
The link relates specifically to Excel and is of little or no use in this context.
February 29, 2008 at 9:19 am
Viewing 15 posts - 9,946 through 9,960 (of 10,144 total)