I am creating a computed column across fields of which some are potentially null.
The problem is that if any of those fields is null, the entire computed column will
In Sql Server:
insert into Table_Name(PersonName,PersonEmail) values(NULL,'xyz@xyz.com')
PersonName is varchar(50), NULL is not a string, because we are not passing with in single codes, so it treat as NULL.
Code Behind:
string name = (txtName.Text=="")? NULL : "'"+ txtName.Text +"'";
string email = txtEmail.Text;
insert into Table_Name(PersonName,PersonEmail) values(name,'"+email+"')