Viewing 15 posts - 4,681 through 4,695 (of 5,685 total)
You'd do something like this:
updatec
setchkdesc=right('0'+rtrim(convert(char,datepart(mm,trandate))),2) + right('0'+rtrim(convert(char,datepart(dd,trandate))),2) + right('0'+rtrim(convert(char,datepart(yyyy,trandate))),2)
FROM
cmledge AS c
JOIN
<periodTable> AS pt
ONc.period = pt.period
wherechkdesc ='0000000'
Note there's some psuedocode in there so you'll have to edit it a bit...
December 8, 2010 at 11:23 am
You can do it with a for xml structure.
Check out this article:
http://www.sqlservercentral.com/articles/FOR+XML+PATH/70203/
December 8, 2010 at 11:21 am
Any chance you can post the sample data and DDL like in the first link of my sig? Will make life much easier.
December 8, 2010 at 11:12 am
venoym (12/8/2010)
I had a thought... this could be extended to account for Times in addition to dates... just move the calculation to the lowest significant field (from day...
December 8, 2010 at 11:11 am
Question is a duplicate, please direct all commentary and responses to the following post:
http://www.sqlservercentral.com/Forums/Topic1031483-392-1.aspx
December 7, 2010 at 4:14 pm
LutzM (12/7/2010)
Craig Farrell (12/7/2010)
One of the nice side effects of constantly being a joker is you can get away with a few comments others would be slammed for.
Nope, I...
December 7, 2010 at 4:12 pm
michael.horn (12/7/2010)
December 7, 2010 at 3:31 pm
GilaMonster (12/7/2010)
Just be aware that fox is another of those 'interesting' people we have around here. Check posting history.
No worries. I have my humor bat handy. One of...
December 7, 2010 at 3:27 pm
doug.milostic (12/7/2010)
There is no "GO" in my code, so must be something else. Thanks for the suggestion though.Cheers
Doug
That was for Drew, Doug, since he specifically asked. No worries. ...
December 7, 2010 at 3:25 pm
Alvin Ramard (12/7/2010)
Craig Farrell (12/7/2010)
GilaMonster (12/7/2010)
Two that produced the 'wtf' reaction tonight...http://www.sqlservercentral.com/Forums/Topic1031451-391-1.aspx
Seriously?
http://www.sqlservercentral.com/Forums/FindPost1031507.aspx
Petty games with words and an attempt to be right?
Nono, it was an attempt to be accurate. ...
December 7, 2010 at 3:00 pm
foxjazzG (12/7/2010)
Well of course, unless your Craig Farrell
Heh, no. I became an administrator and fuddled my way through it mostly because noone around me at the time wanted anything...
December 7, 2010 at 2:59 pm
The Dixie Flatline (12/7/2010)
Jeff Moden (12/6/2010)
The Dixie Flatline (12/6/2010)
December 7, 2010 at 2:44 pm
jayoub1 (12/7/2010)
I understand how to join tables, but dont know how it would help. Once the tables are joined what then.Sorry, I am a newbi
Alright, let's see...
December 7, 2010 at 2:43 pm
GilaMonster (12/7/2010)
Two that produced the 'wtf' reaction tonight...http://www.sqlservercentral.com/Forums/Topic1031451-391-1.aspx
Seriously?
http://www.sqlservercentral.com/Forums/FindPost1031507.aspx
Petty games with words and an attempt to be right?
Nono, it was an attempt to be accurate. C'mon, get it right....
December 7, 2010 at 2:30 pm
Wow, seriously Fox? Man, my High School degree is fading fast.
Short form: Pick up a developer's copy of SQL Server, in specific you want to get your hands...
December 7, 2010 at 2:29 pm
Viewing 15 posts - 4,681 through 4,695 (of 5,685 total)