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 |
|
mattsterrett11
Starting Member
6 Posts |
Posted - 2012-02-01 : 09:04:32
|
| hi there, I have many different tables with different variables stored on my server, i have been asked to create lookup tables to run for them to help automate data checks, for example *if mothers age (MAge) is higher than 40 then i need it to bring back an error for that entry and if possible place all flagged entries into an excel file.Would anyone have any idea how to start/do this as i am at a comple loss!many thanks for your time :) |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-01 : 09:24:58
|
| hmm...your explanation doesnt make much sense. what has lookup to do in this? looks like what you're after is like some kind of validation check i guess------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
mattsterrett11
Starting Member
6 Posts |
Posted - 2012-02-01 : 09:34:59
|
| Yes sorry, i may have been slightly confused here, sql noob :( |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-01 : 09:48:53
|
| so as i understand you want to run validation checks on the data and then based on result you've to put the messages and export it to excel? is that correct?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
mattsterrett11
Starting Member
6 Posts |
Posted - 2012-02-01 : 09:51:22
|
| yea, any entries that are flagged up by the checks would need to be exported to excel. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-01 : 09:56:42
|
| ok...then use a stored procedure to do checks and return messages based on your condition and store it in a table against datathen call this stored procedure using distributed query like OPENROWSET and then export results to excel------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|