Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
| Search | Today's Posts | Mark Forums Read
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 16th, 2005, 01:42 PM
Registered User
 
Join Date: Jan 2005
Location: Fayetteville, nc, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Kathryn
Default Multiple table Query-HELP

 Hi all!

I have an ASP page where the user enters the SSN than I query 4 tables (MAST,S1MMARY,S1UDREC,N1TEREC) that all have the field SSN in them. We use dbase, so there are no Auto-assigned numbers in these tables which is why I use SSN.

Table Fields
MAST DOB,SID,FIRSTADD
S1MMARY LNAME,FNAME,TRANSF
S1UDREC CR
N1TEREC CR

In S1UDREC and N1TEREC there will me multiple entries for that SSN. They will need to be added together, not sure how to do that.

The following is the sql string I am using. When I try to display it, it comes back "False"? With no Sql string.

"SELECT S1MMARY.SSN,MAST.SSN,S1UDREC.SSN,N1TEREC.SSN,S1MMA RY.LNAME AS LNAME,S1MMARY.FNAME AS FNAME,S1MMARY.TRANSF AS TRANS,MAST.DOB AS DOB,MAST.SID AS SID,MAST.FIRSTADD AS INITDATE,S1UDREC.CR AS CR1,N1TEREC.CR AS CR2 FROM MAST JOIN S1MMARY ON(MAST.SSN = S1MMARY.SSN)JOIN S1UDREC ON(S1MMARY.SSN = N1TEREC.SSN)JOIN N1TEREC ON(S1UDREC.SSN = N1TEREC.SSN) WHERE MAST.SSN='" & strSSn & "'"



Thanks for any help


Kathryn
  #2 (permalink)  
Old March 22nd, 2005, 10:57 AM
Registered User
 
Join Date: Jan 2005
Location: Fayetteville, nc, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Kathryn
Default

Ended up using multiple sql statements.

Kathryn


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a Make Table Query produce a Linked table? kronik Access 5 May 16th, 2006 06:17 AM
Make Table query : table in Another Database marnik Access 1 March 19th, 2005 12:39 PM
Multiple Joins in Multiple Table Search query pookster Access 4 September 23rd, 2004 03:04 PM
Multiple Table Query Problem mikericc Access 3 February 16th, 2004 12:21 PM
Error on Make-Table Query In Union Query rylemer Access 1 August 20th, 2003 07:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.