The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.
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

asked 07 Jul '14, 23:14

mfkpie8's gravatar image

mfkpie8
86404651
accept rate: 10%

edited 10 Jul '14, 08:55

Mark%20Culp's gravatar image

Mark Culp
22.3k9129262

Hm, is that "mfkpie8-style" to leave the actual question as an exercise for the reader?

(10 Jul '14, 09:10) Volker Barth

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
permanent link

answered 10 Jul '14, 10:20

Breck%20Carter's gravatar image

Breck Carter
26.6k418576824
accept rate: 21%

you have a record on this forum of not even trying

That's a different kind of problems with "recursion", apparently:)

(10 Jul '14, 10:27) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×17

question asked: 07 Jul '14, 23:14

question was seen: 731 times

last updated: 10 Jul '14, 10:27