Viewing 15 posts - 5,326 through 5,340 (of 10,143 total)
Can you write a SELECT which returns the rows you want to copy? If not, what's the date range which identifies rows to copy? This is trivial, is it homework?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 16, 2013 at 6:54 am
You may find this modification easier to work with:
SELECT
x.MonthNo,
x.[Year],
x.[Month],
COUNT(doclinkid) as Registered, -- is this correct?
COUNT(DISTINCT doclinkid) as Registered, -- OR is this correct?
SUM(x.Finalised) as Finalised,
COUNT(*) -...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 16, 2013 at 1:53 am
wolfkillj (1/15/2013)
dwain.c (1/15/2013)
wolfkillj (1/15/2013)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 16, 2013 at 1:02 am
Alan.B (1/14/2013)
Jeff Moden (1/10/2013)
Alan.B (1/10/2013)
This morning before work for example, after a lot of effort, I finally figured out how to get the Levenshtein Edit Distance between 2 strings without...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 15, 2013 at 6:29 am
pwalter83 (1/15/2013)
ChrisM@Work (1/11/2013)
Hi PaulI'll try to have a look over the weekend. Meantime, it's the last 5 mins of my last day here - and it's BEERTIME!
Cheers
ChrisM
Hi Chris,
I am still...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 15, 2013 at 3:32 am
SELECT 'D' + LEFT(CAST(num AS VARCHAR(4))+'0000',4)
FROM abc
SELECT ISNULL('D' + LEFT(CAST(NULLIF(num,0) AS VARCHAR(4))+'0000',4),'0')
FROM abc
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 15, 2013 at 1:35 am
sej2008 (1/15/2013)
Select TOP 50 percent * from Tablename as it is not giving exact 50 percent in my result set .how it...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 15, 2013 at 1:24 am
Hi Paul
I'll try to have a look over the weekend. Meantime, it's the last 5 mins of my last day here - and it's BEERTIME!
Cheers
ChrisM
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 11, 2013 at 9:40 am
pwalter83 (1/11/2013)
ChrisM@Work (1/11/2013)
SELECT SUM(teu) AS TEU
FROM NCV_BL ncv
JOIN MG_VSLVOY_HEADER vh
ON ncv.saisan_VESSEL_CD = vh.VESSEL_CD
AND ncv.saisan_VOYAGE_CD = vh.VOYAGE_NUM
AND ncv.saisan_LEG_CD = vh.LEG_CD
JOIN MG_VSLVOY_PORT_CONTROL vpc
ON...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 11, 2013 at 8:50 am
I think this better fits the spec:
SELECT SUM(teu) AS TEU
FROM NCV_BL ncv
JOIN MG_VSLVOY_HEADER vh
ON ncv.saisan_VESSEL_CD = vh.VESSEL_CD
AND ncv.saisan_VOYAGE_CD = vh.VOYAGE_NUM
AND ncv.saisan_LEG_CD = vh.LEG_CD
JOIN MG_VSLVOY_PORT_CONTROL vpc
ON vh.VSLVOY_HEADER_ID =...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 11, 2013 at 8:23 am
Why do you need to join to the other tables if they aren't contributing to the query, either as output or as a filter?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 11, 2013 at 8:06 am
pwalter83 (1/11/2013)
ChrisM@Work (1/11/2013)
Put that table first in the FROM list and inner join the other tables.
Comment out all of the joins to...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 11, 2013 at 7:30 am
Paul, which table contains column 'teu'? (and 'BL_ID')
Put that table first in the FROM list and inner join the other tables.
Comment out all of the joins to the other...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 11, 2013 at 7:12 am
Composable dml:
INSERT INTO DataStaging_Archive (URN, DateProcessed, AnotherColumn, LastRemainingColumn)
SELECT URN, DateProcessed, AnotherColumn, LastRemainingColumn
FROM (
DELETE TOP (@Batchsize) -- note: no order by, rows picked at random, see BOL
FROM DataStaging ds
...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 9, 2013 at 8:46 am
gchappell (1/8/2013)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 9, 2013 at 6:26 am
Viewing 15 posts - 5,326 through 5,340 (of 10,143 total)