Re: SQL Select Query with String Manipulation

From: justme <paulq_at_rogers.com>
Date: Thu, 24 Oct 2002 21:56:30 GMT
Message-ID: <i0_t9.61497$mxk1.52197_at_news04.bloor.is.net.cable.rogers.com>


look at "replace" function
"Andrew Cox" <a7t2fz001_at_sneakemail.com> wrote in message news:c40fc812.0210241337.76edb331_at_posting.google.com...
> Hi,
>
> I'm trying to do a little string manipulatin within a SQL Select
> statement and I'm not sure if it's possible or not. Here's the type
> of data that I have in the field I'm concerned with:
>
> DESCR:
> ------
> 02 A code with description
> 24 Some description here
> 42 Another Description here
> A description without a corresponding code
> Another description without a code
>
> Okay ... what I want to do is strip the number codes from the
> descriptions that have them *within* the SQL Select query. I need to
> do it within the query because of other constraints (I have to pass
> the whole query to a ColdFusion custom tag). The problem as I see it
> is that not all of the fields will have the leading code (though most
> of them do).
>
> Is it possible to do that kind of string manipulation within the
> SELECT statement?
>
> Thanks for your help!
Received on Thu Oct 24 2002 - 23:56:30 CEST

Original text of this message