[Solved] Ignore special characters in Base for query?

Discuss the database features

[Solved] Ignore special characters in Base for query?

Postby lowell1975 » Tue Oct 29, 2019 5:25 pm

I think I can explain my issue well enough without screenshots, but I will try to include them as well. What I have is Dbase that is pulled from a spreadsheet (calc) that pulls data from an external website and updates links when I open the spreadsheet or Dbase. This is all fine and good until I try to query the dbase for certain information.... The way Spreadsheet pulls data, it needs to change pictures into understandable data for both Calc and Dbase. SO, I end up with things like {G}, {G}{G}, {1}{G}, {2}{G}... ect... When I do a LIKE {G}* it only returns exactly that anything with exactly {G}, it does not pull the other data. What I am looking for is a Criterion similer to the "LIKE" function that will return everything with "G" involved. There are other letters I need to separate other then "G", but I think I can figure it out once I know which direction to go.

Sorry, tried to post some pics of what I am trying, but I'm not sure how to do it on this forum.
[/img] [/img]
Last edited by lowell1975 on Tue Oct 29, 2019 5:50 pm, edited 1 time in total.
OpenOffice 4.13 on windows 10
lowell1975
 
Posts: 3
Joined: Mon Feb 05, 2018 6:21 pm

Re: Ignore special characters in Base for query?

Postby lowell1975 » Tue Oct 29, 2019 5:49 pm

I figured it out, had to try to use the wildcard at both ends *G* this works, something so simple I overlooked it.
OpenOffice 4.13 on windows 10
lowell1975
 
Posts: 3
Joined: Mon Feb 05, 2018 6:21 pm

Re: Ignore special characters in Base for query?

Postby Villeroy » Tue Oct 29, 2019 5:53 pm

Put literal strings in single quotes, column names, table names and alias names in double quotes:
SELECT * FROM "Table" WHERE "Name" LIKE 'G*'
or with SQL wildcard % instead of *
SELECT * FROM "Table" WHERE "Name" LIKE 'G%'
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28427
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Base

Who is online

Users browsing this forum: No registered users and 5 guests