Viewing 15 posts - 301 through 315 (of 327 total)
That may be but I think(?) it works across all option settings and compatibility versions.
March 23, 2005 at 8:00 am
How about this?
select Ltrim(Isnull(first_name,'') + ' ') +
Ltrim(Isnull(middle_name,'') + ' ') +
Ltrim(Isnull(last_name,'') + ' ') +
Ltrim(Isnull(suffix,'')) as FullName
March 22, 2005 at 5:51 pm
You got me! The LTrim does help in cases where only the title or middle name can possibly be null.
March 22, 2005 at 12:25 pm
Select Ltrim(ISNULL(FirstName, '') + Ltrim(ISNULL(middlename , '') )+ Ltrim(ISNULL(lastname , ''))+ Ltrim(ISNULL(suffix, '')) as FullName from dbo.Contacts
March 22, 2005 at 12:04 pm
"...operation will always force an index scan, while the like operator can use the index seek..."
Remi,
Could you please explain the difference between an index scan and an index seek.
thanks,...
March 22, 2005 at 11:40 am
Select count(*),
((Select count(*) From YourTable Where PlanCode = YT.plancode) /
(Select count(*) From YourTable) * 100 ) as [Percent],
PlanCode
From YourTable YT
Group by PlanCode
There's gotta be a better way
March 17, 2005 at 6:15 pm
Noel,
Why do you say it is correct to have ansi_nulls set to OFF?
ron
March 16, 2005 at 11:23 am
I would like to correct my previous statement. I did some testing and it appears that in the case of a "severe" error causing the proc to abort the return...
March 16, 2005 at 11:20 am
That depends on how you have ANSI_NULLS set. When ANSI_NULLS = ON then a comparison to a null value will yield a result of FALSE and a check for IS...
March 16, 2005 at 10:38 am
If you check you might find that in this case your chid proc is returning NULL for a return code.
If that's the case you can reslove the failure to catch...
March 16, 2005 at 9:47 am
Can we assume that all the "matching" records in table b are not exaclty the same? So what is different about these matching records?
March 14, 2005 at 9:56 am
Try prepending the owner to the function name example:
Create function dbo.CalcInterest( ...
March 10, 2005 at 9:32 am
I have now tested my previous 'solution' and it needs a small modification. The following select gets you the correct data. You can use it in conjuction with an Insert...
March 10, 2005 at 8:47 am
I haven't tested this but if may give you what you are looking for.
Select a.owner as owner1,
b.owner as owner2,
a.VIN
From YourTable a
Left Outer Join YourTable b
...
March 9, 2005 at 6:20 pm
I think what Tal is trying to tell you is that you created AddressID as a surrogate key and that's fine. But the surrogate key is standing in for the logical primary...
March 7, 2005 at 6:03 pm
Viewing 15 posts - 301 through 315 (of 327 total)