Hi alL,
I have three dropdownlists for the filters the datagrid,
like QUALIFICATION, SKILLSET, STATUS..
now if i have selected on the dropdown of ddlqualificatio n, but ddlstatus and ddlskilsets are in 'ALL' position, and same like that STATUS and SKILLSET.. i wrote the following query eith the if condition
Dim sSQL As String = (" Select ResumeId, FirstName + ' , ' + LastName AS Name, " & _
" Phone1, Email, Skillset, Qualification, case EmailFlag when '1' then 'Sent' when '0' then 'Not Sent' else 'Not Sent' end As EmailFlag,tblst atus.Status " & _
" from tblresume INNER JOIN tblstatus on tblstatus.Statu sid=tblresume.s tatus where 1=1")
connection.Open ()
If skillset <> "0" Then
sSQL &= " And skillset like(" & skillset & ") "
End If
If Qualification <> "0" Then
sSQL &= " and Qualification like(" & Qualification & ") "
End If
If Status > 0 Then
sSQL &= " and tblresume.Statu s like(" & Status & ") "
End If
sSQL &= " ORDER BY Name ASC "
its working but my problem is, if i was selected qualification is 3 but the status is in ALL Position of my status dropdown,... i didnt get the exact anz... pls help me..
Thanks in advance..
I have three dropdownlists for the filters the datagrid,
like QUALIFICATION, SKILLSET, STATUS..
now if i have selected on the dropdown of ddlqualificatio n, but ddlstatus and ddlskilsets are in 'ALL' position, and same like that STATUS and SKILLSET.. i wrote the following query eith the if condition
Dim sSQL As String = (" Select ResumeId, FirstName + ' , ' + LastName AS Name, " & _
" Phone1, Email, Skillset, Qualification, case EmailFlag when '1' then 'Sent' when '0' then 'Not Sent' else 'Not Sent' end As EmailFlag,tblst atus.Status " & _
" from tblresume INNER JOIN tblstatus on tblstatus.Statu sid=tblresume.s tatus where 1=1")
connection.Open ()
If skillset <> "0" Then
sSQL &= " And skillset like(" & skillset & ") "
End If
If Qualification <> "0" Then
sSQL &= " and Qualification like(" & Qualification & ") "
End If
If Status > 0 Then
sSQL &= " and tblresume.Statu s like(" & Status & ") "
End If
sSQL &= " ORDER BY Name ASC "
its working but my problem is, if i was selected qualification is 3 but the status is in ALL Position of my status dropdown,... i didnt get the exact anz... pls help me..
Thanks in advance..
Comment