Viewing 15 posts - 7,726 through 7,740 (of 10,143 total)
You're getting there, but you need to take another look at your tables, there should be many more than the two listed. I'd guess about 15.
For instance:
Table StationVehicles
StationVehTypeID VehicleTypeStation...
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
June 29, 2010 at 8:51 am
Paul White NZ (6/29/2010)
Too many of the players seem to be to be over-paid, under-talented, whining, cheating prima donnas.
Well said Paul, couldn't agree more.
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
June 29, 2010 at 7:40 am
scottichrosaviakosmos (6/29/2010)
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
June 29, 2010 at 7:31 am
Kingston Dhasian (6/29/2010)
No idea why the OP is getting an error.
Me neither Kingston but it's always nice to have an alternative.
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
June 29, 2010 at 4:29 am
eng.khiat (6/29/2010)
(
SELECT top 10 * FROM tableX ORDER BY ID DESC
) AS A
ORDER BY A.ID ASC
It gives error and when i searched...
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
June 29, 2010 at 4:08 am
Potso, none of your sample data posts match up with each other, the column names and contents are all over the place, and your query would generate an error if...
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
June 29, 2010 at 3:32 am
Import the contents of the flat file into a staging table in your db. Assume the data is dirty.
Perform any necessary validation against the staging table - including dupe-flagging.
Transfer...
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
June 29, 2010 at 2:51 am
canuzun (6/28/2010)
Thanks for the tip.Only curious, is it possible to create the second table, from the first one with single query?
Of course. SELECT...INTO...FROM...
Best practice is to check for existence of...
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
June 29, 2010 at 2:28 am
Coffindodger
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
June 29, 2010 at 2:23 am
priya__ (6/28/2010)
I cannot use SUM as I am counting a Key column here and if I use sum it will sum up the columne instead...
I have...
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
June 28, 2010 at 10:04 am
Or this way:
;WITH FastAggregate AS (
SELECT , col1, COUNT(*) AS RowCounts
FROM table1
GROUP BY , col1
)
SELECT ,
SUM(CASE WHEN col1 IS NULL THEN RowCounts END) AS 'nullcnt',
SUM(CASE WHEN col1...
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
June 28, 2010 at 8:33 am
Gianluca Sartori (6/28/2010)
Sorry for echoing, Gail...
Et tu, Gianluca.
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
June 28, 2010 at 8:08 am
The simple CASE uses equivalence: CASE i WHEN NULL is the same as CASE WHEN i = NULL...
To check for NULLS you must use the searched CASE: CASE WHEN...
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
June 28, 2010 at 8:05 am
rjohal-500813 (6/28/2010)
Who'd have thought that the loss of a point would cause such collective bed-wetting
The question reads "What will be the output of the following?" and none of the answers...
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
June 28, 2010 at 7:32 am
mohanaraj (6/28/2010)
...I want to insert the record in to a table using bulk insert method fro that I use the below...
It's good practice to use a staging table...
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
June 28, 2010 at 7:21 am
Viewing 15 posts - 7,726 through 7,740 (of 10,143 total)