WITH RECURSIVE parts ( component, subcomponent, quantity ) AS ( SELECT CAST( NULL AS VARCHAR ), -- CASTs must be used 'bookcase', `enter code here` -- to declare the CAST( 1 AS INT ) -- correct datatypes UNION ALL SELECT b.component, b.subcomponent, p.quantity * b.quantity FROM parts p JOIN bookcase b ON p.subcomponent = b.component ) update updte_date set subcomponent='newdate' FROM parts,update_date --error update |
Please do not post garbage... please ask an actual question, with actual code, and an actual error message. HOWEVER... you have a record on this forum of not even trying. In my opinion you should be banned for wasting everyone's time. Could not execute statement. Syntax error near 'CAST' on line 6 SQLCODE=-131, ODBC 3 State="42000" Line 1, column 1 WITH RECURSIVE parts ( component, subcomponent, quantity ) AS ( SELECT CAST( NULL AS VARCHAR ), -- CASTs must be used 'bookcase', `enter code here` -- to declare the CAST( 1 AS INT ) -- correct datatypes UNION ALL SELECT b.component, b.subcomponent, p.quantity * b.quantity FROM parts p JOIN bookcase b ON p.subcomponent = b.component ) update updte_date set subcomponent='newdate' FROM parts,update_date --error update answered 10 Jul '14, 10:20 Breck Carter
That's a different kind of problems with "recursion", apparently:)
(10 Jul '14, 10:27)
Volker Barth
|
Hm, is that "mfkpie8-style" to leave the actual question as an exercise for the reader?