Filtering a table with an UNIQUEIDENTIFIER field
Filtering a table with an UNIQUEIDENTIFIER field
Hi,
I can't figure how to filer a table with an UNIQUEIDENTIFIER field.
Any expression sample for doing this stuff ? it seems that ising simply a string doesn't work.
Regards
I can't figure how to filer a table with an UNIQUEIDENTIFIER field.
Any expression sample for doing this stuff ? it seems that ising simply a string doesn't work.
Regards
Re: Filtering a table with an UNIQUEIDENTIFIER field
Hello,
To filter data, you can use either local filtration
or use filtration on the server
To filter data, you can use either local filtration
Code: Select all
MSQuery1.KeyFields := 'f_uniqueidentifier';
MSQuery1.Open;
MSQuery1.Filter := 'f_uniqueidentifier like ''%d6658596%''';
MSQuery1.FilterOptions := [foCaseInsensitive];
MSQuery1.Filtered := True;Code: Select all
MSQuery1.FilterSQL := 'f_uniqueidentifier like ''%d6658596%''';Re: Filtering a table with an UNIQUEIDENTIFIER field
Hi Alex,
sory haven't received notifications about reply.
In your sample code you use an integer as a unique identifier, but in my case it's something like :
7fcaf9b3-7256-4953-a0e0-0c6122b47660
Any idea ?
Regards
sory haven't received notifications about reply.
In your sample code you use an integer as a unique identifier, but in my case it's something like :
7fcaf9b3-7256-4953-a0e0-0c6122b47660
Any idea ?
Regards
Re: Filtering a table with an UNIQUEIDENTIFIER field
In my example, I use a string field as KeyFields (the LIKE operator is used with strings). Please provide your query example.
Re: Filtering a table with an UNIQUEIDENTIFIER field
in my case 7fcaf9b3-7256-4953-a0e0-0c6122b47660 is a string field.
Should I use %d like in your sample ?
Can you change your code using my string ?
Should I use %d like in your sample ?
Can you change your code using my string ?
Re: Filtering a table with an UNIQUEIDENTIFIER field
The '%' symbol in the LIKE operator means that any sequence of symbols can be in this place, i.e., if you specify in the filter:
then all strings containing 'a0e0' will be found. If you need an accurate search, you should use the following filter:
Code: Select all
filed_name like '%a0e0%'Code: Select all
filed_name = '7fcaf9b3-7256-4953-a0e0-0c6122b47660'Re: Filtering a table with an UNIQUEIDENTIFIER field
Thanks Alex.