April 13, 2010 at 12:28 am
Hi,
I have a requirement that imports CSV file data to Sql server tables.
Steps need to do:
1. Import csv data to sql temporary table
2. validation of import data with sql server tables (column wise)
3. Make DML operations with that import data.
I got the solutions to steps 1,3.
but i didnt get solution for column wise value validation at the sql server. Can any one help on this.
Waiting for your reply,
Thank you
April 13, 2010 at 3:21 am
Hi Thank you for your response.
Information:
Importing null string from csv File to "Not Nullable" Integer column.
Eg.,
CSV Sql Server
Column Name (Eno) Column Name (Eno) Not Null
------------------- -----------------------
""
I want to validate the nullable data since the corresponding Sql column is not a nullable type.
Thank You...
April 13, 2010 at 6:14 am
Using Books On Line
Lool at the ISNULL function:
ISNULL ( check_expression , replacement_value )
check_expression
Is the expression to be checked for NULL. check_expression can be of any type.
replacement_value
Is the expression to be returned if check_expression is NULL. replacement_value must be of a type that is implicitly convertible to the type of check_expresssion.
Return Types
Returns the same type as check_expression.
Remarks
The value of check_expression is returned if it is not NULL; otherwise, replacement_value is returned after it is implicitly converted to the type of check_expression,
Or if you want to alter processing when an imported row has a NULL value in a particular column examine the IS NULL or IS NOT NULL functions
Use the IS NULL or IS NOT NULL clauses to test for a NULL value.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply