skgupta
23rd March 2006, 12:15
Dear I have lot number in tdilc301 table like "PREL060206000080" AND "MREL1212050000053" from there I want only "P" type lot selection on select command

Please help

bdittmar
23rd March 2006, 13:16
Dear I have lot number in tdilc301 table like "PREL060206000080" AND "MREL1212050000053" from there I want only "P" type lot selection on select command

Please help

Hello,

lot number is string !

select ........
where .........
and tdilc301.clot(1;1) = "P"

Regards

gguymer
23rd March 2006, 16:29
Use the like operator for pattern searches, the '.*' following the P is a wildcard that will return a match of any string value starting with P.

select tdilc301.clot
from tdilc301
where tdilc301.clot like "P.*"

***************************************************
Baan documentation example:

LIKE Operator:
Choice [ ]
Wildcard .*

where name like "[Tt]riton.*"

***************************************************

Gilbert Guymer
Database Administrator
Lufkin Industries, Inc.

en@frrom
23rd March 2006, 17:24
I don't think he should use LIKE in this case, since the suggestion bdittmar is enough to meet the requirements, and is way faster than LIKE..