Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mystical
Starting Member
10 Posts |
Posted - 2011-09-16 : 13:14:34
|
| Part of my existing code reads as (trim(nm.nme_ttl_cde) ||'. '||trim(nm.frs_nme_txt))|| ' ' ||nm.snm_txt as Customer,which produes the resultMr. James Smithhow can i adjust the code to produce the resultMr. J. SmithWith thanksBob |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-16 : 13:21:55
|
| use SUBSTR function------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
mystical
Starting Member
10 Posts |
Posted - 2011-09-16 : 14:03:24
|
| Thank you, but i am new to this - how do i incorperate it into the existing code ? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-16 : 14:07:42
|
| (trim(nm.nme_ttl_cde) ||'. '||substr(trim(nm.frs_nme_txt)),1,1)|| '. ' ||nm.snm_txt as Customer,------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
mystical
Starting Member
10 Posts |
Posted - 2011-09-16 : 15:27:12
|
| Sorry but it keep coming up as "Syntax error expecting something between the ")" and ")"I have kept trying to re adjust the ), but i still get the same answer. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
mystical
Starting Member
10 Posts |
Posted - 2011-09-16 : 16:28:17
|
| Thank you the second "trim" was not required and the i get the result i was after using your substring code. |
 |
|
|
|
|
|