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
ADVERTISEMENT
i have an sql query that needs to join 3 tables to get the desired answercouldnt think of a better way )
Code:
SELECT *
FROM Sold INNER JOIN Serial
INNER JOIN TempSerial ON Serial.SerialNo=TempSerial.SerialNo
ON Sold.SoldID=Serial.SoldID
WHERE Sold.CustomerCode='"&customer&"';"
View Replies
View Related
When I do a join in asp to retreive data from two tables, should I have create two recordset, or just one is enough. I tried: Code:
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open "Table1", "Table2", Conn
Set RS = Conn.Execute(SQL)
I am getting an error Type Mismatch in line no. And the line no is the Recordset line.
View Replies
View Related
i have an sql query that needs to join 3 tables to get the desired answer(couldnt think of a better way ) i did this: code:
SELECT *
FROM Sold INNER JOIN Serial INNER JOIN TempSerial ON Serial.SerialNo=TempSerial.SerialNo
ON Sold.SoldID=Serial.SoldID
WHERE Sold.CustomerCode='"&customer&"';"
View Replies
View Related
I have a mailing list table where people can enter their details and choose to have information on a variety of subjects sent to them. The details are kept in one table, the subjects are kept in another. On our database maintenance page, I'd like to be able to print out how many records are associated with each subject. Code:
SQL = "SELECT D.subject,Count(D.ID) AS cntID FROM details D, subject S WHERE D.subject = S.subjID GROUP BY D.subject"
There are: <b><% = rs("cntID") %></b> records in the <% = rs("subject") %> mailing list.
This gives me nearly what I want, but instead of printing the table's name, it prints its corresponding numerical ID. I tried including the subject name in the query, but it's not part of the aggregate function, so it won't have it.
View Replies
View Related
i have an sql query that needs to join 3 tables to get the desired answer. i did this:
Code:
SELECT *
FROM Sold INNER JOIN Serial
INNER JOIN TempSerial ON Serial.SerialNo=TempSerial.SerialNo
ON Sold.SoldID=Serial.SoldID
WHERE Sold.CustomerCode='"&customer&"';"
but its not working.
View Replies
View Related
i have 3 tables how can i join these three tables using id_num primary key.
View Replies
View Related
I have three tables in my db, joined together. The connection works fine, but I want to stop the first two tables from listing their info. for each call to the third table.
ex:
table 1 - page title, description
table 2- section title, description
table 3 - links, and their info.
For each page, there are mulitple sections and links, so I don't want the section title to appear each time I display a new link.
Here is my code:
View Replies
View Related
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
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
View Related
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
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
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
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
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
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
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
how would you join the two felds from a table in the database so it can show the image from joining the two fields to know wherethe image is coming from
Quote:
<img src="<%=(rs_lprojects.Fields.Item("image_folder_path").Value)%><%=(rs_lprojects.Fields.Item("image_src1").Value)%>" />
View Replies
View Related
How do I go about joining two variables to represent a new variable? Code:
View Replies
View Related
can i join many table like 3 or more table using SQL statement. Below is the 2 table join example:
Set DbConn =Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
Query = " SELECT poll_Questions.QuestionID, poll_Questions.p_Question, poll_Questions.p_StartDate, poll_Questions.p_EndDate, poll_Questions.p_Active, poll_Questions.p_PostedBy, poll_Answers.p_Answer"
Query = Query & " FROM poll_Questions INNER JOIN poll_Answers ON poll_Questions.QuestionID = poll_Answers.QuestionID"
rs.Open Query, DbConn
Do you guys know how to join 3 or more table rather than 2 table?
View Replies
View Related
How can i join a table if i don't have 2 matching fields. My problem is i need to pull info from my employee table and my program table there is a soldby1 column that has which employee sold the program but there is no matching fields in the employee and the program table. Code:
strSQL = "SELECT employee.id, program.cust_no , service.serv_code , servcd.servname ,service.price, service.servstatus, service.posted FROM customer inner join program on customer.cust_no = program.cust_no inner join service on program.prog_id = service.prog_id inner join servcd on service.serv_code = servcd.serv_code inner join employee where program.season = '2006' and service.servstatus <> 'N' and customer.cust_no = '" _
& Request.Form("username") & "' group by program.status, program.cust_no, service.serv_code, servcd.servname, service.price, service.servstatus, service.posted, customer.taxid1"
View Replies
View Related
I have these two statements and I want to join them to make one query, i don't know how to do it since there are two querystrings that are selecting my data for me.
sSQL = "SELECT * FROM AssemblyName Where AssemblyName = '" & Request.QueryString("assembly") & "'"
Set oRS = oConn.Execute(sSQL)
sSQL = "SELECT * FROM PartsList Where ID = '" & Request.QueryString("one") & "'"
Set oRS2 = oConn.Execute(sSQL)
View Replies
View Related
I want to run two queries on two seperate database tables and then combine the results - I'm sure this is possible with some sort of join command. Anyone know how to do this?
View Replies
View Related
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
i want to left join result sets together coming from two different databases based on a common field storenumber. They are separate databases as per management design.
Basically it should match rows based on the store number, those who don't have matches should display only the storenumber and no other info like: Code:
Store Q1 Q2 Q3 Q4
1 x x x x
2 x x x x
3 <--No data in 3, just display storenumber
4 x x x x
View Replies
View Related
I�ve got 2 recordsets, 1 called �special� and the other called �A55�
Special has a field called �Email_Address��.
A55� also has a field called �Email_Address��.
What I need to do is display all of the records in the recordset �A55� but only the records where the email address field is in the "special" recordset I am using ASP so is the solutions ASP or SQL and how is it done..
View Replies
View Related
I am trying to concatenate two recordsets but I have no idea how to do it.
Here is my little bit of code:
SQLQueryA = "SELECT * FROM mainCategories"
SQLQueryB = "SELECT * FROM subCategories"
Set RSA = OBJdbConnection.Execute(SQLQueryA)
Set RSB = OBJdbConnection.Execute(SQLQueryB)
How do I join RSA and RBS together to make a single recordset?
View Replies
View Related
Is there any way, having a SessionID in hand, for an ASP
page to "join" an existant Session and have access to its
values without writing everything to SQL server and all
that?
View Replies
View Related
I want to be able to send two sql tables to access db at the same time
View Replies
View Related
I have a database that has 2 tables linked into it from another database. I am having problems trying to pull in values from those 2 linked databases. One of the tables is tblClient. Code:
View Replies
View Related
I need some help with a SQL statement. I currently have which works:
strSQL = "SELECT * FROM mstJobs WHERE JobStatus = True"
I need to query against a second table but I am not sure of the
correct syntax of the statement for adding another table.. somthing
like this i would imagine... ????
strSQL = "SELECT * FROM mstJobs.pmdata WHERE JobStatus = True AND
WHERE WeekEnding IN tblSuperInput.pmdata = strThursday"
View Replies
View Related
Does anyone have some sample code on how to get all tables names in a MS Access database?
View Replies
View Related
I have a form in my HTML page and I require a number of checkboxes. These are to be dynamically generated from an Access database. The code below will work but it will only create a single row. How can I include the <TR> tag inside the loop - I'd probably want 4 cells per row
<table>
<tr>
<%
Do until rstCategories.EOF = True
Response.Write "<TD width=200>"_
& rstCategories("strCategory")_
& "<input name=chkCategory type=checkbox value=" &rstCategories("lngID")>"_
& "</TD>"
rstCategories.Movenext
Loop
%>
</tr></table>
View Replies
View Related