Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Help on Inner Join Statement


Message #1 by Webmaster <webmaster@o...> on Tue, 26 Dec 2000 20:51:00 -0800
Need some help on an INNER JOIN statement. Basically want to pull out 

numerous fields from one table and the maximum value of one field from 

another table. Any comments and help would be most appreciated.



  SQLT = "Select details.ClientId, details.name, details.date, 

details.password,"

  SQLT=SQLT & " details.status, Max(Billing.Billing_End)"

  SQLT=SQLT & " FROM details INNER JOIN billing ON"

  SQLT=SQLT & " details.ClientId = billing.ID"





Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] You tried to execute a query that 

does not include the specified expression 'ClientId' as part of an 

aggregate function.



Regards,



John





--- 

NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?

Visit EarthWeb for the latest in IT Management, Software Development, 

Web Development, Networking & Communications, and Hardware & Systems.  

Click on http://www.earthweb.com for FREE articles, tutorials,

and discussions from the experts.

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #2 by "Wally Burfine" <oopconsultant@h...> on Tue, 26 Dec 2000 22:33:00 -0000
You need to add the group by clause to the sql statement.



SQLT = SQLT & " GROUP BY details.ClientId, details.name, "

SQLT = SQLT & "details.date, details.password, "

SQLT = SQLT & " details.status"





>From: Webmaster <webmaster@o...>

>Reply-To: "ASP Databases" <asp_databases@p...>

>To: "ASP Databases" <asp_databases@p...>

>CC: beginning_asp@p...

>Subject: [asp_databases] Help on Inner Join Statement

>Date: Tue, 26 Dec 2000 20:51:00 -0800

>

>Need some help on an INNER JOIN statement. Basically want to pull out

>numerous fields from one table and the maximum value of one field from

>another table. Any comments and help would be most appreciated.

>

>  SQLT = "Select details.ClientId, details.name, details.date,

>details.password,"

>  SQLT=SQLT & " details.status, Max(Billing.Billing_End)"

>  SQLT=SQLT & " FROM details INNER JOIN billing ON"

>  SQLT=SQLT & " details.ClientId = billing.ID"

>

>

>Microsoft OLE DB Provider for ODBC Drivers error '80004005'

>[Microsoft][ODBC Microsoft Access Driver] You tried to execute a query that

>does not include the specified expression 'ClientId' as part of an

>aggregate function.

>

>Regards,

>

>John

>

>

>---

>NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?

>Visit EarthWeb for the latest in IT Management, Software Development,

>Web Development, Networking & Communications, and Hardware & Systems.

>Click on http://www.earthweb.com for FREE articles, tutorials,

>and discussions from the experts.




>leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com

>



_________________________________________________________________

Get your FREE download of MSN Explorer at http://explorer.msn.com





--- 

NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?

Visit EarthWeb for the latest in IT Management, Software Development, 

Web Development, Networking & Communications, and Hardware & Systems.  

Click on http://www.earthweb.com for FREE articles, tutorials,

and discussions from the experts.

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com


  Return to Index