Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

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
288667176
accept rate: 12%

edited 10 Jul '14, 08:55

Mark%20Culp's gravatar image

Mark Culp
25.0k10142298

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
32.5k5417271050
accept rate: 20%

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:

×18

question asked: 07 Jul '14, 23:14

question was seen: 1,876 times

last updated: 10 Jul '14, 10:27