Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


ASP.net


ASP.net

Author
Message
raafishaafi
raafishaafi
Forum God
Forum God (353 reputation)Forum God (353 reputation)Forum God (353 reputation)Forum God (353 reputation)Forum God (353 reputation)Forum God (353 reputation)Forum God (353 reputation)Forum God (353 reputation)Forum God (353 reputation)

Group: Forum Members
Posts: 1, Visits: 2
Hey,

I have a requirement, If in datatable the value of one column is null. I gotta show the value of other column in the same column.



For example:





id name descript descriptionType

1 ab doc

2 pd pdf

3 cd Business



Result should be



id name descript

1 ab doc

2 pd pdf

3 cd business.



Thanks in advance.
TallOne
TallOne
Forum God
Forum God (50K reputation)Forum God (50K reputation)Forum God (50K reputation)Forum God (50K reputation)Forum God (50K reputation)Forum God (50K reputation)Forum God (50K reputation)Forum God (50K reputation)Forum God (50K reputation)

Group: Forum Members
Posts: 370, Visits: 212
I'd take care of that on the backend.

SELECT

ISNULL(yourtable.ColumnA,ISNULL(yourTable.ColumnB,'BOTH ARE NULL')) AS ColumnA

FROM
yourTable

But there is a function called isdbnull you could probably use.

Good Luck

TallOne

GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search