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 3
Highlighted
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
[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
Highlighted
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!

 

 

Highlighted
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. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Let's start July with new challenges!

Create a script to pass custom command-line arguments as a test parameter for the TechCorner tag!

Will you dare to take the challenge?


Top Kudoed Authors