Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Query result as data set
Topic Summary:
Created On: 05/23/2013 06:33 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 05/23/2013 06:33 AM
User is offline View Users Profile Print this message

Author Icon
SamuelHolder
Apprentice (20-49)

Posts: 44
Joined: 06/13/2006

I'm reading a query from an access database that has 211 results.

Each row is formatted as :

select all '[MNEMONIC]','[NAME]' UNION ALL

I have a second sql statement in the task that has the following:

DROP TABLE tblNames
CREATE TABLE tblNames (Mnemonic varchar(8), Name varchar(20))
insert into tblNames (Mnemonic, Name)
( )

I want to write the SQL statement so that the entire dataset from the access query is inserted:
DROP TABLE tblNames
CREATE TABLE tblNames (Mnemonic varchar(8), Name varchar(20))
insert into tblNames (Mnemonic, Name)
(row1,
row2,
row3,
row211 )

Is this possible to send the entire dataset from the first qry to a variable?

 Category Survey
 05/23/2013 12:08 PM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Samuel,
to do so, you will have to loop the dataset and write the output row by row.
There is no shortcut available.
The loop can be either an Automate Loop dataset or be written in a basic script.

 Category Survey
AutoMate 8 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 1547 guests browsing this forum, which makes a total of 1547 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog