Automation SoftwareAutomation Anywhere
  Home > Product > Solutions > Database Automation > T89  

T89 - Automatically schedule retrieval of data from database

Task Description

Create a task that will retrieve data monthly from database and store in Excel Sheet.

Test File T89.atmn

Note: Save the .atmn file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks

Solutions
1 Create a new task

Click on New->Task Editor








Task Editor
Screenshot 1

String Manipulation
Screenshot 2

Schedule Task
Screenshot 3


2 Connect to the database

Using the Database command from the Application category specify a connection string to connect to the Database.

Connect to '<database connection string>'.
3 Specify a SQL Query to get the last month's records from database.

Using the Database command from the Application category and selecting SQL Query Option specify a SQL Query

Select * from CustomerData where Month(PurDate) = Month(Now)-1

The complete task would look as shown in Screenshot 1.
4 Specify commands which save records of last month in excel file.

  • Select Date format "mmmm,dd,yyyy" and extract month part from that using String Manipulation command,

    String Manipulation : "$Date$" and assign to : $LastMonth$

  • With the use of Keystroke commands & Loop command you get each row of the result returned by the query. And whole month's record is getting appended to Excel file.

  • Excel file would look as shown in Screenshot 2.
5 Schedule the task to store record of data monthly.

  • You can see schedule property in the main Automation anywhere window as shown in Screenshot 3.

  • Schedule this task to run at first day of every month and store the last month's database records in Excel file.
Task is automatically runs on first day of every month and records of last month automatically saved on Excel file.
Buy Now Free Trial

Next Steps
Compare versions Compare versions
Watch a flash demo Watch a flash demo
Contact me Contact me
Ask the Expert Ask the Expert
Request live demo Request live demo

Call 1-888-484-3535

Our Customers
Automation Anywhere Customers
Customer list | Case Studies

We started using this product to copy data from legacy system to new system. Now we use it just to do about anything automated. Countless hours saved. Thank you guys.
- Jack Greenberg

Read Customer Testimonies >>
  Products     Download     Purchase     Services     Support     Customers     Company     Sitemap     Trademark FacebookTwitterAutomation Anywhere Blog © Automation Anywhere, Inc. 2012 Privacy Policy
Automation Anywhere Call: 1-888-484-3535 x1   

Automation Software - Buy Now Automation Software - Free Trial