Toad World® Forums

Null columns in the Table Comparison outcome verification


#1

I have an issue similar to that described in this thread:
http://unittest.inside.quest.com/thread.jspa?threadID=4264&tstart=15

In my particular case, I have data manipulation on a table (TAB_A) caused by a procedure call. I also have a seperate table (TAB_B) that maintains the expected end-result. In writing the test, i use the Outcomes:
A. Data changed by program
Table
TAB_A

B. Test Type

C. Expected results
Table
TAB_B

I am getting the same issue described in the thread above:
Type Description ERROR The column list specified by the Changed by Program data structure is incompatible with the column list specified by the Expected Results data structure. Make sure that the table and/or query on both “sides” of your outcome return a compatible set of column values. Note that you cannot include the NULL literal in your column list. Instead, you must place the NULL inside a TO_* conversion function so that Code Tester can determine the datatype of that column.

I couldn’t tell what the solution was. I could write queries to handle the to_char(null) columns, but I was hoping for a more straightforward (and maintainable) solution. On a similar note, I get the error in creating this test when I compare TAB_A to itself. Am I simply constructing these tests the wrong way?

Thanks,
Matthew


#2

Can you please publish or send to me the definition of your table?