KAPOW

Would you like to react to this message? Create an account in a few clicks or log in to continue.
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.


2 posters

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

    avatar
    Suren


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

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

    Post by Suren 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.
    pavel.vraj
    pavel.vraj


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

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

    Post by pavel.vraj 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.
    Extracting SQL table values column wise and iteration/row wise under individual variables Kapow_11
    Extracting SQL table values column wise and iteration/row wise under individual variables Kapow_12
    BR, Pavel Vraj
    avatar
    Suren


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

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

    Post by Suren 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 _/|\_
    avatar
    Suren


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

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

    Post by Suren 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


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

    Post by Sponsored content


      Current date/time is Fri Nov 15, 2024 2:39 pm