im trying to rewrite a procedure and specific query gives trouble. In Sybase this type of condition in query would work but in NETEZZA it displays ERRORS. I also cant find any examples with netezza conditioning inside query. What would be an alternative ?
DECLARE static_date DATE;
...
INSERT INTO test(col1, col2)
SELECT tbl1.colx, (IF tbl2.dateCol< static_date THEN 1 ELSE 2 END IF) as col2
FROM tbl1, tbl2;
Aucun commentaire:
Enregistrer un commentaire