What are the challenges you face when working across database platforms? Take the survey
Options

Generating rows for each day of a conference

Hello,
I have two tables: conference and conference_day.

conference
--------------
conference_id PK
start_date

number_of_days
capacity

conference_day
--------------------
conference_day_id PK
conference_id FK
date
capacity

I have a problem with generating data to conference_day table. For each conference I need to have every conference day generated starting from conference.start_date to (conference.start_date + conference_number_of_days). What's more  conference_day.capacity must be the same as conferece.capacity. 
Could you pleace help me with this problem?
Thank you in advance. 

Tagged:

Answers

Sign In or Register to comment.