Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2001-10-17 : 19:52:26
|
| My goal is to do this without a cursor, but still do it efficiently...I have an Excel sheet that needs to be validated before being imported. A SQL Server-centric solution would be to import it into a table made up of varchars for all of the fields so that I can then do data validation. The two types of validation that I want to do are to A) Check that all required fields contain data for every row, and B) Check that numeric and date fields contain valid values.Now the trick... I want an output that would tell me something like:Row 1 is missing StartDate and LocationRow 5 is missing EventTypeRow 12 StartDate is invalid...Any ideas on how to accomplish this (somewhat efficiently) in SQL, or should I just write a pre-processor in VB?-------------------------------------------------------------------Just because you CAN do something does not mean that you SHOULD! |
|
|
|
|
|