Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 9 Jahren, 1 Monat
Letzter Beitrag:
vor 9 Jahren, 1 Monat
Beteiligte Autoren:
Art Bonds, issah, M. Beaven, Dan M

What is the wildcard character for a query?

Startbeitrag von Dan M am 11.06.2009 01:57

What I mean is, I have a customer table. I want the user to be able to toggle between ALL customers and just there own.

I created a table based on a query to show just there own.

Is there a character I can use to show ALL by replacing their ID with a character that is a wild card and will show all companies with any ID?

or ... is there another/better way of doing this?



Hi Dan,

Provided that this is a hyperfile query, you can set the query to use a parameter of customerID. If you want to see all customers, declare the query parameter to be:


Otherwise, declare the query parameter to be:


This is prior to your query execution.

You can "ignore" any query parameter in this sense.



von M. Beaven - am 11.06.2009 04:37
How would one use a wild card in a query where you want to match a certain pattern?

For example, I have a field (TheFieldname) in a table (TableName) made up of numbers, such as:


I want a query to return rows based upon this query: "Select * from TableName where TheFieldname = 123?????9", which would return the first and third row. Or TheFieldname = 12?4?????, where the first and second rows would be returned.

Its on my agenda to look more closely into it this weekend, but if anybody has done this before I'd appreciate a hint. I imagine it depends on which data base I use (HF, MySQL, Postgresql, etc).

von Art Bonds - am 13.06.2009 17:13
I think the SQL default is '%' and '?' but you would normally use 'like' and not '='.

"Select * from TableName where TheFieldname like '1234%' etc.



von issah - am 13.06.2009 17:33
So far...



In Postgresql, SIMILAR TO and NOT SIMILAR TO, and for case insensitive also ILIKE and NOT ILIKE.


von Art Bonds - am 13.06.2009 18:35
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.