Viewing 15 posts - 18,331 through 18,345 (of 18,926 total)
That's gonna sound harsh : but if you don't wanna code, don't be a coder. There's no shortcut in this situation so stop looking for one. You'd...
March 23, 2005 at 7:06 am
check this out :
if (object_id('test')) > 0
drop proc test
go
create proc test
as
select null
go
select Name, id, crdate, schema_ver from dbo.SysObjects where name = 'test' and xType = 'P'
go
alter proc...
March 23, 2005 at 6:59 am
I can't prove it any faster or slower. Looks pretty much the same.
March 23, 2005 at 6:41 am
It probabely violates all the normal forms...
March 23, 2005 at 6:33 am
Still the same conclusion, you do 4 trims for nothing when none can be used and give out the same results.
March 22, 2005 at 9:22 pm
CASE WHEN CancelDate <= GETDATE() THEN 3
WHEN CancelDate IS NULL AND CONVERT(varchar(10), PaymentEndDate, 111) <= CONVERT(varchar(10), getdate(), 111) THEN 1
ELSE 0
END
March 22, 2005 at 2:47 pm
HTH. Did you change the collation only in the query or in the table DDL?
March 22, 2005 at 12:32 pm
BTW you didn't answer why you are inserting xml in the db..
I think I would go with a design similar to this one :
Create table a
( PK int not...
March 22, 2005 at 12:30 pm
Damn, forgot to make you check the provider, it's always a good place to check.
March 22, 2005 at 12:25 pm
Index scan :
Sql server will analyse ALL the rows of the index and check if Left(.....
So 1 000 000 rows = 1 000 000 checks.
Index seek :
Sql server...
March 22, 2005 at 12:20 pm
Where are you concatenating the spaces between the fields?
Also I think this version would be slower than mine as you call LTrim and ISNULL 4 times/row while I only call...
March 22, 2005 at 12:06 pm
Hence my second post :
print 'SET CONCAT_NULL_YIELDS_NULL ON '
SET CONCAT_NULL_YIELDS_NULL ON
Select null + 'A'
print 'SET CONCAT_NULL_YIELDS_NULL OFF '
SET CONCAT_NULL_YIELDS_NULL OFF
Select null + 'A'
SET CONCAT_NULL_YIELDS_NULL ON
...
March 22, 2005 at 12:03 pm
What's the size of the fields?
What's the size of the table (100 millions of rows of much smaller)?
Is is something like toggle field, (always 1 field filled but never both...
March 22, 2005 at 11:56 am
[EDITED]
Forgot to mention that must must have CONCAT_NULL_YIELDS_NULL ON for this query to work :
if null = null
print 'RUN CONCAT_NULL_YIELDS_NULL ON'
else
print 'you''re set'
March 22, 2005 at 11:53 am
Viewing 15 posts - 18,331 through 18,345 (of 18,926 total)