[thelist] SQL Question - Drop the last charector of a string

A Maynes andrew at milords.com
Mon Aug 7 09:50:05 CDT 2006


We are looking for a dynamic solution for an image map.  We'd like the
image map to produce a set of results form our DB (MySQL) but the image
map so far is causing problems in posting data, 

Andrew


>-----Original Message-----
>From: Casey Crookston [mailto:caseyc at IntelliSoftmn.com] 
>Sent: 07 August 2006 15:43
>To: thelist at lists.evolt.org
>Subject: Re: [thelist] SQL Question - Drop the last charector 
>of a string
>
>
>As per this tutorial, yes:
>
>http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@
>Generic__
>BookTextView/31275;pt=30441
>
>
>Still having trouble with the actual query.
>
>
>
>-----Original Message-----
>From: thelist-bounces at lists.evolt.org 
>[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Tab Alleman
>Sent: Monday, August 07, 2006 9:35 AM
>To: thelist at lists.evolt.org
>Subject: Re: [thelist] SQL Question - Drop the last charector 
>of a string
>
>Are you also familiar with LEFT() and LENGTH()?
>
>: )
>
>> -----Original Message-----
>> From: thelist-bounces at lists.evolt.org 
>> [mailto:thelist-bounces at lists.evolt.org]On Behalf Of Casey Crookston
>> Sent: Monday, August 07, 2006 10:30 AM
>> To: thelist at lists.evolt.org
>> Subject: [thelist] SQL Question - Drop the last charector of a string
>> 
>> 
>> Using MS-SQL, how would one drop the last character in a string of 
>> unknown length?  We know that the character is, in this case it's a
>> dash: -  But, it could appear more then once in the string 
>and should 
>> only be replaced with nothing when it is the last character in the 
>> string.  Two examples:
>> 
>>  
>> 
>> "Dealers-" would become "Dealers"
>> 
>> "Main-New-" would become "Main-New"
>> 
>>  
>> 
>> I'm familiar with the "replace" function: replace(string, 'string to 
>> replace','replacement value').  But this will replace all 
>instances of 
>> the dash, and not just the last.
>> 
>>  
>> 
>> Any ideas?
>> 
>>  
>> 
>> Thanks!
>> 
>>  
>> 
>> Casey
>> 
>> --
>> 
>> * * Please support the community that supports you.  * * 
>> http://evolt.org/help_support_evolt/
>> 
>> For unsubscribe and other options, including the Tip Harvester
>> and archives of thelist go to: http://lists.evolt.org 
>> Workers of the Web, evolt ! 
>> 
>-- 
>
>* * Please support the community that supports you.  * * 
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 


-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 





More information about the thelist mailing list