KAPOW

Welcome to the Kapow forum. Here you can get help, use your skills to help others and enjoy hanging out in the company of other Kapow Robot Developers.


Extracting SQL table values column wise and iteration/row wise under individual variables

Share

Suren

Posts : 22
Points : 301
Join date : 2018-03-28

Extracting SQL table values column wise and iteration/row wise under individual variables

Post by Suren on Wed Jun 27, 2018 9:53 am

I have a SQL table lets say Column A, Column B, Column C, Column D with some values of 20 rows. I was able to create the headers of these tables as variables and pull the whole table of 20 rows. I want to do iteration step just like we do on excel so that I can cross compare the values with other table.

This is high priority for me, please reach out to me on tlwm_sandy@yahoo.co.in if anyone can. It will help me a lot, thanks.
avatar
pavel.vraj

Posts : 86
Points : 866
Join date : 2016-11-04
Location : Prague, Czech Republic

Re: Extracting SQL table values column wise and iteration/row wise under individual variables

Post by pavel.vraj on Fri Jun 29, 2018 4:43 pm

Hi,
you have to create a step "Query Database", where you insert a standard SELECT. In Variable Map you have to set which column from SELECT will be mapped to which variable in robot. Then it works like any other Loop.


BR, Pavel Vraj

Suren

Posts : 22
Points : 301
Join date : 2018-03-28

Re: Extracting SQL table values column wise and iteration/row wise under individual variables

Post by Suren on Sun Jul 01, 2018 10:54 am

First of all, thank you so much brother.

Lets say below is table 1 and table name is "Students Details"

NameSubjectGrade
SamBoilogyA
BillPhysicsB
MarkChemistryA
PaulPhysicsA
KevinMathsA
JohnBoilogyB
JamesMathsB

I am trying to pull or save some rows as an individual variable. For example: I would like to pull the entire rows from the table where column value "Subject" is "Maths"

KevinMathsA
JamesMathsB

"Subject" is "Physics"

BillPhysicsB
PaulPhysicsA

I would like to save these above 2 tables as variables separately(not as tables in SQL Database), so that I could use the above 2 tables to loop and perform other processes like validation.


Another case is to use the subject and name value of table 1 "Students Details" to compare with another table 2 "Students Location". So that base on this the remaining task has to be done, like inputting these values on web application


NameSubjectCity
BillPhysicsNew York
MarthaChemistryLos Angeles
PaulPhysicsSeattle
MichaelMathsBoston
ThomasPhysicsAtlanta

Thanks in advance _/|\_

Suren

Posts : 22
Points : 301
Join date : 2018-03-28

Re: Extracting SQL table values column wise and iteration/row wise under individual variables

Post by Suren on Mon Jul 02, 2018 1:40 pm

Sorry, I thought had to add some more steps in between. I just realized it can be done using the SQL query itself. Thanks.

Sponsored content

Re: Extracting SQL table values column wise and iteration/row wise under individual variables

Post by Sponsored content


    Current date/time is Tue Dec 18, 2018 11:09 pm