Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SQL quering - how to use results of one query in the following one
#6
Solved: 11 Years, 3 Months, 3 Weeks ago
I have done some further reading and the result is as follows.

Code:
Dim oConn
Dim oRecSet
Dim strQuery
Set oConn = CreateObject("ADODB.Connection")
Set oRecSet = CreateObject("ADODB.Recordset")
strQuery = "Select * from somewhere where location = 'Moon'"
oConn.Open "Driver={Microsoft ODBC for Oracle};Server=myserver.com;Uid=user;Pwd=pwd;"
oRecSet.Open strQuery, objConn


I need to select a value for a column 'Mountain' for the one record that is generated for this query and then move it to QTP Data Table. Let's call this value BigX

Afterwards I need to get results of query "Select * from elsewhere where population = 'BigX'". BigX here is the value from QTP Data Table, not DB, in other words variable dependent on previous query.

Can you please provide me with some sample code for this case?
Reply


Messages In This Thread
RE: SQL quering - how to use results of one query in the following one - by unbeliever - 01-08-2010, 07:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Rolleyes Browse object query Hema a newbie 0 1,800 07-22-2014, 08:37 PM
Last Post: Hema a newbie
  SQL Query Issue in QTP rajiv.qtp 1 2,476 11-28-2013, 10:36 AM
Last Post: Jay
  Exporting QTP runtime datatable to SQL server during SweetyChowdhury 1 3,252 05-10-2013, 03:41 AM
Last Post: sria123
  SQL on oracle database doesn't return a value Bluefields 2 3,234 07-09-2012, 01:23 PM
Last Post: Bluefields
  Do recordsets get to use only ONE query? Arena 0 2,185 04-03-2012, 07:08 PM
Last Post: Arena

Forum Jump:


Users browsing this thread: 4 Guest(s)