Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Help with SQL

Help with SQL

From: Sundeep Kumargoswami <skumargo_at_osf1.gmu.edu>
Date: 30 Mar 2000 17:53:24 GMT
Message-ID: <8c04ak$pio@portal.gmu.edu>


Hi,
I am trying to execute a SQL statement against an oracle database the field (customer_name) I am querying on contains records with embedded single quotes (') for example, Craig's data exchange. When the query hits one of these records it fails with improperly quoted string error. The front-end is VB and the connection is made using ODBC

            Do While Not .EOF
                           
                mySql = "SELECT * FROM all_customer_acct WHERE " & _
                     "customer_name = '" & UCase(!customer_nm) & "'"
                                 
                frmValidator.Text1.Text = UCase(!customer_nm)
                frmValidator.Refresh
                
                outString = UCase(!customer_nm) & "|"
                

How can I change the Sql Statment so it will not fail in the above situation.

Thanks,
Sundeep

--



Sundeep Goswami
skumargo_at_gmu.edu
goswamis_at_hotmail.com Received on Thu Mar 30 2000 - 11:53:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US