September 21, 2007 at 10:28 am
you gotta try what i posted: you end up with a 15 character string with the preceeding zeros you requested.
SELECT RIGHT('000000000000000' + CONVERT(VARCHAR,1),15)
SELECT RIGHT('000000000000000' + CONVERT(VARCHAR,86456),15)
SELECT RIGHT('000000000000000' + CONVERT(VARCHAR,765486456),15)
SELECT RIGHT('000000000000000' + CONVERT(VARCHAR,SomeColumnName),15)
SELECT RIGHT('000000000000000' + CONVERT(VARCHAR,@SomeVariable),15)
Lowell
September 21, 2007 at 5:51 pm
Ya gotta love those that don't even try the suggestions given... guess these "experts" can just look and see "bad code"
I'm not sure I'd have been so gracious, Lowell
--Jeff Moden
Change is inevitable... Change for the better is not.
September 24, 2007 at 12:10 am
Lowell (21/09/2007)
you gotta try what i posted: you end up with a 15 character string with the preceeding zeros you requested.
SELECT RIGHT('000000000000000' + CONVERT(VARCHAR,1),15)
SELECT RIGHT('000000000000000' + CONVERT(VARCHAR,86456),15)
SELECT RIGHT('000000000000000' + CONVERT(VARCHAR,765486456),15)
SELECT RIGHT('000000000000000' + CONVERT(VARCHAR,SomeColumnName),15)
SELECT RIGHT('000000000000000' + CONVERT(VARCHAR,@SomeVariable),15)
<DIV id=_ctl1_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl6_smAuthorName_SimpleMenuDivLayer style="DISPLAY: inline" onclick="InstantASP_OpenMenu('_ctl1_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl6_smAuthorName','_ctl1_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl6_smAuthorName_SimpleMenuDivLayer','
|
','165px');" onmouseover="InstantASP_OpenMenuMouseOver('_ctl1_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl6_smAuthorName','_ctl1_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl6_smAuthorName_SimpleMenuDivLayer','
|
','165px');">Lowell,
thx again it is work.. i forget the convert parts.. 😉 that is why it didn't works.. iam really thankful ...
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply