RE: SQL Replace Question

2005-02-04 Thread John Stanley
Well, I tested this and it works fine on a 2k db NOT running in
compatability mode, so that is the issue. Now to find a workaround.

-Original Message-
From: John Stanley 
Sent: Friday, February 04, 2005 11:35 AM
To: CF-Talk
Subject: OT:SQL Replace Question


Anyone have any idea why this code will not strip out the spaces in the
string N0P  2L0?

select Replace(postal_code,' ', '') from location where id = 1009637

when I change the last argument to 'X' it throws two X's in like it should.

We are running ms sql 2k in 6.5 compatibility mode, so I dont know if that
is the reason why it wont trim the spaces out.

If this is why, does anyone have a workaround that would work inside a join
clause like 

oin zipinfo z on Replace(z.zip,' ','') = Replace(l.postal_code,' ','') when
running in compatibility mode?

TIA

John



~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:193119
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: A replace question

2000-05-10 Thread Russel Madere

Whoever said this was going public??  ;-)

Actually, I used my MP3 folder to test the concept.

What I need to do is remove the ..\ and the directory immediately before it
in the list.  I got that fixed, but thanks for the tip.

-Original Message-
From: Holger Lockertsen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 10, 2000 11:33 AM
To: [EMAIL PROTECTED]
Subject: RE: A replace question


Remove "..\" this way:

