| || |
Difficulty in comparing data between tables in TC
This is what I am trying to do:
- Connect to "Oracle DB" and take data from the database and put into "database table checkpoint(1)"(that is the Store|DBTable).
- Connect to "SQLDB" and take data from the database and put into "database table checkpoint(2)" (that is the Store|DBTable).
- Compare data in "database table checkpoint(1)" with data in "database table checkpoint(2)".
I am having difficulty compareing the data between 2 different tables. what is the string to compare those 2 tables? (I am codeing in VBscript)
I would appreciate your help.
Re: Difficulty in comparing data between tables in TC
I'm not sure what your exact problem is..
If you're trying to connect to those 2 databases, the easist way I think is to use ADODB to connect to the database using ODBC.
Set DBConection = Sys.OleObject("ADODB.Connection")
DBConection.ConnectionString = <insert connection string here>
The connection string is tricky since it's varies depending on the ODBC db driver you have installed. You'll need figure out that one out yourself.
From there you can run queries.
Set dbQueryCommand = CreateObject("ADODB.Command")
Set dbQueryCommand.ActiveConnection = dbConnection
dbQueryCommand.CommandType = adCmdText
dbQueryCommand.Prepared = true
dbQueryCommand.CommandText = <replace with your SQL query>
set ResultSet = dbQueryCommand.Execute
I guess if you're comparing 2 databases, you'll have 2 of these goings, then run the same query on both connections, then do a comparison of the ResultSet objects.