Steve,
Typically EQ1 through EQ16 would have .F. or .T. (obviously).
EQ1NAME through EQ16NAME are C-type fields of 20 char long. They maybe blank or some could have entries. For example, user looks at a form where he/she sees all equipment available and check box to select what he/she wants:
EQ1NAME EQ1
EQ2NAME EQ2
... and so on.
On the report I need to show the selected equipment in a column, excluding all the ones thate were not selected. That's why I need the SQL select.
>Dmitry,
>
>Please provide more info. about what EQ1NAME thru EQ16NAME would contain.
>
>>I am running into the "SQL too complex" error. I think because the SQL statement can't be longer than something (probably 254K).
>>
>>Here is a segment of the SQL I am trying to create:
>>
>>
>>select iif(EQ1,EQ1NAME+";","") + iif(EQ2,EQ2NAME+";","") + ;
>>iif(EQ3,EQ3NAME+";","") AS EQLIST FROM MYTABLE
>>
>>
>>The problem is that I have 16 of the IIF() statements (that it, EQ1 to EQ16) in the SQL Select.
>>
>>Any suggestions on how to get around this limit of SQL or simplify my statement?
>>
>>Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham