Subject | Re: [IBO] two ParamEdit & SQL search |
---|---|
Author | William J Hill |
Post date | 2003-11-05T17:55:45Z |
Hello Gediminas,
select s."Sokejo_ID" , s."Vardas" , s."Pavarde"
from SOKEJAI s
where
s."Vardas" like :Vardas
and
s."Pavarde" like :Pavarde
2) When vardas or pavarde are null use '%' symbol.
3) Append '%' symbol to vardas and pavarde params.
Regards,
William.
>Sending again this, as there wasn't luck to handle it. What's is wrong[lots of snips...]
>using ParamEdits (used to provide params to SQL query) with several SQL
>params?
>select s."Sokejo_ID" , s."Vardas" , s."Pavarde"1) change 'starting with' to 'like' in sql, e,g
>from SOKEJAI s
>where
>s."Vardas" starting with ? /* Vardas */
>and
>s."Pavarde" starting with ? /* Pavarde */
> [VARDAS] = 'I'
> [PAVARDE] = <n> '' ]
>/// In Vardas ParamEdit was entered "I" - gives an empty dataset due to
>PAVARDE - NULL
> [VARDAS] = 'I'
> [PAVARDE] = 'K' ]
>/// Found matching record - right
> [VARDAS] = ''
> [PAVARDE] = '' ]
>/// Should get all records from the table - however ib_grid shows an empty
> [VARDAS] = ''
> [PAVARDE] = 'K' ]
>/// An empty dataset - should be 7 rows as there are such number records
>where surname (pavarde) starts with the "K"
select s."Sokejo_ID" , s."Vardas" , s."Pavarde"
from SOKEJAI s
where
s."Vardas" like :Vardas
and
s."Pavarde" like :Pavarde
2) When vardas or pavarde are null use '%' symbol.
3) Append '%' symbol to vardas and pavarde params.
Regards,
William.