Joining Two Fields

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


ADVERTISEMENT

Joining Three Tables Returns Unnecessary Fields In Recordset

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

Joining 3 Tables

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

Joining Variables

How do I go about joining two variables to represent a new variable? Code:

View Replies View Related

Joining 3 Or More Table

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

Joining Table

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

Joining Tables In Asp

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

Joining Three Tables

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

Joining Two SQL Statements

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

Joining Tables

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

Joining 3 Tables

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

Joining Recordsets

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

Joining 2 Result Sets

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

Joining Multiple Tables

i have 3 tables how can i join these three tables using id_num primary key.

View Replies View Related

Joining/querying 2 Recordsets?

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

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

Joining 2 Query Strings

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

"Joining" An ASP Session

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

2 Fields

I have 2 fields in my database. One is startDate one is endDate. I want to display records according the current date. So far I can select all records where the startDate is greater or equal to now by using
Code:


SELECT *
FROM items
WHERE itemDateStart >= now

It seems the BETWEEN claus only accepts value, not fields.
So basically I want to select * from items between itemDateStart and itemDateEnd

View Replies View Related

Key Fields

I have a need to be able to identify which fields within a database are key fields.I did find the Attributes property of the Field object contains information for a field in a recordset. One of those values for the Attributes property is identified as adFldRowId which should identify whether the field is used as a key, but it doesn't seem to work. I'm currently reading off an Access database.Does anyone have any insight in being able to identify key fields within a recordset?

View Replies View Related

Getting The Sum Of 3 Fields

I have set up my database with 4 fields (num1, num2, num3, sum), and have created a form with 3 fields to insert 3 numbers. That part is easy.My problem is when i submit these 3 numbers (5, 7, 6) i want the form/script to add these numbers together and insert it into the 4 field "sum".

View Replies View Related

Using Two Fields

I have a database table and I am building a search-like page which is supposed to pull information from the database based on the following. "Get records where field1 is 30% (or more) higher than field2 within a specific time period". Should these records be chosen by the SQL query itself?

Or should I get all the records within the time period using GetRows, and loop through them checking whether or not it fits the criteria? While I certainly feel more capable of the second approach than the first, I am not sure if its the best way when large numbers of rows are involved.

View Replies View Related

Creating Fields

I want to create an order form for prints online... I will have up to 200 prints to be selected. What I am thinking is that I will have an HTML Form that has all the 200 thumbnails with a check box next to them. They select the ones they want and push next. Then I would like it to create a set of options for each one they selected.

That basically says the image name then has a check box for 5x7, 8x10 and a text box for the amount for each... I do I create the page what creates these selections and how to I incorporate that into a mail form going to the next page?... it seems like a simple enough idea. Am wondering how the reality of it will be.

View Replies View Related

Adding Different Fields

Say I have to different recordsets that have the fields:
rsA.Fields.Item("A").Value ,rsB.Fields.Item("B").Value

How would I add those to fields? It may be my inexperience but when I
tried something like

rsA.Fields.Item("A").Value + rsB.Fields.Item("B").Value

didnt work because one of the fields was a empty value. I have about
6 fields i need to add together if a value exists in any of them.

Suggestions?

View Replies View Related

Displaying Appropriate Fields

I have a loads of records in an Access database relating to publications. The publications come in 3 forms, pdf, Word or .htm so I have fields for each called PDFurl, Wordurl and Publink. What I want to do is, if any of those fields contain a value then display an appropriate icon (which will link to the publication).

I'm ok with the latter part but how do I determine if any of the fields have a value and if so display the relevant icon? Rather than do a load of if then statements I was wondering is there a quicker way of doing this, perhaps using a Case?

View Replies View Related

Skipping Fields

I have been writing out the general steps
I want to do in plain english before writing ASP.
The values come from a customised data grid (not in .NET) that is
generated according to what fields need to be recorded for that record.
What I want to try and do is as follows:
- Read form fields into input array (skip first three values :
savevalues, userid, productcode) - Save last value of every row (add to
quantity for extra info) - rest of processing
Is the first one even possible using plain ASP? I remember being able to
do it using Javascript, but I couldn't get it to work properly.
I have tried to use Arrays in ASP before, but without much success.

View Replies View Related

Insert Into All Fields

is there a way to write a insert statment with out typing out all of my field names? i want to do an insert in every field but i don't want to have to write them all out.

View Replies View Related

Copy Value From Fields

is it possible to copy the value from fields in form1 to fields in form2 without submit the form??form1 and form2 are in the same page. if it's possible hoe to do that??

View Replies View Related

Populate Other Fields

I have an ASP web form that I want to populate fields based on the first
field choice. Example I have 4 fields item, price, delivery, availability. I
have all these items setup in an access table. When a user chooses an option
from the item drop down, the price, delivery, availability will then
populate. I have already made my connection to the database, and created the
drop down for field one from the choices. How do I now populate the
corresponding fields.

View Replies View Related

Sorting On Fields ?

I created a script which suppose to sort on 2 fields. Everything works fine with no errors except when I click on the field that suppose to sort the data it does nothing.

This is the code: Created on test table name Reports2 3 fields id, r_date, r_doc_title

Code:

View Replies View Related

Autonumber Fields

I'm creating a basic ASP guest book, keeping my guest book entries
in a Microsoft Access database, and using ADO to access it. My problem is
that I am using the autonumbered ID field to split my guestbook into pages
of 10 entries. It works for the most part, but if I delete an entry, a gap
is left in the records and I end up 9 entries instead of 10 on that page.
Basically I need a better way of sorting this out - I thought of SELECTing
all the records into an array first and then working from that, but I can't
get array to be dynamic enough in VBscript

View Replies View Related

Read Only Fields

How can I make all the fields on my form read only based on a users logon account? I have field in my Microsoft Access table that is yes/no for read only access. Now how do I read from that field and code my ASP file.

View Replies View Related

Table & Fields

I'm creating a On-Line Order system and have got for the most part all done. My question is:
I have one table that I'm having all the orders entered into. As each order is entered in it assigns a record number. Since we have over 2000 item to purchase I don't want to create that many fields.
Is there a way that when they approve there order and I have it enter it into the orders table that it will create field automatically?
Each item has three information points (Item Number[itemnum], Description[desc], and Quantity[qty]) that needs to be added for each item they order.
I don't want to create a record number for each item that they are ordering

View Replies View Related







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