Data fabrication is my question.

Page 1 of 1

1 Replies - 522 Views - Last Post: 01 June 2012 - 04:59 PM Rate Topic: -----

#1 code_firebug  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 01-June 12

Data fabrication is my question.

Posted 01 June 2012 - 04:51 PM

The code below inserts 24 rows to my PRICE table, but i need to understand how to fabricate the code to add 135 rows to my price table. If anyone can help, that will be awesome.

SELECT price_s1.NEXTVAL, i.item_id,
(
SELECT cl.common_lookup_id
FROM common_lookup cl
WHERE cl.common_lookup_type = '5-DAY-RENTAL'
),
'N',
CASE
WHEN (TRUNC(SYSDATE) - TRUNC(i.release_date)) > 30 THEN i.release_date
ELSE i.release_date
END,
(
SELECT p.start_date
FROM price p
WHERE p.end_date = p.start_date + 30
),
(
SELECT
CASE
WHEN (TRUNC(SYSDATE) - TRUNC(i.release_date)) > 30 THEN 5
ELSE TO_NUMBER(cl.common_lookup_code)
END
FROM common_lookup cl
WHERE cl.common_lookup_type = '5-DAY-RENTAL'
),
1, TRUNC(SYSDATE),1,TRUNC(SYSDATE)
FROM item i;

Is This A Good Question/Topic? 0
  • +

Replies To: Data fabrication is my question.

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8937
  • View blog
  • Posts: 33,463
  • Joined: 12-June 08

Re: Data fabrication is my question.

Posted 01 June 2012 - 04:59 PM

Again, do not open duplicate topics. You already have one open.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1