baan999
21st April 2011, 17:26
I am creating query with the following details..
select tcibd001.item from tcibd001
where (SUBSTRING(LTRIM(tcibd001.item), 1, 3) = 'abc') and
substring(ltrim(tcibd001.item(,10,2) = 'kl'
system is not compiling and message is appeaing as "and/or" expected instead of "="
what is wrong in this query or does Infor query is not allowing
else what is the alternative?
bdittmar
21st April 2011, 20:19
I am creating query with the following details..
select tcibd001.item from tcibd001
where (SUBSTRING(LTRIM(tcibd001.item), 1, 3) = 'abc') and
substring(ltrim(tcibd001.item(,10,2) = 'kl'
system is not compiling and message is appeaing as "and/or" expected instead of "="
what is wrong in this query or does Infor query is not allowing
else what is the alternative?
Hello,
use the brackets at the right place.
Regards
baan999
24th April 2011, 07:40
SELECT tcibd001.item
FROM tcibd001
WHERE substring(ltrim(tcibd001.item),10,3)=999
tcibd001.cuni = 'nos'
while executing the query getting sub string operator error message as error 302
what is wrong in this query.
request you provide sample query to simwrite similar to this , which is already tested by you
bdittmar
25th April 2011, 11:53
SELECT tcibd001.item
FROM tcibd001
WHERE substring(ltrim(tcibd001.item),10,3)=999
tcibd001.cuni = 'nos'
while executing the query getting sub string operator error message as error 302
what is wrong in this query.
request you provide sample query to simwrite similar to this , which is already tested by you
Hello,
you're on ERP/LN, not as shown in your environment information at B4 ?
I suppose you'll get all items which have a '999' at the first three characters in segment two of itemcode ?
SELECT tcibd001.item
FROM tcibd001
WHERE tcibd001.item(10;3)="999"
and tcibd001.cuni = "nos"
Error 302 is ESQLSYNTAX (SQL syntax not correct)
Regards
toolswizard
25th April 2011, 20:29
Try using LIKE or ALIKE with wildcard characters. You can't use functions or subscripts in the where clause.
baan999
26th April 2011, 13:29
hi bdittmar,
query tried and working fine. thanks,
how to define user to input
e.g item = "ABC"
what to type in where condition..
bdittmar
26th April 2011, 13:43
hi bdittmar,
query tried and working fine. thanks,
how to define user to input
e.g item = "ABC"
what to type in where condition..
Hello,
in QUERY:
select tcibd001.item,
tcibd001.<other fields>
from tcibd001
where tcibd001.item >= tcibd001.item.f
and tcibd001.item <= tcibd001.item.t
and <additional conditions>
-- Consider the segmented items --
In item inputfield if "ABC" are the 1st three characters in segment 2 of itemcode the input must be:
" ABC.........."
Regards
baan999
27th April 2011, 16:09
HI bdittmar,
i am defeining in my script as below and from form level item1.f = 0180 & item2.f = 025 , only 0180 and 025 to be selected and printed.
in script defined as below
item1 = tdpur401.item(21;4)
item2 = tdpur401.item(25;3)
item1.f = item1
item2.f = item2
Is this ok.. else some changes require. please suggest