Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Helo guys,
So I have this SQL query that regurts a set of number (1,2,3,4,5,6....,1999,2000,2001) .
I would like to add to these results 3 more values, for example, if I have 1,2,3,4,5,6....,1999,2000,2001 and I add the values I would get 1,2,3,4,5,6....,1999,2000,2001,2002,2003,2004.
How can I achieve this?
Thank you in advance!!
Best regards.
Hi,
Try this sample script
QV_Table:
LOAD
*
INLINE
[
Sequence, Dim
100,abc
101,def
102,ghi ];
MaxValue:
LOAD
Max(Sequence) AS MaxSequence
RESIDENT QV_Table;
LET vMaxSequence = Peek('MaxSequence');
DROP TABLE MaxValue;
Concatenate(QV_Table)
LOAD
$(vMaxSequence) + RecNo() AS Sequence
Autogenerate(3);
I am getting additional records with 103, 104 and 105.
Regards,
Jagan.
based on what you need to add the values, what is the pattern?
This is to be used on a table where I see values in a FIFO system.
The values I get from my query are things that already happened (green), and the values I want to add are things that are going to happen (grey).
If there is a better way to achieve this without messing with the query I wouldn't mind
Table:
Load Sequence,Number,Time From Table
Concatenate
Load Max(Sequence)+1 As Sequence Resident Table
Concatenate
Load Max(Sequence)+2 As Sequence Resident Table
Concatenate
Load Max(Sequence)+3 As Sequence Resident Table
Is the "Table" from "Load Sequence,Number,Time From Table"
what I use in the sql query?
QV_Table:
Sql Select Sequence,Number,Time From Table;
Concatenate
Load Max(Sequence)+1 As Sequence Resident QV_Table;
Concatenate
Load Max(Sequence)+2 As Sequence Resident QV_Table;
Concatenate
Load Max(Sequence)+3 As Sequence Resident QV_Table;
Nop, I still get an error.
It seems like QV is looking for "Table" on the project's folder...
I don't understand why
Hi Ivo,
Change the "Table" In SQL command by your table name.
Márcio
I use a lot of tables on my query (and the respective relation between foreign and primary keys).
But even with all those tables I still get the same error. It seems that QV is always looking for something on the folder.
Ivo,
You have to analyze your entire script and identify what (or whom) tables are needed. The example works only if you have all the fields coming from the same table, and the "Table" exist in the database.
If possible, share the qvw file so we can guide you.
Márcio