cfif string CONTAINS "..\"
cfset string = Replace(string, "..\", "", "All")
/cfif

Serving MP3's on the web is illegal you know... ;-)


* Holger Lockertsen, Solutions Developer, Horisont Information Systems AS
* Nedre Slottsgate 5, N-0157 OSLO, Noreg/Norway
* 23 31 03 04 / 91 83 20 51
* [EMAIL PROTECTED]   http://www.horisont.no/

NB! Horisont har fått nye nummer, og mitt INTERNNUMMER er: 23 31 03 04
 -Original Message-
 From: Russel Madere [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 10, 2000 5:45 PM
 To: CF Talk Mailing List
 Subject: A replace question


 How can I dynamically convert:

 d:\songs\..\drip\manual.txt

 to:

 d:\drip\manual.txt

 or:

 d:\Songs\Music\K\..\B\Buffett, Jimmy\Song.mp3

 to:

 d:\Songs\Music\B\Buffett, Jimmy\Song.mp3

 ?

 I'm having a complete brain lapse!


 Russel Madere, Jr.
 Web Developer
 TurboSquid

 "Be good and you will be lonesome.
  Be lonesome and you will be free.
  Live a lie and you will live to regret it."
   Jimmy Buffett
   That's What Living Is To Me
 --
 
 Archives: http://www.eGroups.com/list/cf-talk
 To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.



--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRstsbodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: A replace question

2000-05-10 Thread Chris Meier

Well, as long as they're not Metallica MP3's ...:)

-Original Message-
From: Holger Lockertsen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 10, 2000 12:33 PM
To: [EMAIL PROTECTED]
Subject: RE: A replace question


Remove "..\" this way:

cfif string CONTAINS "..\"
cfset string = Replace(string, "..\", "", "All")
/cfif

Serving MP3's on the web is illegal you know... ;-)


* Holger Lockertsen, Solutions Developer, Horisont Information Systems AS
* Nedre Slottsgate 5, N-0157 OSLO, Noreg/Norway
* 23 31 03 04 / 91 83 20 51
* [EMAIL PROTECTED]   http://www.horisont.no/

NB! Horisont har fått nye nummer, og mitt INTERNNUMMER er: 23 31 03 04
 -Original Message-
 From: Russel Madere [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 10, 2000 5:45 PM
 To: CF Talk Mailing List
 Subject: A replace question


 How can I dynamically convert:

 d:\songs\..\drip\manual.txt

 to:

 d:\drip\manual.txt

 or:

 d:\Songs\Music\K\..\B\Buffett, Jimmy\Song.mp3

 to:

 d:\Songs\Music\B\Buffett, Jimmy\Song.mp3

 ?

 I'm having a complete brain lapse!


 Russel Madere, Jr.
 Web Developer
 TurboSquid

 "Be good and you will be lonesome.
  Be lonesome and you will be free.
  Live a lie and you will live to regret it."
   Jimmy Buffett
   That's What Living Is To Me
 --
 
 Archives: http://www.eGroups.com/list/cf-talk
 To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.



--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



(OT) Re: A replace question

2000-05-10 Thread Todd Ashworth

Only copyrighted ones =-p

.Todd

- Original Message - 
From: "Holger Lockertsen" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 10, 2000 12:33 PM
Subject: RE: A replace question


| Remove "..\" this way:
| 
| cfif string CONTAINS "..\"
| cfset string = Replace(string, "..\", "", "All")
| /cfif
| 
| Serving MP3's on the web is illegal you know... ;-)


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: A replace question

2000-05-10 Thread Randy Adkins

Use the Edit function on the menu and do Replace or Extended Replace
if you are changing them within CFM files.

If in a database then you will need to run an UPDATE query.


- Original Message -
From: "Russel Madere" [EMAIL PROTECTED]
To: "CF Talk Mailing List" [EMAIL PROTECTED]
Sent: Wednesday, May 10, 2000 11:45 AM
Subject: A replace question


 How can I dynamically convert:

 d:\songs\..\drip\manual.txt

 to:

 d:\drip\manual.txt

 or:

 d:\Songs\Music\K\..\B\Buffett, Jimmy\Song.mp3

 to:

 d:\Songs\Music\B\Buffett, Jimmy\Song.mp3

 ?

 I'm having a complete brain lapse!


 Russel Madere, Jr.
 Web Developer
 TurboSquid

 "Be good and you will be lonesome.
  Be lonesome and you will be free.
  Live a lie and you will live to regret it."
   Jimmy Buffett
   That's What Living Is To Me
 --

 Archives: http://www.eGroups.com/list/cf-talk
 To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: A replace question

2000-05-10 Thread Holger Lockertsen

Remove "..\" this way:

cfif string CONTAINS "..\"
cfset string = Replace(string, "..\", "", "All")
/cfif

Serving MP3's on the web is illegal you know... ;-)


* Holger Lockertsen, Solutions Developer, Horisont Information Systems AS
* Nedre Slottsgate 5, N-0157 OSLO, Noreg/Norway
* 23 31 03 04 / 91 83 20 51
* [EMAIL PROTECTED]   http://www.horisont.no/

NB! Horisont har fått nye nummer, og mitt INTERNNUMMER er: 23 31 03 04
 -Original Message-
 From: Russel Madere [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 10, 2000 5:45 PM
 To: CF Talk Mailing List
 Subject: A replace question


 How can I dynamically convert:

 d:\songs\..\drip\manual.txt

 to:

 d:\drip\manual.txt

 or:

 d:\Songs\Music\K\..\B\Buffett, Jimmy\Song.mp3

 to:

 d:\Songs\Music\B\Buffett, Jimmy\Song.mp3

 ?

 I'm having a complete brain lapse!


 Russel Madere, Jr.
 Web Developer
 TurboSquid

 "Be good and you will be lonesome.
  Be lonesome and you will be free.
  Live a lie and you will live to regret it."
   Jimmy Buffett
   That's What Living Is To Me
 --
 
 Archives: http://www.eGroups.com/list/cf-talk
 To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: A replace question

2000-05-10 Thread Kenneth Beard

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

-- =_NextPart_001_01BFBAD3.69F193EE
Content-Type: text/plain

 Subject: A replace question


 How can I dynamically convert:

 d:\songs\..\drip\manual.txt

 to:

 d:\drip\manual.txt

try something like

cfset uppos=listfind(pathstring,"..","\")
cfif uppos gt 0
cfset pathstring=listdeleteat(pathstring,uppos,"\")
cfset pathstring=listdeleteat(pathstring,(uppos-1),"\")
/cfif


 or:

 d:\Songs\Music\K\..\B\Buffett, Jimmy\Song.mp3

 to:

 d:\Songs\Music\B\Buffett, Jimmy\Song.mp3

 ?

 I'm having a complete brain lapse!


 Russel Madere, Jr.
 Web Developer
 TurboSquid

 "Be good and you will be lonesome.
  Be lonesome and you will be free.
  Live a lie and you will live to regret it."
   Jimmy Buffett
   That's What Living Is To Me
 --
 
 Archives: http://www.eGroups.com/list/cf-talk
 To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
or
send a message to [EMAIL PROTECTED] with 'unsubscribe'
in
the body.




--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
or
send a message to [EMAIL PROTECTED] with 'unsubscribe'
in
the body.


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.

-- =_NextPart_001_01BFBAD3.69F193EE
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"
HTML
HEAD
META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii"
META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.1960.3"
TITLERE: A replace question/TITLE
/HEAD
BODY

PFONT SIZE=3D2gt; Subject: A replace question/FONT
BRFONT SIZE=3D2gt;/FONT
BRFONT SIZE=3D2gt;/FONT
BRFONT SIZE=3D2gt; How can I dynamically convert:/FONT
BRFONT SIZE=3D2gt;/FONT
BRFONT SIZE=3D2gt; d:\songs\..\drip\manual.txt/FONT
BRFONT SIZE=3D2gt;/FONT
BRFONT SIZE=3D2gt; to:/FONT
BRFONT SIZE=3D2gt;/FONT
BRFONT SIZE=3D2gt; d:\drip\manual.txt/FONT
BRFONT SIZE=3D2gt;/FONT
BRFONT SIZE=3D2try something like/FONT
/P

PFONT SIZE=3D2lt;cfset =
uppos=3Dlistfind(pathstring,quot;..quot;,quot;\quot;)gt;/FONT
BRFONT SIZE=3D2lt;cfif uppos gt 0gt;/FONT
BRFONT SIZE=3D2lt;cfset =
pathstring=3Dlistdeleteat(pathstring,uppos,quot;\quot;)gt;/FONT
BRFONT SIZE=3D2lt;cfset =
pathstring=3Dlistdeleteat(pathstring,(uppos-1),quot;\quot;)gt;/FONT=

BRFONT SIZE=3D2lt;/cfifgt;/FONT
/P
BR

PFONT SIZE=3D2gt; or:/FONT
BRFONT SIZE=3D2gt;/FONT
BRFONT SIZE=3D2gt; d:\Songs\Music\K\..\B\Buffett, =
Jimmy\Song.mp3/FONT
BRFONT SIZE=3D2gt;/FONT
BRFONT SIZE=3D2gt; to:/FONT
BRFONT SIZE=3D2gt;/FONT
BRFONT SIZE=3D2gt; d:\Songs\Music\B\Buffett, Jimmy\Song.mp3/FONT
BRFONT SIZE=3D2gt;/FONT
BRFONT SIZE=3D2gt; ?/FONT
BRFONT SIZE=3D2gt;/FONT
BRFONT SIZE=3D2gt; I'm having a complete brain lapse!/FONT
BRFONT SIZE=3D2gt;/FONT
BRFONT SIZE=3D2gt;/FONT
BRFONT SIZE=3D2gt; Russel Madere, Jr./FONT
BRFONT SIZE=3D2gt; Web Developer/FONT
BRFONT SIZE=3D2gt; TurboSquid/FONT
BRFONT SIZE=3D2gt;/FONT
BRFONT SIZE=3D2gt; quot;Be good and you will be lonesome./FONT
BRFONT SIZE=3D2gt;nbsp; Be lonesome and you will be free./FONT
BRFONT SIZE=3D2gt;nbsp; Live a lie and you will live to regret =
it.quot;/FONT
BRFONT =
SIZE=3D2gt;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp=
;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp=
;nbsp;nbsp;nbsp;nbsp; Jimmy Buffett/FONT
BRFONT =
SIZE=3D2gt;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp=
;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp=
;nbsp;nbsp;nbsp;nbsp; That's What Living Is To Me/FONT
BRFONT SIZE=3D2gt; =
--/FONT=

BRFONT SIZE=3D2gt; /FONT
BRFONT SIZE=3D2gt; Archives: A =
HREF=3D"http://www.eGroups.com/list/cf-talk" =
TARGET=3D"_blank"http://www.eGroups.com/list/cf-talk/A/FONT
BRFONT SIZE=3D2gt; To Unsubscribe visit/FONT
BRFONT SIZE=3D2A =
HREF=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlistsbody=3Dli=
sts/cf_talk" =
TARGET=3D"_blank"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists=
body=3Dlists/cf_talk/A or/FONT
BRFONT SIZE=3D2send a message to [EMAIL PROTECTED] =
with 'unsubscribe' in/FONT
BRFONT SIZE=3D2the body./FONT
/P
BR

PFONT =
SIZE=3D2---=
-/FONT
BRFONT SIZE=3D2--/FONT
BRFONT SIZE=3D2Archives: A =
HREF=3D"http://www.eGroups.com/list/cf-talk" =
TARGET=3D"_blank"http://www.eGroups.com/list/cf-talk/A/FONT