Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL Concat Problem

JamezyJun 1 2016 — edited Jun 1 2016

Hi, I am a student at MCAST in Malta.

I've been having a problem when trying to create this dimension for a data cube. I assume it is because of the concatination. Any help would be appreciated. Thanks, James.

INSERT INTO JCAR_DIM_CARS(CAR_ID,caryear, brand_id,model_id, type_value,

rdbms_car_id)

                      

  (SELECT dim_seq_car_id.NEXTVAL,

  car.caryear,

  cb.brand_id,

  mo.model_id,

  CONCAT(ca.car_id, car.caryear,cb.brand_id, mo.model_id),

  car.car_id

  FROM JCAR_TBL_carbrands cb

  JOIN JCAR_TBL_carmodels mo

  ON (cb.brand_id = mo.brand_id)

  JOIN JCAR_TBL_cars car

  ON (mo.model_id = car.model_id))

This is the error given

Error starting at line : 133 in command -

INSERT INTO JCAR_DIM_CARS(CAR_ID,caryear, brand_id,model_id, type_value,

rdbms_car_id)

                       

  (SELECT dim_seq_car_id.NEXTVAL,

  car.caryear,

  cb.brand_id,

  mo.model_id,

  CONCAT(ca.car_id, car.caryear,cb.brand_id, mo.model_id),

  car.car_id

 

  FROM JCAR_TBL_carbrands cb

  JOIN JCAR_TBL_carmodels mo

  ON (cb.brand_id = mo.brand_id)

 

  JOIN JCAR_TBL_cars car

  ON (mo.model_id = car.model_id))

Error at Command Line : 140 Column : 3

Error report -

SQL Error: ORA-00909: invalid number of arguments

00909. 00000 -  "invalid number of arguments"

This post has been answered by Paul Horth on Jun 1 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 29 2016
Added on Jun 1 2016
16 comments
2,952 views