| Author |
Topic |
|
Gudiya
Starting Member
14 Posts |
Posted - 2012-07-23 : 22:19:43
|
| Hi, this is my first work. I am working as a QA tester. My boss gave me source to target mapping document, from which I need to write sql queries to verify the records. So how to start writing sql? There are source tablename, source column name, transformation rules, target tablename and target source column. I am not clear on do I need to implement the rule first to source and then to target taking the column as specified? And also what are the different ways of checking and validating the records?Thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-07-23 : 22:32:06
|
| based on your transformation rules you need to implement those in sql queries against your sourcetable and source column and make sure that result obtained is same as your target tables target column. wherever there are differences, document them with details of issue found------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
Gudiya
Starting Member
14 Posts |
Posted - 2012-07-24 : 00:01:26
|
| Thanks..I am working on it and I am trying to implement the sql on both source and target separately. While validating the records, I tried with count. So what are the other options to validate the records? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-07-24 : 00:12:42
|
| what all validation you want to perform? there are few functions like isdate(),isnumeric() etc if you want to check for datatypes------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
Gudiya
Starting Member
14 Posts |
Posted - 2012-07-24 : 00:29:18
|
| I need to check how many matched records are present, how many unmatched records as per column. there are so many common columns and the records are so many that I get confused which Column should I take. And also what are the possible aggregate function I can use for comparision? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-07-24 : 00:56:15
|
| for matched unmatched records use inner and left joins. join condition should be primary key column(s)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
Gudiya
Starting Member
14 Posts |
Posted - 2012-07-24 : 15:37:21
|
| I use the except operator to check the rows between the source and target by the common column. But I am not 0 rows. So what are the possible options that i can use to check why its not 0 rows? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-07-24 : 15:46:10
|
| copy contents on two sheets of excel ordering on pk and then apply formula to compare cell by cell (EXACT function)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
Gudiya
Starting Member
14 Posts |
Posted - 2012-07-24 : 16:39:50
|
| I used exact function and got the result false. Now I want to get the unmatched records. I got matched records joining two tables. |
 |
|
|
Gudiya
Starting Member
14 Posts |
Posted - 2012-07-24 : 18:49:39
|
| Thanks for your help. Can you please explain the one to one mapping in S2T document. |
 |
|
|
|