table and filter

Forum related to SQLite

Moderators: gto, cipto_kh, EgonHugeist

ebelouet
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 04.02.2014, 15:02

table and filter

Postby ebelouet » 04.02.2014, 15:16

Hi,

I would like using filter in zeos table, this nom='GGE BOLLIET' is ok but I would like make nom='GGE*' similar as like in sql but it's worng.

Anybody can give me a example for this ?

Sincerely
Eric

miab3
Zeos Test Team
Zeos Test Team
Posts: 929
Joined: 11.05.2012, 12:32
Location: Poland

Re: table and filter

Postby miab3 » 04.02.2014, 21:31

@ebelouet,

Try:

Code: Select all

nom like 'GGE*'

Michal

ebelouet
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 04.02.2014, 15:02

Re: table and filter

Postby ebelouet » 07.02.2014, 15:41

Hi,

Thank you, it's ok but I try this before with no succes..

Sincerely
Eric

ebelouet
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 04.02.2014, 15:02

Re: table and filter

Postby ebelouet » 14.02.2014, 16:54

In fact, in vcl text it's ok but in delphi code I have mistake with quote.

//nom like 'GGE B*'
st:='nom like'+edit1.Text+'*';

Do you know how make this in delphi code ?

Sincerely
Eric

marsupilami
Gold Boarder
Gold Boarder
Posts: 625
Joined: 17.01.2011, 14:17

Re: table and filter

Postby marsupilami » 16.02.2014, 13:19

Hello Eric,

that should be
st := 'nom like '''+edit1.Text + '*'''; // see the double use of ' to get a ' into the string
or
st := 'nom like' + QuotedStr(edit1.Text + '*');

Best regards,

Jan

ebelouet
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 04.02.2014, 15:02

Re: table and filter

Postby ebelouet » 17.02.2014, 08:25

Hi,

Thank a lot, it's ok , before I stry QuotedStr('*') with only that.

Sincerely
Eric


Return to “SQLite”

Who is online

Users browsing this forum: No registered users and 1 guest