Yasir Nisar wrote:
Hi,
Hope you will find this mail in the best of your health.
SELECT * FROM BackupTable,BackupItemTable,BackItUpPathTable WHERE lower(BackItUpPathTable.WinName) GLOB lower("*1[]1.txt*") AND BackupItemTable.BKItemSize > -1 AND BackupTable.BackupNo = BackupItemTable.BackupNo AND BackupItemTable.PathID = BackItUpPathTable.PathID ;
Above mentioned is the query which returns nothing. Problem is with "[" (1[]1.txt). Would you kindly tell me whether "[" is reserved for something or not?
Best Regards,
Yasir Nisar
Yes, the '[' character is used to mark the beginning of a set of
characters to match at that position in the string.
SQLite seems to do the following:
The glob syntax supports the following patterns:
? - matches any single character
* - matches zero or more characters
[seq] - matches any single character in seq
[!seq] - matches any single character not in seq
seq is one or more characters, such as abc. You may specify character
ranges using a dash. For example, a-z0-9 specifies all of the characters
in the English alphabet and the decimal digits 0 through 9.
This appears to be slightly different than normal *nix globbing since
SQLite uses '^' rather than '!' for the set inversion (if my reading of
the source is correct).
It is not clear how you should escape these characters if you need to
match them literally. It may not be possible, since these characters are
not allowed in filenames and hence wouldn't need to be matched by *nix
commands.
You can always trace through the source of the patternCompare function
in SQLite's source file func.c for more details.
HTH
Dennis Cote
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------