Ask a Question

dynamic values in SQL query

mgroen2
Super Contributor

dynamic values in SQL query

Hi,

 

I have following question:

is TC able to use variables in SQL statements to check on SQL db for a value created during testing?

 

For example, I have created this SQL query. AANVRAGER has a fixed value (3261464) but in stead AANVRAGER needs to be populated by a variable (I already have captured this variable from an on screen object).

image.png

3 REPLIES 3
tristaanogre
Esteemed Contributor

Not in a DB table definition like that.  For that, you will want to use an ADO object and write code to be able to pull the variable into the SQL query.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

Hi,

thanks @tristaanogre,

 

I'll take a look at it.

 

I would like to see this improved in TC so that no scripting is required for this!

 

 

TanyaYatskovska
SmartBear Alumni (Retired)

Hi @mgroen2,

 

Was your question resolved? What was the solution?

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



cancel
Showing results for 
Search instead for 
Did you mean: