What's the right sintax to search for a X(6) format var in Progress 4gl?

136 views Asked by At

On the statement below I have an error telling me that attribute type is not compatible with. I consult database properties and this attribute format is x(6). Does anyone know which the right sintax to get it ? P.s. I already tried = '1', EQ 1, EQ '1', = "1" and EQ "1"

FOR EACH bd.tablename WHERE  bd.tablename.attribute = "1"
2

There are 2 answers

0
bupereira On

When you say property/attribute, do you mean a field? If you're talking about buffer/table attributes, such as type, for example, the separator should be colon, this -> :

Not period (.), unlike most other OO languages. But if you're talking about a field, TheMadDBA is correct, and you should check the data type, it's way safer than just the field format. If you still have this issue, maybe provide more information and we can try to help you further.

0
Pedro Matos On

The code statement is:

FOR EACH multipos.mp_mvlj WHERE  multipos.mp_mvlj.mvl_codmov = 1  NO-LOCK:

The error is (translated from portuguese):

Incompatible Data type in expression or attribution