a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

3 selects in 1 call

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> 3 selects in 1 call
Page: [1]
 
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.

(in reply to seth)
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

(in reply to rdouglass)
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.

(in reply to seth)
seth

 

Posts: 312
From: canada
Status: offline

 
RE: 3 selects in 1 call - 5/15/2006 14:42:30   
perfect thanks a lot :)

(in reply to rdouglass)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> ASP and Database >> 3 selects in 1 call
Page: [1]
Jump to: 1





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