Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Pinto
Aged Yak Warrior
590 Posts |
Posted - 2005-04-15 : 10:16:37
|
| The following SQL fills a dropdownlist on an asp.net web page. Some of the records have null in TicketNo and these are displayed as a blank line. In fact if any of the fields in my expression are null, this happens. How can I make them display. TIADim strSQL As String = "Select DISTINCT CallNo,TicketNo,convert(varchar(20),CallNo) + '(OldRef:'+convert(varchar(20),TicketNo)+ ') 'Surname + ' :: ' + Call_desc as Ticket" _ & " from tblSL_Calls where Division = 'Environmental Services' and Service = 'BULKY HOUSEHOLD COLLECTIONS'" _ & " and Completed_time is null and Cancelled is null ORDER BY CallNo desc" |
|
|
Vivaldi
Constraint Violating Yak Guru
298 Posts |
Posted - 2005-04-15 : 10:39:26
|
| couldn't you just wrap the ticketno like this?Coalesce(ticketno,'whatyouwanttodisplay')________________________________________________As the only Republican that likes the Green Party. I am a contradiction. |
 |
|
|
Pinto
Aged Yak Warrior
590 Posts |
Posted - 2005-04-15 : 10:49:10
|
Great - I just found that function by searching round, but you have made it very clear how to use it. |
 |
|
|
|
|
|