Join The Tables In Database

I have an access database called employment.mdb The fields that I have in this database are:

Company, Location, Dates, Position, Signing, and Duties.

The problem I am having, I can go in and create a Drop Down pulling information from the Company field, but I can not get the information from the rest of the fields to
populate. I want the Database column values to change when I select a different company.
I will be honest, my only experience with it has been thru Frontpage, I can go in and create a drop down, but get errors if I try to add other database connections into that query. I have enough experience at working with html, but not the asp side of it. I would really appreciate some help with this.

View Replies


ADVERTISEMENT

SQL JOIN 3 Tables

I've got three tables:

tblEvent
--------
Id (PK) | Event_Name

tblDelegate
--------
Id (PK) | Delegate_Name

tblBooking
--------
Id (PK) | Event_Id (FK) | Delegate_Id (FK)

I need to retrieve a recordset with the following information:

Booking Id | Event_Name | Delegate_Name

Can anyone see how to do a SELECT statement to do this?

View Replies View Related

How Do I Inner Join 3 Tables?

strSQL = "SELECT x.CountryId, x.CountryName, y.SiteId, y.SiteName, z.LocationId, z.Level FROM TableCountry AS x"
strSQL = strSQL & " INNER JOIN TableSite AS y ON (x.CountryId = y.CountryId)"
strSQL = strSQL & " INNER JOIN TableLocation AS z ON (y.SiteId = z.SiteId)"

Error Type:

Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression '(x.CountryId = y.CountryId) INNER JOIN TableLocation AS z ON (y.SiteId = z.SiteId)'.
/system1.asp, line 21

View Replies View Related

Inner Join 2 Tables?

how do i do this?

View Replies View Related

How To Inner Join Tables

I have a MSAccess 2000 mdb where 2 tables must be connected with a fieldname "book_spoke".
This is what I have so far. Is it right? The purpose is to find within the search result all the book_spoke s and link with the proper url for each book_spoke. Code:

View Replies View Related

How To Update Join Tables?

I have a question about JOIN'ed table in Access. I have 2 tables in my database with one being tbl_Events and the other tbl_VolunteerSchedule. tbl_Events contains information regarding upcoming Events. tbl_VolunteerSchedule contains the names of Volunteers plus information from tbl_Events pertaining to the event the volunteer is volunteering for.

What I need is for tbl_Volunteer to Update when I make changes to the Events in tbl_Events. I thought that it was working correctly when I used a LEFT JOIN. However if I make updates to tbl_Events it adding additional record to tbl_Volunteer. It should only Update tbl_VolunteerSchedule when the fields EventID match. Does this make sense? Code:

View Replies View Related

Join Tables In Access

how do i join tables in access and how do i get asp to output information from two separate tables that have the same primary key?

View Replies View Related

Need To Join Two Tables And Use A Session Variable

Currently have

'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT [firstname], [lastname], [homepage], [aim], [location], [interests], [email] FROM tblUsers WHERE ID =" & userID

need to use session variable but need to select records form another table based on the logged in user (session variable) Code:

View Replies View Related

How To Write Sql Statement That Join 3 Tables

i have this code that join 2 tables, Reservation and Customer. Next, i wanted to add another table, Staf to get the name of staf that responsibled on a particular reservation. there is a field name staffCode (FK at Reservation table, PK at Staf table) at the Reservation table. Code:

View Replies View Related

Rewrite My Code To Join Tables In My DB

I have some code I need modified and I can't seem to figure it out. Here's the section of code I need to change: ....

View Replies View Related

Join Two Tables In This Complicated Query

I've two tables:

First Table Player
tbl_player (fld_id, fld_dor, fld_tname, fld_tpass, fld_name, fld_email, fld_mobile)

Second Table Attempt
tbl_attempt (fld_attempt_id, fld_dop, fld_tname, fld_pid, fld_pscore)

Relation of First Table with Second Table is fld_tname and fld_pid of tbl_attempt with fld_id of tbl_player

