olzserve.blogg.se

Apex sql generate
Apex sql generate






In the case when the increment step is set to 0, the generated sequence will create as much values as it is requested by the number of rows set for the table containing the selected column, but those values will all be the same and will be equal to the start value of the sequence. This repeats the generated sequence until the requested number of values is generated.

apex sql generate

To create enough values to fill the requested number of rows for the table containing the selected column (8 rows in this example), the Loop option needs to be checked.

apex sql generate

The sequence generated with this setup can contain only 4 values, shown on the image below. In this example the start value is set to 12:00:00 AM, end value to 12:00:00 AM, increment step is 15 days and the requested number of rows for the table containing the selected column is set to 8. The same thing happens in every case when the sequence cannot create enough values to fill the requested number of rows for the table. This is a special case because no matter how many rows for the selected column are requested, the generated sequence can create only one value, so the global number of rows for the whole table containing the selected column is reduced to 1. In this situation, only one row will be generated, containing the value set as start/end point of sequence. One of the special cases in generating the sequence of values can be when start and end values are the same. The first 8 values of the generated sequence created with this setup is shown on the image below. start value is 12:00:00 AM and end value becomes 12:00:00 AM, but increment step stays the same (15 days), the generated sequence will go in decrementing order, which can be detected in the label next to the value of increment step. If the start and end value switch places, i.e. The first 8 values of the generated sequence are shown on the image below. In the case of generating the sequence of SQL Datetime values starting from 12:00:00 AM up until 12:00:00 AM and with increment of 15 days, the generated sequence will go in incremental order. If the start value is lower than end value, the generated sequence goes in incremental order, and vice versa.Įxamples of increment and decrement sequence The order is decided by the difference between start and end values. The generated sequence can go in ascending or descending order. The incremental generator creates a sequence of values from start up to end value, with the step specified by the increment value.

apex sql generate

This article explains how to generate sequential data in ApexSQL Generate by using the Incremental generator and shows some special cases regarding the settings of this generator.








Apex sql generate