the debugger gets stuck at the where clause after the CASE statement:
sqlEPConn.Open()
vSQL = "select qtr, (Select count(RecordID) from cm_Main where OriginationID = 1 " _
& "and ProcDate between Quarters.StartDate and Quarters.EndDate) as sds_Count, " _
& "(select CASE when EndDate > GetDate() THEN '*' ELSE '' END) as DaysLeft from Quarters " _
& "where (select count(RecordID) from cm_Main where OriginationID = 1 and ProcDate " _
& "between Quarters.StartDate and Quarters.EndDate)"
'& "order by Quarters.StartDate desc"
sqlCmd = New SqlCommand(vSQL, sqlEPConn)
r = sqlCmd.ExecuteReader(CommandBehavior.Clo...
While r.Read
.Rows.Add(r("qtr"), r("sds_Count"))
End While
End With
sqlEPConn.Close()
End Sub
I've been working on this for HOURS and can't figure it out!!!
Tags: