LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Create a column with dates

    Employee
    Posted 11-24-2015 01:49

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: andreeroos

    Hi there.

    I am completely new to Lavastorm and have some questions that someone out there might have the answer to.

    1. I would like to create a table with one column of dates ranging from a start date to an end date (lets say 01jan2015-31dec2015). This table will later on be used for joining on another table. How can this table be created?

    2. Could this table be created by using the smallest and biggest date from a column in another table?

    3. Could it be created using parameters of some sort?


    I would be grateful for any answers.

    Cheers!


  • 2.  RE: Create a column with dates

    Employee
    Posted 11-24-2015 08:53

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ryeh

    Something like the attached? I'm using a while loop to create a record for each day between the start and end dates.
    Attachments:
    GenerateDates.brg


  • 3.  RE: Create a column with dates

    Employee
    Posted 11-24-2015 11:43

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: andreeroos

    Exactly what I wanted. Thanks alot!
    I am new to Lavastorm so may I ask why the first part is needed?

    			
    				output 1 {
    emit date() as Date
    where FALSE
    }


  • 4.  RE: Create a column with dates

    Employee
    Posted 11-24-2015 12:58

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ryeh

    Ah, right. With a 'do output' block, you need to first specify the output first. So the first part was to define the columns I plan on outputting. There's some more documentation in the help documentation for 'output' (hit F1 while the cursor is on the word 'output' in the filter).