Basically this is a 2-player game in which tbl_player contains both player a and player b details (they are identified by same Team Name). Table Attempt (tbl_attempt) holds individual scores which again can be grouped as a team score by the field fld_tname. Code:

View Replies View Related

Creating Database & Tables Using ASP

I want to create a database and its tables and populate it through a web page, using ASP. The database is MySQL on win32 (4.10.13-nt) and the driver is MyOLEDB 3.0.

One thing, to set up the ole-db connection, it seems I have to specify a data source, which is an already existing database.

The Connection works and I actually can create the database, but the code for the table creation generates a 500 server error. The SQL itself is taken straight out of MySQLcc query window, so I know it's all good, syntactically.

(Also, regarding the connection, I can connect to and read from an existing database. It's the table creation that seems to be the trouble.)

I did a response.write to the page to make sure that the code coming out is what went in and that is the case. So, I guess one question is, what could be different about creating tables in a db that would fail, when "create database test_links;" and "use test_links;" both complete successfully (and the newly-created database shows up, just no tables in it).

To test the sql, i made three strings of SQL and executed each of them sequentially. The first two work, the third (table generation) fails.

A second question is, is there a way to capture any error message that might be generated at the MySQL end, rather than having the page bomb out; and then display the error. I tried using a RecordSet object, that didn't work, the page still crashes.

View Replies View Related

Hot To Create Tables In A Database With ASP?

I've made a website for a little athletics club in HTML. I want to transform the records page into an ASP page that has an admin page so i can go to the admin page and easily add in the records without having to create all the tables and doing it all the manual way.

I know how to create the admin page and the database, but in my case, i want to be able to create a new table in the database for each week of records (as seen in the link below), and each of these tables will have the same fields (age, gender, event, athlete name etc.) I know how to make it so that asp can add, edit and delete a field in a table, but how would i get it to add a new table for each week of records?

View Replies View Related

2X Tables Database Treat

I have Database with 2x tables one with Client data and 2nd with invoice data.
When a new invoice is submited in the invoice data I enter only the client ID not all the client data.

Ok the problem is that when I want to print out the last or any invoice data I have only the Client ID
not the all client data.

View Replies View Related

Joining Two Tables From Two Different Database

I wanted to ask your opinion about *joining two tables* from *two different database* together. Is *that* possible My project requires me to join identical tables from different database; *eg. MyTable* from *Friends.mdb* and *Foes.mdb* respectively. Is that achievable? I do hope anyone here can enlighten me on this one because I am really a newbie in using Access DB and also I'm using *ASP* in this project.

View Replies View Related

Search On Database Tables

I want to do a searching on database some tables' content, is asp have so function or tool to do this?

View Replies View Related

Searching All Database Tables

How can ASP be used to search through a database that has multiple tables in it? I want to be able to enter a string into a field in an ASP page and the resultant tables to be listed in a table or list on an asp page. It might be the same page or another. I know it can be done - but I can't link the concepts or code together.

View Replies View Related

Linking Tables From Another Access Database Using ASP

I was just wondering if there is anyway to link tables from another Access database using ASP. Just like the function in Access where we can go File->Get External Data->Link Tables.

I have implemented some e-modules and they all have individual database as a backend. But, my boss would like to allow all these e-modules to share data. Therefore I am thinking of linking all the tables in those databases through a 'gateway' database (gateway.mdb). This 'gateway' database would have link tables from all other databases.

View Replies View Related

Display Tables In MySQL Database

i need to display all my tables from the mySQL database in a table on an ASP/Javascript page, each as a link, so that when clicked, it wil open the selected table for editing. unable to do it as dreamweaver MX is not accepting 'show tables' as a valid query. how can i go about doing this? i'm relatively new to ASP, working on it for only 2 months now.

View Replies View Related

Select Database Then Multiple Tables For Updates

What I want to do I select one database and the set the Rs1, rs2 etc.. like in Vb6 I would set DB then:

Set rs1 = db1.OpenRecordSet("Table1")
Set rs2 = db1.OpenRecordSet("Table2")

etc...

However how do I do this in asp3? Code:

View Replies View Related

Creating Dynamic Tables In Dreamweaver To Display Tables

I know how to create dynamic tables in dreamweaver to display fields and records in a table of a database, but in my case I need to create a dynamic table that lists all the tables in the database, then to click on the one i want 2 edit the data in there.

View Replies View Related

Inner Join

I am trying to create a record set using data from two tables. I am using the following code-
Dim objRS
oracleConnection.CommandText = "SELECT CONTACT.CONT_FNAME, LOGIN.LOGN_USER_EMAIL " &_
"FROM CONTACT INNER JOIN LOGIN ON CONTACT.LOGN_ID= LOGIN.LOGN_ID WHERE CONTACT.CONT_ID LIKE 3"
oracleConnection.CommandType = adCmdText
Set objRS = oracleConnection.Execute

Set oracleConnection = Nothing

While Not objRS.EOF
Response.Write objRS("CONT_FNAME") & " " & objRS("LOGN_USER_EMAIL")
objRS.MoveNext
Wend

I am getting an error at the line
Set objRS = oracleConnection.Execute
The error is
SQL command not properly ended

View Replies View Related

INNER JOIN

I have three tables in the DB MySQL:

TABLE_V = id, codebar, description
TABLE_C = id, codeplu, description
TABLE_M = id, internalcode, description

In the tables TABLE_V and TABLE_M for each record the descriptions are the same, Is different in the table TABLE_C.

Relations in the tables:

TABLE_V.CODEBAR ===> TABLE_C.CODEPLU
TABLE_V.DESCRIPTION ===> TABLE_M.DESCRIPTION
TABLE_C.CODEPLU ===> TABLE_M.INTERNALCODE

I must query INNER JOIN into three tables to extract CODES and corresponding DESCRIPTIONS, its possible ?

View Replies View Related

Inner Join

I can't seem to get the syntax right for an inner join statement, its based on one main table and two linked tables,

From Employee inner join((Department ON Employee.Department_Code=Department.Department_Cod e) Location ON Employee.Location_Code=Location.Location_Code)

or something to that effect. Employee is the main table and Dept,Location contain all dept/location codes+descriptions.I'm sure its pretty simple just can't get it right.

View Replies View Related

INNER JOIN

I have 2 tables I want use join to use their data its working but it will return twice of each record.

this:

strSQL = "SELECT Foods.*,SeFoods.* From Foods INNER JOIN SeFoods ON Foods.food_id = SeFoods.food_id WHERE SeFoods.type = 1 ORDER BY seFoods.sf_id DESC;" .....

View Replies View Related

Inner Join

I need to insert simple SQL Queries (joins) in an ASP page.

Select Count (*) from
Fileindexqueue Q,
Domains D,
Files F
Where D.ID = Q.DOMAINID
and Q.FILEID = F.ID
and D.NAME = 'GAINS_GTN'

My ASP code where queries can be inserted looks somewhat like this:

strSQL = "SELECT COUNT(*) AS COUNTOF FROM FILEINDEXQUEUE where (SERVERFLAG = 'Failed')"
objRec.Open strSQL, objConn, adOpenForwardOnly, adLockReadOnly, adCmdText
Response.Write "<P Class=""clsMono"">Files Failed&nbsp&nbsp&nbsp: <b>" & objRec("COUNTOF") & "</b>"
objRec.Close ...

View Replies View Related

SQL (INNER JOIN)

in this code, Code:

strSql = "SELECT tblClippings.fldClippingID, tblTopics.fldTopicName, tblMessages.fldMessageID, tblMessages.fldMessageTitle, tblMessages.fldMessageCreated, tblPeople.fldPersonDisplayName, tblMessages.fldTopicID FROM tblTopics.fldTopicID INNER JOIN (tblPeople INNER JOIN (tblClippings INNER JOIN tblMessages tblClippings.fldB_MessageID = tblMessages.fldMessageID) ON tblPeople.fldMemberID = tblMessages.fldPersonID) ON tblTopics.fldTopicID = tblMessages.fldTopicID WHERE (tblClippings.fldB_MemberID=" & iPersonID & ")"

after the FROM statement, I am getting confused. It gives error message. I think the problem is just about here,

FROM tblTopics.fldTopicID INNER JOIN (tblPeople INNER JOIN (tblClippings INNER JOIN tblMessages tblClippings.fldB_MessageID =

View Replies View Related

SQL JOIN

I am in the process of creating an ASP application to read a SQL Database. I
have imported the database from an Access Database. The Database holds
Client details, such as Agent Name, Address, Telephone. etc. in a table
called Client Code:

View Replies View Related

Inner Join

I have been racking my brain with this and I just can't seem to figure it out. Here is what I am trying to do. I have 3 tables named Registration, Events, and Customer.

I want to produce a page that lists all events and the number of attendees and who is attending each event. I assume that the only way to do this is by using an inner join and I am having a hard time grasping it.

My registration page has three fields
(customernumber,eventid,eventdate)
My events page has five fields
(eventid,eventdate,place,description,numberofattendees)
and my customer table has three fields that I need to use
(firstname,middlename,lastname,customernumber)

View Replies View Related

I Cannot Get This Inner Join To Work In Asp

<!--#Include Virtual="/bug/adovbs.inc"-->

<title>Bug Status Board</title>

<%
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog =
techsupportBT; User Id = sa; Password="
Set rs = server.CreateObject("ADODB.Recordset")
sSQL="SELECT T.BugIndex, T.[Date Entered], T.DESCRIPTION,"
sSQL= ssql &" T.Company, T.Technician, T.Developer, T.PROGRAM, "
sSQL= ssql &" T.Status, T.PRIORITY, T.[Version Fix], n.noc"
sSQL= ssql &"FROM TSHIGHISSUES INNER JOIN noc ON T.BugIndex =
n.bugindex "
set rs=conn.Execute(ssql)

and this is the error message that I get Error Type:

Microsoft OLE DB Provider for SQL Server (0x80040E14)
Incorrect syntax near the keyword 'INNER'

I cannot find an example anywhere that helps with this situation. This works fine in SQL, but for some reason asp is being a pain.

View Replies View Related

Sql Inner Join Problem

I'm trying to select all the records from a table (usergames) based on the username. I want to then display all the records based on the title of the pin which is my inner join statement. Can I do this or is it easier to just have another sql statement?

sql = "SELECT usergames.pin AS gamecount, searchtable.title FROM usergames INNER JOIN searchtable ON usergames.pin = searchtable.pin WHERE usergames.username = '"&username&"' ORDER BY searchtable.title DESC"

View Replies View Related

SQL Delete And Inner Join

Basically I'm trying to combine an SQL inner join with a delete statement, like:Code:

var cnn = Server.CreateObject('ADODB.Connection');
cnn.Open(Application('cnn'));
cnn.Execute('delete * from editors_sections inner join editors on editors_sections.editor_id = editors.editor_id where editor_id='+intEditorId+' and editor.isSectionOne=0 or editor.isSectionTwo=0 or editor.isSectionThree=0');
cnn.Close();
But it gives me the following error:

Incorrect syntax near '*'.

Can this be done, and if so, can anyone see where I'm going wrong (I'm using JScript if that makes any difference?)

View Replies View Related

Mpre Than 1 Join

i was just wondering if it is possible to join more than one table with sql.
I am currently joining the tables care, and images with inner join;Code:

cnnSimple.Execute("SELECT * FROM [care] INNER JOIN [images] ON care.english = images.english WHERE care.english = 'whatever' ")

I have a third table, 'video' that i would also like to join(at video.english) and display on the page.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved