|
Question : Need to know how to set a cell to blank when the value is an integer like relace 0 and 0.00 with a blank
|
|
Edit 66 Cambridge Systematics, Inc. [email protected] 25.00 pnd Christopher Wornum 1/21/2010 Edit 82 Sensible Environmental Solutions Inc. [email protected] 50.00 pnd Robert Sutton 1/22/2010 Edit 0 0.00 Christa Johnson 1/22/2010 Edit 86 PGAdesign [email protected] 50.00 pnd Maura Baldwin 1/22/2010 Edit 0 0.00 Cindy Angers 1/22/2010 ===================================================================================
this is the sql code
Dim strSelectCommand As String = "select case when rn = 1 then strName else char(32) end as strName, strRegistrationUserName, case when rn = 1 then cast(intRegistrationID as varchar) else char(32) end as intRegistrationID, case when rn = 1 then strEmail else char(32) end as strEmail, case when rn = 1 then cast(fltOrderAmount as varchar) else char(32) end as fltOrderAmount, case when rn = 1 then cast(strRegistrationStatusID as varchar) else char(32) end as strRegistrationStatusID, case when rn = 1 then cast(dtmCreated as varchar) else char(32) end as dtmCreated from ( SELECT r.strName, u.strRegistrationUserName, row_number() over (partition by r.strName order by r.strName) rn, r.intRegistrationID, r.strEmail, r.fltOrderAmount, r.strRegistrationStatusID, r.dtmCreated FROM i2Integration_EventRegv45_Event e, i2Integration_EventRegv45_RegistrationUser u left outer join i2Integration_EventRegv45_Registration r on r.intRegistrationID = u.intRegistrationID where e.intEventID = r.intEventID and (YEAR(e.dtmEvent) = '" + ddlYear.SelectedValue + "' AND MONTH(e.dtmEvent) = '" + ddlMth.SelectedValue + "' AND strTitle = '" + DroplistData.SelectedValue.Tostring.replace("'","''") + "') and r.strPaymentMethodID = 'Check' and ((r.strRegistrationStatusID = 'pnd') OR (r.strRegistrationStatusID = 'cmp' ))) a"
|
|
Answer : Need to know how to set a cell to blank when the value is an integer like relace 0 and 0.00 with a blank
|
|
It worked for me.
|
|
|
|