Hi. im developing a loan processing system using mvc c# asp.net.
One of the requirements of the system is to perform a credit history check on the customer applying for a loan.
so this is how it works:
-the customer applies for a loan. the customers id number gets stored in the id document table in the database.
-since we can't automate the credit history heck process, the information is sent to an excl file so the employee then enters the customer's ID number in the system they have to do the necessary check.
-so the employee clicks on the option "credit check" which will populate a view with all the customer's whose credit check status is "Pending".
in my business logic i have the following method to transfer the data into an excel file
public DataTable GetForCreditCheck()
{
using (var conn = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString))
using (var cmd = new SqlCommand("SELECT * FROM IdentityDocuments", conn))
using (var adapter = new SqlDataAdapter(cmd))
{
var idDocuments = new DataTable();
adapter.Fill(idDocuments);
return idDocuments;
}
}
look at "using (var cmd = new SqlCommand("SELECT * FROM IdentityDocuments", conn))".
Instead of saying "SELECT * FROM IdentityDocuments" i just want to select the ID number field ... what's the sql syntax for that?