Technote (troubleshooting)
Problem(Abstract)
When adding a new table to an existing dimension, the test results show no data being returned.
Symptom
NULL values where data is expected
Cause
Two tables were being joined on a VARCHAR field. However, in one table, the field was described as VARCHAR(4) and the other it was a VARCHAR(1).
Environment
SQL Server 2008 R2 source database
Diagnosing the problem
Individually, each table contained data and select statements show that the columns have similar values.
Resolving the problem
Cast the VARCHAR(1) field to a VARCHAR(4) field so that the join will succeed and data will be returned.
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.