HI
below is House_info table in database
Id
|
Behtop
|
Service1
|
Service2
|
Service3
|
Name
|
1
|
1111
|
Ser1
|
Ser2
|
Ser3
|
Sara
|
2
|
2222
|
ser4
|
|
|
|
I have lable=lblservice in my page that bind it from data base I want in lblservice show service1 and service2 and service3 column's data like below
ser1 , ser2 , ser3 so I wrote below code in SP
SUBSTRING (ISNULL([Service1]+','+' ',' ')+ISNULL([Service2]+','+' ',' ')+ISNULL([Service3]+','+' ',' ')+ISNULL(' ',' '),0,66)+'...' as Service
but here as you see in row with id=2 there isn't any data in service2 and service3 columns and just in service1 is data(ser4) so it show in lblservice data like below
ser4, , , ...
but I want if in one of column doesn't be data it doesn't show (,) that come after data I mean I want if in 1 columns be data in show:
ser1,... NOT ==> ser1, , , ...
if in 2 columns be data shows
===>( ser1,ser2, ...) NOT ===>(ser1,ser2, , ...)
How I can do it?
Best Regards
Neda