| Author |
Topic |
|
WJHamel
Aged Yak Warrior
651 Posts |
Posted - 2012-02-24 : 13:30:52
|
| I have two varchar columns (MNIPre and MNIEND). MNIpre is populated with 'GCSO99MNI' and MNIEND is populated with a numerical value starting at 100000 and increasing row by row up to 999999. I have a third column (MNINO)i am populating by using:Update MNIONE set MNINO-MNIPRE+MNIEND.What i would expect to get in MNINO is 'DCSO99MNI100000', 'DCSO99MNI1000001', etc, and so on.!@#!! INSTEAD....i am getting 'DCSO99MNI 1000000', 'DCSO99mni 1000001'. I have verified over and over again that there is neither a trailing space at the end of the string in MNIPRE nor a leading space at the beginning of MNIEND. Where is this space coming from?thanks |
|
|
WJHamel
Aged Yak Warrior
651 Posts |
Posted - 2012-02-24 : 13:34:33
|
| Ugh. disregard. I changed the MNIPRE to a varchar(9) and it fixed it. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
WJHamel
Aged Yak Warrior
651 Posts |
Posted - 2012-02-24 : 13:37:07
|
| it's a unique ID we use for the persons in our tables. |
 |
|
|
WJHamel
Aged Yak Warrior
651 Posts |
Posted - 2012-02-24 : 13:37:48
|
| MNINO=MNIPRE+MNIEND |
 |
|
|
WJHamel
Aged Yak Warrior
651 Posts |
Posted - 2012-02-24 : 13:38:38
|
| funny how a little typo creates mass confusion. i love it. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
WJHamel
Aged Yak Warrior
651 Posts |
Posted - 2012-02-24 : 14:02:02
|
| meh |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|