Viewing 15 posts - 33,241 through 33,255 (of 59,099 total)
SQLRNNR (7/19/2011)
WayneS (7/19/2011)
Gianluca Sartori (7/19/2011)
Ninja's_RGR'us (7/19/2011)
Gianluca Sartori (7/19/2011)
There's someone you all know that deserves your vote here[/url].I'm sure you know who I'm talking about. 😉
Wow Jeff must make a nice...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2011 at 10:53 am
Ninja's_RGR'us (7/19/2011)
Jeff Moden (7/18/2011)
Ninja's_RGR'us (7/18/2011)
Holly Koch (7/18/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2011 at 10:29 am
kramaswamy (7/18/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2011 at 10:44 pm
This will do it provided you understand that it will end the line with a CRLF
DECLARE @vCmd VARCHAR(8000)
DECLARE @vCLUEDATE VARCHAR(MAX)
DECLARE @vWorkfilename VARCHAR(MAX)
SET @vCLUEDATE = '000000001EFHRCF01FF 20110718205227VERI2011071820110718 2'
SET @vWorkfilename = 'c:\test.txt'
Select...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2011 at 8:28 pm
I'm not sure you can use an alternate answer but if you replace the spaces with underscores, all the problems vanish.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2011 at 7:52 pm
Interesting problem. I you remove the space before the 2 or change it to another character, the space after the string in the file goes away with your first...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2011 at 7:15 pm
Ninja's_RGR'us (7/18/2011)
Holly Koch (7/18/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2011 at 6:41 pm
heard.nathan (7/18/2011)
Thanks everyone. I'm going to ignore my co-worker and start working towards my new career.
Don't just ignore your co-worker... AVOID your co-worker. Too much negativity there. ...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2011 at 6:14 pm
In the T-SQL side of the house, "special" characters a created using CHAR(n) where "n" is the ASCII number of the character. For example, a TAB character is CHAR(9)....
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2011 at 5:58 pm
I'm just double checking here... has anyone come up with a solution that actually works for this?
Scratch that. I see that R. Brush has one.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2011 at 5:47 pm
My solution is a whole lot longer but, I believe, it may be easier for a newbie to understand and, possibly, maintain. It also gives a full accounting if...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2011 at 5:34 pm
I'm thinking we're not actually looking for a hard coded answer here, folks. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2011 at 4:22 pm
barsuk (7/18/2011)
Set @FileName ='12304208348300'
SELECT REPLACE(Left(Convert(Varchar,Convert(Money,@FileName),1),Len(Convert(Varchar,Convert(Money,@FileName),1)) - 3),',','.')
12.304.208.348.300
Not sure what the problem was?
I know that this code has limitations, but for the values specified earlier in the thread...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2011 at 4:05 pm
GilaMonster (7/18/2011)
Jeff Moden (7/17/2011)
Ummm... isn't MCM only two weeks long?The MCM is 2 exams, no training component. The chance of passing without finding some suitable training however....
Wasn't there...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2011 at 11:31 am
Tim O'Brien-386385 (7/13/2011)
By far the easiest...convert to money, format, strip decimal point:Print Reverse(SubString(Reverse(Convert(varchar,Convert(Money,1234567891011),1)),4,99))
Prints 1,234,567,891,011
That will also likely be one of the slowest methods. "Reverse" is a very expensive function....
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2011 at 7:09 am
Viewing 15 posts - 33,241 through 33,255 (of 59,099 total)