|
| |
|
|
seth
Posts: 312 From: canada Status: offline
|
3 selects in 1 call - 5/15/2006 9:21:30
Hi, I was wondering if it would be possible to have 3 select stament in one call instead of 3, this is what i have: strSql = "SELECT SurveyText, SurveyID FROM SurveyEndText WHERE SurveyID=" & gstrSessionSurveyID
strSql = "SELECT DisqualifyText, SurveyID FROM SurveyDisqualifyText WHERE SurveyID=" & gstrSessionSurveyID
strSql = "SELECT QuotaFilledText, SurveyID FROM SurveyQuotaFilled WHERE SurveyID=" & gstrSessionSurveyID (3 seperate tables in the same database) Thanks
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: 3 selects in 1 call - 5/15/2006 9:24:16
Why all 3 at once? Are they for 3 separate things or will they be used all together? Can you combine them into 1 query? Can you give us more?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
seth
Posts: 312 From: canada Status: offline
|
RE: 3 selects in 1 call - 5/15/2006 9:40:04
the 3 call on for 32 text area boxes on the same page, here's more of the code, thanks: strSql = "SELECT SurveyText, SurveyID FROM SurveyEndText WHERE SurveyID=" & gstrSessionSurveyID
Set objRS = gobjConn.Execute(strSql)
If objRS.EOF Then
varWaste = "blank"
Else
strSurveyEndPage = objRS("SurveyText")
End If
strSql = "SELECT DisqualifyText, SurveyID FROM SurveyDisqualifyText WHERE SurveyID=" & gstrSessionSurveyID
Set objRS = gobjConn.Execute(strSql)
If objRS.EOF Then
varWaste2 = "blank"
Else
strSurveyDisPage = objRS("DisqualifyText")
End If
strSql = "SELECT QuotaFilledText, SurveyID FROM SurveyQuotaFilled WHERE SurveyID=" & gstrSessionSurveyID
Set objRS = gobjConn.Execute(strSql)
If objRS.EOF Then
varWaste3 = "blank"
Else
strSurveyQuotaFilledPage = objRS("QuotaFilledText")
End If
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: 3 selects in 1 call - 5/15/2006 10:33:20
Here's a sample query using joins for 3 tables and 3 memo fields related using a number field. SELECT TestTable1.Memo1, TestTable2.Memo2, TestTable3.Memo3 FROM (TestTable1 INNER JOIN TestTable2 ON TestTable1.ID = TestTable2.ID) INNER JOIN TestTable3 ON TestTable1.ID = TestTable3.ID That should give you all 3 memo fields from all 3 tables in 1 'grab' from the DB. That help any?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|