Forum Discussion

Wouter's avatar
Wouter
New Contributor
8 years ago
Solved

SQL where in groovy script

Hi,   The following groovy script does nothing:     def cmd = /sqlcmd -S 127.0.0.1\MSSQLSERVER -d LocalDevelop10DB -Q "DELETE FROM T_TimeRegistration WHERE TimeRegLineNr > 36"/ cmd.execute()   ...
  • JustinM89's avatar
    JustinM89
    8 years ago

    Do you need to fire off the query within a Groovy script? Seems like a lot to manage when ReadyAPI has a built-in JDBC request test step to handle all of this. I've had success building my query in a  Groovy script then passing this string to the query of a JDBC request step.