Due to the business rules, this is the environment I have at present:
Table tblMain has fields as follows:
Column1, Column2, Column3, ..., Column10
Each column has a datatype of varchar(1000)
tblMain is populated from the source on a regular basis...
There is another table tblDataTypes which holds the datatypes, etc. of the columns in tblMain
for example the summary of tblDataTypes is as follows:
Column1 --> varchar, Length --> 6, AllowNull --> False
Column2 --> int, AllowNull --> True
Column3, --> date, AllowNull --> False
The goal is to use tblDataTypes to check the values of all the columns in tblMain and to see if the values
are in correct datatypes, etc.
What is the best way to do this check please?