Viewing 15 posts - 1,936 through 1,950 (of 1,957 total)
EDIT: forget it - when I figure out how to post results I will try again!
April 28, 2009 at 5:33 am
You have a unique index, so you could use it.
INSERT YOURTABLE( blah,blah2,blah3 etc)
SELECT blah,blah2,blah3 etc
FROM YOUROTHERTABLE T1
LEFT OUTER JOIN YOURTABLE T2
ON T1.unique_index_part1=T2.unique_index_part1
AND T1.unique_index_part2=T2.unique_index_part2
AND T1.unique_index_part3=T2.unique_index_part3
WHERE T2.some_column_that_does_not_allow_nulls IS NULL
April 24, 2009 at 9:02 am
You can do it with a recursive CTE - without sample data to show you, you had better google that (actually just remembered that the MSDN entry for CTEs uses...
April 24, 2009 at 8:54 am
Derek Dongray (4/24/2009)
Bob Hovious (4/23/2009)
April 24, 2009 at 5:50 am
that is a line feed character. It makes me wonder how the data got that in.:)
Try updating the column by replacing char(10) in the data with ''
April 23, 2009 at 12:13 pm
you could try converting the column to varbinary and checking the hex values to see what is really in there.
April 23, 2009 at 11:57 am
Check the collation on the database and column.
Try using
WHERE UPPER(myColumn) = UPPER('Whatever')
OR
WHERE myColumn = 'Whatever' COLLATE Latin1_General_CI_AS
...just to test if it is a case sensitive collation issue
April 23, 2009 at 11:45 am
Johann Montfort (4/14/2009)
cool that workedthe trick is the LEFT OUTER JOIN eh?
Yes, because with that join you get all the records from the left (or base) table and can then...
April 14, 2009 at 6:51 am
Johann Montfort (4/14/2009)
I have the following code at the moment
SELECT * FROM
(
SELECT vidID, vidDate, vidTitle, vidDesc, AddedBy, OnlyForMembers, ViewCount,
ROW_NUMBER() OVER...
April 14, 2009 at 6:42 am
Have you really got no indexes?
I can't imagine a set based approach working well without indexes when you have millions of records.
April 14, 2009 at 6:06 am
I agree - BAH! MDX is not T-SQL. I am going to tell my mummy!
April 14, 2009 at 6:02 am
Out of curiosity, I had a play with replace()....
using this stored proc:
CCREATE PROCEDURE #usp_print_lines
@text NVARCHAR(MAX)
AS
DECLARE @eol nvarchar(22)
SET @eol=N''' UNION ALL SELECT '''
SELECT @text= N'SELECT '''+REPLACE(REPLACE(REPLACE(@text,N'''',N''''''),CHAR(13) + CHAR(10),@eol),CHAR(10),@eol)+''''
EXEC(@text)
--- Return lines
I...
April 13, 2009 at 6:26 pm
Peso, you seem to have got that spot on now - I have run through a few different sets of data from low to high population and it is quick...
April 13, 2009 at 4:36 am
Peso (4/13/2009)
Record 80 and 81 are mutually exclusive, because they have no common columns populated so both records fulfill the criteria of...
April 13, 2009 at 3:15 am
Peso (4/13/2009)
I guess everyone's happy with the suggestion posted 4/10/2009 8:44 PM?
Peso, really interesting take on it, but it doesn't seem to work on my test data - unless I...
April 13, 2009 at 3:06 am
Viewing 15 posts - 1,936 through 1,950 (of 1,957 total)