Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > SQL Language
Password Reminder
Register
| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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
Reply With Quote
  #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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:41 PM.


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