Forum Discussion

ReshmaSachdev's avatar
ReshmaSachdev
Contributor
12 years ago

Data Source records count

Hello,

Can anyone tell me how to get count of records of a data source [may be using groovy] which uses some data base query and returns different records based on some condition?

Thanks,
Reshma

1 Reply

  • SiKing's avatar
    SiKing
    Community Hero
    To manipulate the datasource in SoapUI have a read through here: http://www.soapui.org/Scripting-Propert ... -datasinks

    However, you mentioned database query and some condition. I very often use something like:

    select *, rand() as INDX from <table>
    where <some condition>
    order by INDX
    limit 1

    Your mileage may vary depending on the db engine you have!