REPLACE function syntax fails using CHR

Posted on 2009-04-16
Last Modified: 2012-05-06
I have inserted the REPLACE function as part of my select statement but I'm receiving an error:
'chr' is not a recognized built-in function name.

See the REPLACE in the attached code.

What am I doing wrong?



	, t1.OriginalNumber

	, t1.DocumentDate

	, t1.CustomerPO

	, t1.ShipMethod

	, t1.RequestedShipDate

	, t1.PaymentTerms

	, t1.MasterNumber

	, t1.ShiptoName

	, t1.CustomerNumber

	, t1.ShiptoContact

	, t1.ShiptoName1

	, REPLACE(t1.ShiptoAddress1, chr(13), ' ')

	, t1.ShiptoAddress2

	, t1.ShiptoAddress3

	, t1.ShiptoCity

	, t1.ShiptoState

	, t1.ShiptoZip

	, t1.ShiptoCountry

	, t1.CustomerName

	, t1.BilltoContact

	, t1.BilltoAddress1

	, t1.BilltoAddress2

	, t1.BilltoAddress3

	, t1.BilltoCity

	, t1.BilltoState

	, t1.BilltoZip

	, t1.BilltoCountry

	, t1.JobNumber

	, t1.CallerID

	, t1.QuantityOrdered

	, t1.TotalBackordered

	, t1.FullItemNumber

	, t1.ItemDescription

	, t1.QuantitytoInvoice

	, t1.UnitPrice

	, t1.ExtendedPrice

	, t1.Comment1A

	, t1.Comment2A

	, t1.Comment3A

	, t1.Comment4A

	, t1.Subtotal

	, t1.MiscAmount

	, t1.TaxAmount

	, t1.FreightAmount

	, t1.TradeDiscount

	, t1.DocumentAmount

	, t1.Deposit

	, t1.AccountAmount

	, t1.Comment1

	, t1.Comment2

	, t1.Comment3

	, t1.Comment4

	, t2.[Tracking Number]

	, t1.CreditRep

	, t1.CreditRepEmail

	, t1.CreditRepPhoneNumber

	, t1.DueDate

from tempBT1 t1 

    left outer join tempBT2 t2 on =

	order by t1.InvoiceNumber

Open in new window

Question by:jdr0606

    Accepted Solution

    Never mind, I answered my own question
    LVL 4

    Expert Comment

    i think u trying to add a delimiter into ur query, if it is yes then u cannot use replace command to add a delimiter in the address field while querying

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
    In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now