Viewing 15 posts - 391 through 405 (of 562 total)
spaghettidba (4/19/2014)
Oh, I see what you mean.Try this:
Tried the solution.
And I am trying to understand the solution.
First the solution does not work if the target table is larger than the...
April 19, 2014 at 4:53 am
spaghettidba (4/18/2014)
Well, it worked on the sample data you provided.If you gave us more significant sample data, maybe someone could come up with something better.
Both tables where of the same...
April 18, 2014 at 5:42 pm
print '-- Start of use_value.full_name_txt : '+convert(varchar(30),getdate(),126)
--
-- Get the max from the use_value table.
--
declare @Max_number int
select @max_number = count(*) from use_value
print 'number use_value, full_name_txt :'+convert(varchar(10), @max_number)
;
WITH
T...
April 18, 2014 at 1:25 pm
ben.brugman (4/18/2014)
spaghettidba (4/18/2014)
WITH T1 AS (
SELECT *, randowCol = NEWID()
FROM Target
),
T2 AS (
SELECT *, RN = ROW_NUMBER() OVER (ORDER BY randowCol)
FROM T1
)
UPDATE T2
SET full_name_txt = (SELECT column1 FROM Use_value V...
April 18, 2014 at 1:08 pm
spaghettidba (4/18/2014)
WITH T1 AS (
SELECT *, randowCol = NEWID()
FROM Target
),
T2 AS (
SELECT *, RN = ROW_NUMBER() OVER (ORDER BY randowCol)
FROM T1
)
UPDATE T2
SET full_name_txt = (SELECT column1 FROM Use_value V WHERE...
April 18, 2014 at 10:23 am
ScottPletcher (4/18/2014)
You don't want to modify the target table structure, as that will have lots of overhead.
Actually adding a RND column to the table, using it and removing it hardly...
April 18, 2014 at 9:43 am
spaghettidba (4/18/2014)
My bad.The subquery returns always the same value because it is not correlated with the outer query.
Well, looks like you solved your issue.
This was the old solution.
But I...
April 18, 2014 at 8:23 am
spaghettidba (4/18/2014)
UPDATE T2
SET SomeColumn = RandomValues.SomeValue
FROM Table2 AS T2
CROSS APPLY (
SELECT TOP(1) SomeValue
FROM Table1
...
April 18, 2014 at 7:23 am
Brandie Tarvin (4/16/2014)
FYI: I added semi-colons to the above statements so you don't have to stick a ; before the WITH CTE statement. Not that it helps. Your lines don't...
April 16, 2014 at 8:11 am
Thanks Lowell for the example.
I am trying to order the data which I have. Which is the relations between the 'child' and 'parent'.
So I took your example and 'removed' the...
April 16, 2014 at 3:38 am
SQL Guy 1 (3/24/2014)
I need to find a count of records within...
March 25, 2014 at 10:27 am
Similar question from here.
Regulary I want to import Excel files. (Or CSV files).
Extention is known.
Format is not predetermined.
Is there a solution for this ?
A general solution which imports data without...
March 25, 2014 at 10:02 am
JohnFTamburo (3/24/2014)
1. What problems are you running into prior to using the SP?
2. Exactly what solution are you trying to accomplish that the DTSX is not accomplishing for you?
The question...
March 25, 2014 at 6:12 am
SQLRNNR (2/6/2014)
You can try this code that may get some execution counts for the function you are investigating.
Thanks for the script, in the script I noticed a number of nested...
February 6, 2014 at 9:14 am
Eugene Elutin (2/6/2014)
But it has nothing to do with...
February 6, 2014 at 8:02 am
Viewing 15 posts - 391 through 405 (of 562 total)