g***@gmail.com
2006-06-22 08:29:37 UTC
Hi friends:
I am using the following version of informix 4gl:
-- IBM INFORMIX-4GL Version 7.32.FC2
I tried to use "CASE" in the conditional clause:
SELECT ... WHERE
T3.actual_qty_deliv=(CASE WHEN T1.test_pseudo='QS3125' and
T7.name1='UNIQUEST' and T1.pkg_code='DCG14' THEN NULL else
T3.actual_qty_deliv END)
but fail, it gave me this error message:
AND T3.actual_qty_deliv=(CASE WHEN T1.test_pseudo='QS3125' and
T7.name1='UNIQUEST' and T1.pkg_code='DCG14' THEN NULL else
T3.actual_qty_deliv END)
|_________________________________^
|
| A grammatical error has been found on line 79, character 35.
| The construct is not understandable in its context.
| See error number -4373.
|_________________________________^
.....
I then tried the other way (by using the pipe operator),
SELECT ... WHERE
(T1.test_pseudo || T7.name1 || T1.pkg_code) <> 'QS3125UNIQUESTDCG14'
It failed as well (with this error message):
AND (T1.test_pseudo || T7.name1 || T1.pkg_code) <>
'QS3125UNIQUESTDCG14'
|_____________________^
|
| A grammatical error has been found on line 79, character 23.
| The construct is not understandable in its context.
| See error number -4373.
|________________________^
THe main purpose of my conditional clause is to exclude results
where
1) T1.test_pseudo = QS3125
2) T7.name1 = UNIQUEST
3) T1.pkg_code = DCG14
Both my sqls can work well in the common sql editor/ sql client but not
in the 4gl compilation.
Can anyone please help me on this matter? Thanks a lot for your help.
I am using the following version of informix 4gl:
-- IBM INFORMIX-4GL Version 7.32.FC2
I tried to use "CASE" in the conditional clause:
SELECT ... WHERE
T3.actual_qty_deliv=(CASE WHEN T1.test_pseudo='QS3125' and
T7.name1='UNIQUEST' and T1.pkg_code='DCG14' THEN NULL else
T3.actual_qty_deliv END)
but fail, it gave me this error message:
AND T3.actual_qty_deliv=(CASE WHEN T1.test_pseudo='QS3125' and
T7.name1='UNIQUEST' and T1.pkg_code='DCG14' THEN NULL else
T3.actual_qty_deliv END)
|_________________________________^
|
| A grammatical error has been found on line 79, character 35.
| The construct is not understandable in its context.
| See error number -4373.
|_________________________________^
.....
I then tried the other way (by using the pipe operator),
SELECT ... WHERE
(T1.test_pseudo || T7.name1 || T1.pkg_code) <> 'QS3125UNIQUESTDCG14'
It failed as well (with this error message):
AND (T1.test_pseudo || T7.name1 || T1.pkg_code) <>
'QS3125UNIQUESTDCG14'
|_____________________^
|
| A grammatical error has been found on line 79, character 23.
| The construct is not understandable in its context.
| See error number -4373.
|________________________^
THe main purpose of my conditional clause is to exclude results
where
1) T1.test_pseudo = QS3125
2) T7.name1 = UNIQUEST
3) T1.pkg_code = DCG14
Both my sqls can work well in the common sql editor/ sql client but not
in the 4gl compilation.
Can anyone please help me on this matter? Thanks a lot for your help.