This content has been marked as final.
Show 4 replies
-
1. Re: FOR EACH ROW procedure for INSERT
shawkins Apr 3, 2013 2:38 PM (in response to jane_lj)What does your teiid insert look like? Is it returning a non zero update count?
Also in the above it seems like the select statement has no effect.
Steve
-
2. Re: FOR EACH ROW procedure for INSERT
jane_lj Apr 3, 2013 2:54 PM (in response to shawkins)Steve,
The select statement purpose is to query three values and save into 3 vairalbes I declare.
The syntax is wrong?
Thanks.
-
3. Re: FOR EACH ROW procedure for INSERT
shawkins Apr 3, 2013 9:02 PM (in response to jane_lj)The select does not modify any variables. You may have seen that MetaMatrix/Teiid used the SELECT INTO clause to target loading into a table, whereas the sql spec uses INTO to load into variables. Ideally we should support that syntax as well, but for now the workaround is to use a temp table:
INSERT INTO #TEMP SELECT ...
Then later you can use a scalar subquery to get a value:
... = (SELECT COL FROM #TEMP)
-
4. Re: FOR EACH ROW procedure for INSERT
jane_lj Apr 4, 2013 6:02 PM (in response to shawkins)Thank you very much.