Viewing 15 posts - 8,626 through 8,640 (of 10,143 total)
Something like this should do the trick, Joseph:
INSERT INTO TableB ([column list])
SELECT ([matching column list from TableA] including GETDATE() AS DateUpdated)
FROM TableA a
LEFT JOIN TableB b
ON b.[four digit...
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
March 27, 2009 at 4:23 am
Mark beat me to it - but here's a slightly different way:
-- make some sample data
DROP TABLE #sales
CREATE TABLE #sales (productname VARCHAR(20), turnover MONEY)
INSERT INTO #sales (productname, turnover)
SELECT 'redwine', 40...
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
March 27, 2009 at 3:57 am
Is this what you're looking for?
-- make up some sample data
DROP TABLE #tbl_Listings
CREATE TABLE #tbl_Listings (Location VARCHAR(20), Price MONEY)
INSERT INTO #tbl_Listings (Location, Price)
SELECT 'RM10', 100000 UNION ALL
SELECT 'RM20', 200000 UNION...
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
March 27, 2009 at 2:34 am
bhuwnesh.kumar (3/27/2009)
How these values can be converted to simple...
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
March 27, 2009 at 2:19 am
foxjazz (3/26/2009)
Or a cube drawn on paper, and how the perspective can change.
I liken doing...
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
March 26, 2009 at 10:06 am
Blimey Gus, just as a matter of interest (and on a hunch after reading something Gail wrote some time ago) I set this up with a correlated subquery to compare...
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
March 26, 2009 at 10:04 am
Luke L (3/26/2009)
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
March 26, 2009 at 9:30 am
Grant Fritchey (3/26/2009)
Besides, I've operated nuclear power plants while inebriated (not my fault, my chief liked drinking partners) and nothing happened.
If anybody wants to know what Grant looked like...
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
March 26, 2009 at 8:37 am
Here's some sample data:
DROP TABLE #Question
CREATE TABLE #Question(
[ID] [bigint],
[UserID] [bigint] NULL,
[VisitorID] [bigint] NULL,
[Text] [varchar](20) NULL,
[TimeStamp] [datetime] NOT NULL,
[ViewCount] [bigint] NOT NULL,
[MetaKeywords] [nvarchar](50) NULL,
[MetaDescription] [nvarchar](50) NULL,
[PageURL] [nvarchar](50) NULL,
[CategoryID] [bigint] NULL,
[LocationID]...
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
March 26, 2009 at 8:16 am
sorry I am unable to get your point please explain again !
Check the [ID] column in your table. Is it unique or does it have duplicates?
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
March 26, 2009 at 7:20 am
Roy Ernest (3/26/2009)
Just hop over on the next plane to Curacao. You can lie down on the beach and drink what ever you want. I will take care...
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
March 26, 2009 at 7:17 am
Can you run this query and post the results, please? You may wish to change sensitive data but if you do, please explain exactly which columns have been changed.
SELECT TOP...
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
March 26, 2009 at 7:10 am
musab (3/26/2009)
Column2 is the Source Column
I need to concatinate both the columns and then need to Remove the duplicates
The rows are complete duplicates all the data...
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
March 26, 2009 at 6:32 am
musab (3/26/2009)
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
March 26, 2009 at 6:07 am
Can you tell us something about the distribution of values in column1? Does the column have unique values which could be omitted from your process?
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
March 26, 2009 at 5:54 am
Viewing 15 posts - 8,626 through 8,640 (of 10,143 total)