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
ADVERTISEMENT
I'm not too hot on my manipulation of strings. I have a database which
cintains names in the format (Upper case also) LASTNAME, FIRSTNAME
I want to search against that database, but the data on the form to produce
the string will be input in the following format: Code:
View Replies
View Related
I have a provider to implement domain name search and another to receive variables from my site and save them on thier site.
PROBLEM
we are using MS ASP scripts on my site.
We want to be able to implement an include file to show the results of the form process from their website.
Currenlty i tried the ASP script below but it fails, complaining of the end if statement, when i remove it, it doesnt show anything. 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
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
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
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 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 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 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 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 have 3 tables how can i join these three tables using id_num primary key.
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 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
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
In a string what is the character I should use to represent an enter?
View Replies
View Related
i am retrieving a record from the database, I am trying to place the value of the FULLNAME field in a textbox on a Form, the Problem is that it only displays half of the name leaving out the stuff that comes after a SPACE.
Example:
adors("fullname").value <--- Actual Value is John Smith
but it only displays John
Code:
<INPUT id=text1 readonly name=txtfullname value=<%=adors("fullname").value%>>
but if I try to just response.write it anywhere on the page then it displays the entire name.
View Replies
View Related
I have 2 SQL strings:
SELECT *
FROM NK_editie " & MM_whereConst & " " & whereClause & "
ORDER BY editie desc
And
SELECT *
FROM NK_editie INNER JOIN NK_edities ON NK_editie.editieid = NK_edities.ID
ORDER BY editie desc
Now I want to combine those 2 to one string.
I have problems to set it up in working order.
My tryout:
SELECT *
FROM NK_editie INNER JOIN NK_edities ON NK_editie.editieid = NK_edities.ID &
" & MM_whereConst & " " & whereClause & "
ORDER BY editie desc
It shows al the records which are joined, only the second string " & MM_whereConst & " " & whereClause & " is not working.
View Replies
View Related
I found out a really nice way to keep things on the same page is for any processing page to add on a "?<something>=<something>"
and then just check to see what the something is equal to, and the number represents what you want the front page to show.
However, this <something> shows up on the url listing in a browser. Is there anyway to .. encode it so no one can see it? Like a encode/decode function?
View Replies
View Related
I'm building a forum, and right now i'm creating the ability to edit posts. As part of this i want to add the usual "Edited by UserName on Date" line at the bottom, but am having problems doing so.
The problems seems to do with formatting the text in the variable with <span>s using stylesheets, or if there are " and ' markes in the post proper (which I can't seemt to remove with Replace). Here's my code:
View Replies
View Related
if i had a string which looked like this :
,apple, orange, grape, tomatoes
how do i remove the first character[,] from the string using the trim() function?
View Replies
View Related
I am developing a website and it's going fine, but i've heard that you shouldn't have your database in the wwwroot, it should be outside/above that.
I've done this (i'm using Dreamweaver MX) so I moved the db, fixed my odbc/dsn, connection string etc, but when I upload now I get this error.
Microsoft JET Database Engineerror '80004005'
'C:Program FilesEnsimSiteDatawebpplianceconfdomainsInet pubwwwrootTesting_SiteDatabasesTesting_Website _DataSource.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. /Testing_Site/default.asp, line 8
This is line 8: Recordset1.ActiveConnection = MM_TestingConnection_STRING
Is there something that I have missed. It was ok when it was in the wwwroot.
View Replies
View Related
i am having a problem with comparing two strings. I am taking
in the parameter rs("Company") and if this is empty i want to put some
text in there. I am testing it with an empty Company field and comparing
it like so:
temp1=rs("Company")
temp2=StrComp(temp1,NULL)
I have also tried it with
temp2=StrComp(temp1,"")
but each time i get nothing returned. Is there some rule about comparing a
string with an empty string?
View Replies
View Related
I am using ASP to connect to a simple database to retreive information and also to imput information.What I need is a simple dns connection string syntax to connect and query data.
View Replies
View Related
I have a search function on my site, and what happens at them moment is the user fills in a text box with their search string, and clicks submit. The search page takes their string, and splits it up where it sees " ".
All fairly simple, what I'd like is to allow the user to enter text in speechmarks, so the script would search for a couple of words together, as well as being able to search for every individual word...
Everyone confused yet?!
e.g If the user enters Dev Shed Forums , then the search would look for every occurance of the strings "Dev", "Shed" and "Forums"
What I want is for the user to be able to enter "Dev Shed" Forums, and the search will look for "Dev Shed" and "Forums"...
View Replies
View Related
I have a list of dates in a sql database that are input as varchar like this 042999
How do I insert / in between the date/month and year
so this 042999 will appear like this 04/29/99
View Replies
View Related
if i've two strings like:Code:
dim pic_name=replace(Request.Form("pic_name"),"'","''")
dim pic_path="pro-details/PICs/"
how could i merge the two strings to get the complete pic-path
View Replies
View Related
< input type=text name="PageTitle" id="PageTitle"
value="<%=strPageTitle%>" >
How do I "escape" any quotes, accidental carriage returns etc that are
contained within strPageTitle? Do I have to use a series of replace()
functions, or is there a cunning way that makes it OK?
(Using escape(strPageTitle) fills the box with % signs...)
View Replies
View Related
I have 2 string
str1="John"
str2="Smith"
I need to join them and then i need to get 6 characters from the left
so here is my code
str3=str1&str2
str4=Left(str3, 6)
I need to see the output as johnsm
but it gives the output as john
View Replies
View Related