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 |
saidev
Posting Yak Master
101 Posts |
Posted - 2006-07-21 : 22:49:09
|
Hi Guys,I have a query that i need to go through the loop. can you guys help me how to put loop for this in vb.net.If Me.rdounwired.Checked = True And Me.rdoallinv.Checked = True Thensql = "SELECT DISTINCT fkGroup, fkAgency, fkAdvertiser FROM tblSpot WHERE fkInvoice IS NULL AND dateScheduled <= '" & Me.ddbmonth.SelectedValue & "' AND fkContractType = 'UNWIRED'"Else If Me.txtsubgroup.Text = "" Thensql = "SELECT DISTINCT fkGroup, fkAgency, fkAdvertiser FROM tblContract WHERE fkGroup = '" & Me.txtgroup.Text & "' AND fkContractType = 'UNWIRED'"Elsesql = "SELECT DISTINCT fkGroup, fkSubGroup, fkAgency, fkAdvertiser FROM tblContract WHERE fkGroup = '" & Me.txtgroup.Text & "' AND fkSubGroup = '" & Me.txtsubgroup.Text & "' AND fkContractType = 'UNWIRED'"End IfEnd Ifdbfunctions.RunSQLQuery(CONNECTIONSTRING, sql)Thanks |
|
|
|
|