hmliang
21st January 2007, 15:42
hi all,
i have about search question,search condition from csv file,search table:tcibd001.

csv file content:
7770,0,401
7771,1,101
7772,2,201
first field:item code
second field:item description
third field:item group

program script:
select tcibd001.*
from tcibd001
where tcibd001.item = :item
order by tcibd001.item
as set with 1 rows

selectdo
message("search result=%s",tcibd001.item)
if isspace(tcibd001.item) then
message("%s is empty",item)
endif
endselect

my question:
item code:7770 saved in tcibd001 table,but when search condition is 7770,pass above script cann't return result:search result=7770;
if itemcode of csv file haven't in tcibd001,pass above program script yet can't return result:eg 7771 is empty

i haven't find error reason,please help me,thanks.

bdittmar
21st January 2007, 18:12
hi all,
i have about search question,search condition from csv file,search table:tcibd001.

csv file content:
7770,0,401
7771,1,101
7772,2,201
first field:item code
second field:item description
third field:item group

program script:
select tcibd001.*
from tcibd001
where tcibd001.item = :item
order by tcibd001.item
as set with 1 rows

selectdo
message("search result=%s",tcibd001.item)
if isspace(tcibd001.item) then
message("%s is empty",item)
endif
endselect

my question:
item code:7770 saved in tcibd001 table,but when search condition is 7770,pass above script cann't return result:search result=7770;
if itemcode of csv file haven't in tcibd001,pass above program script yet can't return result:eg 7771 is empty

i haven't find error reason,please help me,thanks.

Hello,

are you sure that item 7770 is stored in table ?

select tcibd001.*
from tcibd001
where tcibd001._index1 = {:item}
selectdo
message....... record is in table
selectempty
message....... record not found
endselect

Regards