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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-03-22 : 07:54:31
|
| Bill writes "I want to return a recordet from a table based upon the selection from 3 dropdowns. Here are the current Select statements that I am using.This statement selects distinct records for each dropdown.sql="SELECT DISTINCT SysDate, JobName, JobNum FROM tblJobs ORDER BY SysDate DESC"The dropdowns are MyDate, MyJob, and MyNumThis statement selects the recordset based upon the dropdowns. sql="SELECT SysDate, SysTime, JobName, JobNum FROM tblJobs WHERE SysDate='" & MyDate & "' AND JobName='" & MyJob & "' AND JobNum='" & MyNum & "' ORDER BY SysDate, SysTime ASC"This logic kinda works, but it does not do the cascade filtering that I was expecting. Basically, I want to return a temporary recordet based upon the date that I select, then filter that further based upon the Job Name that is selected that only occurs during that date, then filter again based upon the Job Num during the same date.Any help would be appreciated." |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-03-22 : 08:17:27
|
if you're doing this in .net then you can return the dataset based on the first selection and then you can just apply filters to that selection on the client with no need to go to the db again.Go with the flow & have fun! Else fight the flow |
 |
|
|
|
|
|