Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search for a character in Oracle SQL statement 1

Status
Not open for further replies.

gc6294

IS-IT--Management
Feb 23, 2004
56
US
Hi, I'm trying to create a Select statement searching for a character ° (<alt> 0176) within a field... I've tried a few things, including the below....
SELECT "REMIT_TO"."VENDOR_ID", "REMIT_TO"."ADDR1", "REMIT_TO"."ADDR2", "REMIT_TO"."ADDR3", "REMIT_TO"."CITY", "REMIT_TO"."ID", "VENDOR"."ADDR1", "VENDOR"."ADDR2", "VENDOR"."ADDR3"
FROM "VENDOR" "VENDOR" LEFT OUTER JOIN "REMIT_TO" "REMIT_TO" ON "VENDOR"."ID"="REMIT_TO"."VENDOR_ID" where "REMIT_TO"."ADDR1" like "%°%"

Tried the above but got database Vendor code 904 error - invalid identifier "%°%"

Anyone have ideas?
Thanks!!
 
Did you try single quotes around your LIKE:
[tt]
... like [highlight #FCE94F]'[/highlight]%°%[highlight #FCE94F]'[/highlight]
[/tt]


---- Andy

There is a great need for a sarcasm font.
 
Thanks!!! I had thought I started with that, but must not of....
Thanks!!!!!
 
Just the side note, you have a lot of " in your Select, but you don't have any Spaces or reserved words in your tables and fields' names.
You may as well try:

[pre]
SELECT
REMIT_TO.VENDOR_ID,
REMIT_TO.ADDR1,
REMIT_TO.ADDR2,
REMIT_TO.ADDR3,
REMIT_TO.CITY,
REMIT_TO.ID,
VENDOR.ADDR1,
VENDOR.ADDR2,
VENDOR.ADDR3
FROM VENDOR LEFT OUTER JOIN REMIT_TO
ON VENDOR.ID = REMIT_TO.VENDOR_ID
WHERE REMIT_TO.ADDR1 LIKE '%°%'
[/pre]


---- Andy

There is a great need for a sarcasm font.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top