Viewing 15 posts - 8,701 through 8,715 (of 15,381 total)
vijay-367524 (4/15/2013)
I have a sql table as below
AutoIdPIDItemIdItemItemValue Date
7560 432 1 Wbc 4 ...
April 15, 2013 at 9:23 am
It works just like the way your joins do. You can't reference a table that has not yet been joined. CROSS APPLY is really nothing more that more complex subselect.
select...
April 15, 2013 at 9:08 am
maxlezious (4/15/2013)
When i run your code, on the second column actType I get '}' with all the results.
For example:
254}
254}
254}
Is it possible for you to remove the '}'...
April 15, 2013 at 9:04 am
With nearly 300 points I assume you have been around here awhile. Please take a few minutes and read the article at the first link in my signature. Then post...
April 15, 2013 at 9:01 am
Melanie Peterson (4/15/2013)
April 15, 2013 at 8:47 am
I think we can do it like this. Basically we just use a word boundary and a simple replace. This will find any values with numbers between 13 and 16...
April 15, 2013 at 8:38 am
parikiti (4/12/2013)
Case 1:the first column can be considered as first one and also there is a time assigned when the that particular row was created like...
April 15, 2013 at 7:48 am
An interesting question. The duplicate ID's was certainly a nasty distraction. I managed to notice the ID issue but wonder what this question was really trying to test/teach. I think...
April 15, 2013 at 7:19 am
parikiti (4/12/2013)
i have updated the sample scripts along with the insert statements...i was just reading guidelines for posting a question,hope that helps..
We are getting there.
The sample data is excellent. That...
April 12, 2013 at 2:59 pm
That is somewhat more clear. What would be best at this point is to post ddl (create table scripts), sample data (insert statements) and sample output based on your sample...
April 12, 2013 at 2:26 pm
Now that you decided to go full on CLR for this you have a myriad of resources for your searches. I found this one which looks pretty good.
http://www.regular-expressions.info/creditcard.html
Here is another...
April 12, 2013 at 2:10 pm
It is pretty scary!! After seeing yours I modified mine slightly to avoid the second cte which means our code is so close to the same it isn't even funny.
;with...
April 12, 2013 at 2:01 pm
LOL I should have refreshed. Seems that Lowell beat me to the punch again.
April 12, 2013 at 1:55 pm
Here is one way using DelimitedSplit8K.
;with split as
(
select AcctNum, Item
from #Data
cross apply dbo.DelimitedSplit8K(FuelType, ';')
)
, SingleVals as
(
select distinct * from split
where Item > ''
)
select AcctNum,
STUFF((select ';' + Item
from SingleVals s2
where...
April 12, 2013 at 1:54 pm
Melanie Peterson (4/12/2013)
April 12, 2013 at 1:39 pm
Viewing 15 posts - 8,701 through 8,715 (of 15,381 total)