View Single Post
  #2 (permalink)  
Old 02-25-2010, 05:12 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

To access the result returned by the SQL Query, use the $Dataset Column$ System variable provided by Automation Anywhere. Use Loop for Each row in a SQL query dataset option to loop through all the rows of the SQL Query result. To access each column use $Dataset Column(index)$ for e.g. to get the first column use $Dataset Column(1)$. Then inside loop you can insert 'If Variable' command to check $Dataset Column(index)$ is equal to 1.

Text format of commands would appear something like this,

Execute SQL Statement: select * from tablename
Start Loop " Each row in a SQL query dataset of Session = Default"
If $Dataset Column(1)$ Equal To "1" Then
Comment: Please enter the conditional commands here.
End If
End Loop

Hope that helps.
Reply With Quote