cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic values in SQL query

Highlighted
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
Community Hero

Re: dynamic values in SQL query

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
[Community Expert Group]
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
Extensions available
Super Contributor

Re: dynamic values in SQL query

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!

 

 

Community Manager

Re: dynamic values in SQL query

Hi @mgroen2,

 

Was your question resolved? What was the solution?

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
2018 NEWS
Top Kudoed Authors