Viewing 15 posts - 7,726 through 7,740 (of 15,381 total)
Please post data in a consumable format so we can work on your problem instead setting it up. The main reason you are struggling with this is because you multiple...
June 28, 2013 at 7:53 am
And if at all possible you should consider splitting these attributes into their own rows. Storing multiple values in a single field violates first normal form.
June 28, 2013 at 7:42 am
A couple of thoughts. First it might be a lot easier to do this by adding ROW_NUMBER to your query, then you can just a Where RowNum < @N
Secondly, and...
June 28, 2013 at 7:41 am
In addition to using a tally/numbers table you might also want to take a look at this article from Lynn. It has a collection of excellent methods for finding certain...
June 28, 2013 at 7:33 am
Here is the solution. http://www.sqlservercentral.com/articles/71550/%5B/url%5D
June 28, 2013 at 7:30 am
Since nobody has said it yet....any chance you can change your datatype in the table to be a datetime? You really should be storing datetime information in a datetime column....
June 28, 2013 at 7:24 am
realvilla (6/27/2013)
June 27, 2013 at 2:31 pm
valeryk2000 (6/27/2013)
I do not think that to use cte in my case is a good idea - I use this...
June 27, 2013 at 2:01 pm
Let's take the excellent example from David and turn it into a iTVF instead of a scalar function.
create FUNCTION dbo.fnExtractDigits (@inString VARCHAR(8000))
RETURNS table
return
select SubString(
SubString(@inString, PATINDEX('%[0-9]%', @inString), Len(@inString)), 0,
PATINDEX('%[^.0-9]%', SubString(@inString,PATINDEX('%[0-9]%',@inString),Len(@inString))))...
June 27, 2013 at 1:34 pm
I would recommend NOT doing this as a scalar function. Scalar functions are not good for performance. You can easily leverage the DelimitedSplit8K function for this.
select top 1 *
from dbo.DelimitedSplit8K('NYSTATIN...
June 27, 2013 at 1:10 pm
TryingToLearn (6/27/2013)
Thanks, is there any relevance to the issue of it taking so long as a SP vs running it in QA?
Did you read my response? I mention that is...
June 27, 2013 at 1:01 pm
j-1064772 (6/27/2013)
Humm....How do you "clean" a hex input ? convert it to string and also check the resulting string ?
I would say you don't, that is kind of like polishing...
June 27, 2013 at 1:00 pm
Ed Wagner (6/27/2013)
Ed Thompson (6/27/2013)
June 27, 2013 at 12:59 pm
Many calls to the same scalar function (dbo.PopulateLoadNew). Is UNION neccesary, or can you use UNION ALL. There is a lot of low hanging fruit for performance in here.
AND (
ISNULL(Hours,...
June 27, 2013 at 12:53 pm
tmummert (6/27/2013)
June 27, 2013 at 10:33 am
Viewing 15 posts - 7,726 through 7,740 (of 15,381 total)