I would like to know is there a way to insert values to the same column without updating the same value.
This is my table structure
Column Name Data Type Allow Nulls
----------- --------- ------------
Expiry Date Date No
Now I would like to insert multiple date values in the Expiry Date. So how do I do that?
So that my output should be as follows:
Expiry Date
23/3/2014,23/4/2014,23/5/2015
This is my insert Statement
cmd.CommandText = "INSERT INTO Customers (UserID, Validity, Amount, RegisteredDate,
ExpiryDate, FirstName, LastName, Address, State, City, Phone, Mobile, Email)
VALUES(@UserID,@Validity,@Amount,@RegisteredDate,@ExpiryDate,@FirstName,@LastName,
@Address,@State,@City,@Phone,@Mobile,@Email)"
This is my Update Statement:
cmd.CommandText = "UPDATE Customers SET UserID = @UserID, Validity = @Validity,
Amount = @Amount, RegisteredDate = @RegisteredDate, ExpiryDate = @ExpiryDate,
FirstName = @FirstName, LastName = @LastName , Address = @Address, State = @State,
City = @City, Phone = @Phone, Mobile= @Mobile, Email = @Email WHERE UserID = @UserID"