- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How to concatenate data tables pulled from database within a loop?
The following JSL script snippet pulls test data from database for tested part IDs given in myList using my function opnDtb. This works as expected and the data tables are pulled individually. I would like each new data table pulled to be concatenated (vertically below) to the previous data table. How to implement this in JSL?
For( i = 1, i <= N Items (myList), i++,
dt = opnDtb(myList [i]);
);
Note that all parts listed in myList do not always have test data available (i.e. awaiting test) so I would also need to neglect the cases where JMP throws a warning for no data pulled from database.
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'XXXX'
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to concatenate data tables pulled from database within a loop?
For concatenating data tables use Concatenate() with "Append to first table"
Either perform first data query outside the loop and define that as "main" table or use condition inside the loop to define the main table
If(i == 1, dt = ..);
To capture those ODBC messages you have few options: check for LogCapture() the query and use if statement to check for eeror messages or check for empty() data table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to concatenate data tables pulled from database within a loop?
For concatenating data tables use Concatenate() with "Append to first table"
Either perform first data query outside the loop and define that as "main" table or use condition inside the loop to define the main table
If(i == 1, dt = ..);
To capture those ODBC messages you have few options: check for LogCapture() the query and use if statement to check for eeror messages or check for empty() data table.