Viewing 15 posts - 18,331 through 18,345 (of 18,923 total)
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
Select ISNULL(FirstName + ' ', '') + ISNULL(middlename + ' ', '') + ISNULL(lastname + ' ', '') + ISNULL(suffix, '') as FullName from dbo.Contacts
March 22, 2005 at 11:46 am
Forgot to mention this... the first query will run faster (once fixed) because AS400 will be filtering out the results using its own indexes instead of sending out a few...
March 22, 2005 at 11:12 am
That was my point
.
The most likely explanation is that AS400 doesn't understand exactly what you want to filter in the where condition. ...
March 22, 2005 at 11:10 am
Viewing 15 posts - 18,331 through 18,345 (of 18,923 total)