Viewing 15 posts - 1,231 through 1,245 (of 4,080 total)
I will add, for those who are interested, this table supports a dynamic form-builder application. Users create their own custom forms with any number of custom fields of string,...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
December 21, 2010 at 9:24 am
Can you even change the EAV to use type SQL_VARIANT?
declare @testFieldType table(fieldId int, code varchar(20))
declare @testDocDataFieldValues table(fieldId int, fieldvalue SQL_VARIANT)
insert into @testFieldType values (1, 'fieldTypeNumeric')
insert into @testFieldType values (2, 'fieldTypeString')
insert...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
December 20, 2010 at 4:26 pm
What is "reader" ??
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
December 20, 2010 at 1:03 pm
Congratulations, Gianluca 😀
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
December 20, 2010 at 9:50 am
ROW_NUMBER() is an EXCELLENT way of identifying dups and getting rid of all but one.
Good job.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
December 19, 2010 at 10:34 pm
pdanes2 (12/19/2010)
I only looked at this briefly but I'd say the WHERE clause is totally unnecessary. Unless someone messed with the server-wide settings, NULLs won't join anyway.
Hmm, yes, I...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
December 19, 2010 at 9:47 am
I have this huge table. The SELECT perfromance is very bad. So I was thinking to add more indexes, which of course will affect INSERT perfromance. So I was just...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
December 17, 2010 at 10:04 pm
I wonder, might it be worthwhile for the initial load to create separate Boolean fields whose values corresponds to the results of such queries? That is, one Boolean field...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
December 17, 2010 at 9:33 pm
Here is an example of pulling 20 random rows from a million row table.
Note to Jeff Moden: It may not be "Nasty Fast" but it's "Wicked Quick" 😀
Had...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
December 17, 2010 at 11:53 am
Using ORDER BY NEWID() with huge files is slow, because of the sort time.
Generating TOP (X) WHERE (random number test) is fast, but tends to skew towards the front of...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
December 16, 2010 at 5:10 pm
Anytime you don't know the tables in advance, you will have to use dynamic SQL to get there. Either way, you may find the Cross Apply easier...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
December 16, 2010 at 3:25 pm
You tell 'em, Steve !!!
I wander in here for the first time in a month and get bombarded with utterly useful technical information.
Now I know how...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
December 15, 2010 at 6:05 pm
Sorry for the delay, I was working at my paying job. 😉
This should work for you too if you are running SQL2008.
In production, you should consider indexing...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
December 15, 2010 at 5:55 pm
Put a PRINT @sql statement right before EXEC sp_ExecuteSQL and lets see what values you are passing.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
December 8, 2010 at 1:37 pm
You can use a WHERE clause with an UPDATE statement in T-SQL.
UPDATE Table
SET database_name = db_name()
WHERE database_name IS NULL
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
December 7, 2010 at 5:21 pm
Viewing 15 posts - 1,231 through 1,245 (of 4,080 total)