Left Join
i got two tables (sDetail and newTable).i'm using a left join to find the dif from the two tables using the pk tutor on both tables . then i need to display the table dif on my browser but where am i suppose to take the result from?
View Replies
ADVERTISEMENT
I am working with two databases. One is dockets which holds all kinds of information about upcoming legal hearings. The second one is additional parties which holds additional records related to the dockets data table.
Not all dockets have additional parties so when I need to display information about a case I may or may not need records from there so I am using a left outer join.
It works perfectly EXCEPT for one small matter. The field that I am joining on (petitionCaseNumber) is turning up empty after the join.
Below is the join.
varSQL = "SELECT * FROM Dockets LEFT OUTER JOIN additionalParties ON Dockets.petitionCaseNumber = additionalParties.petitionCaseNumber WHERE dockets.petitionCaseNumber = '" & numberIn &"'"
When I say something like response.write rst("petitionCaseNumber") I get nothing if I say response.write rst("dockets.petitionCaseNumber") I get an error.
How do I refer to this field or how do I get this field to contain the case number?
View Replies
View Related
I'm trying to pull a value onto my web page from a joining table and all I keep getting is the id instead of the actual value. table_status has has sid and status. for some reason I'm getting the id number instead of the value of the status. this is my error message when I try to join tables. Code:
View Replies
View Related
I am currently having a problem with one of my ASP pages; Currently, in the SELECT, I am using JOIN LEFT functions which work fine (see the code below). However, I have now created a new table which I have successfully linked to the other tables.
However, I am not sure how I would word the JOIN LEFT statement for the new table.
The new table is located at Report.Report I have tried to have a go, but am I missing something? I always get an error message saying, Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC Microsoft Access Driver] Syntax error in JOIN operation. Code:
View Replies
View Related
I am using a Relational database for my site and i have the following tables:
FIXTURES, GAMEDATES
the fields in FIXTURES are:
GameDate
Home
Away
(All of the above are numerical fields)
the fields in GAMEDATES are:
DateID(integer)
GameDate(#Date Field#)
What i have done is in the GAMEDATE field in the FIXTURES table i have used the ID number of the date that i wish to assign to that record - using a LEFT JOIN to display the actual date that is pulled from the GAMEDATES table (That which corresponds to the relevant id used in Fixtures)
The problem is that in some of my code i want to display records using sql and sometimes in the where clause i use the following:
WHERE Fixtures.GameDate<=(Date())
obviously meaning WHERE GAMEDATE is LESS THAN or EQUAL to TODAY.
The thing is when i use the join it does not use the where clause and displays all of the records in the FIXTURES table.
Does any one know how to get around this, i have not received any error messages it just isnt displaying the right data
View Replies
View Related
I'm doing some text manipulation and I'm getting a strange error. My code is:
[vbs]
modT = trim(left(CommandArray(x), inStr(CommandArray(x), "-") - 1))
[/vbs]
CommandArray is an array created by a split() statement (so it contains strings). It's content at the time if execution (if I response.write it) is "Policies -name:Board -public:yes". What I the line above to do is return "Policies". All the math should work out, but I get this error:
Code:
Error Type:
Microsoft VBScript runtime (0x800A0005)
Invalid procedure call or argument: 'left'
buildLinks.inc, line 10
Line 10 is the line pasted above.
View Replies
View Related
Would search for this but forgot what its called? I wanna remove everything from the left of the camma in a variable:
43,7-3-05
to 7-3-05
View Replies
View Related
I want to use the two first numbers of a user-input as a flag, but don't know how to get them in ASP... How can I use a function like 'variable = left(user_input, 2)' in ASP?
View Replies
View Related
I am having a problem with the following code:
<%
If Len(TestRS.Fields.Item("Testimonial").value) > 150 Then
Response.Write(Left(TestRS.Fields.Item("Testimonial").Value,150)&""... <br><font size=1><a href=""/Testimonials.asp"">Read More</a></font>")
Else
Response.Write(TestRS.Fields.Item("Testimonial").Value)
End If
%>
I am getting a null response from TestRS.Fields.Item("Tesimonial").Value after it is processed by the Len function.
I am getting the following result: Quote: "... Read More This tells me that the len function is analysing the string to be greater than 150 charachters yet the string is not being expressed.
View Replies
View Related
I have several checkboxes named in the following format:
chktable_city~20
chktable_state~WI
chktable_zipcode~12312
I need to be able to pull the table names and values from each checkbox name (for example, I would need to pull the "table_city" and "20" from the checkbox above).
In short, how do I pull out the table_city and 20 from the first example. Since the table names and values vary in size, I can't just do a regular mid, left, right function.
View Replies
View Related
How do I register that a user has left the website or page? I'd like to show "users online" and "users on this page" counters.
View Replies
View Related
Many a page has ADO Connection objects that were opened but never closed. The Connection object allocates its own resources when it is opened. When the object goes out of scope without being explicitly closed, the resources ASP allocated for it are freed, but the resources it allocated on its own are not. These eventually clutter up the server and slow it down to a crawl.
My question is, is there a way to track down these orphaned resources and forcibly free them from ASP, without restarting IIS or the server? Or does one have to wait for the unused Connections to time out and release themselves? I know that good coding practice is best, but is there a temporary fix to tidy up these connections left open?
View Replies
View Related
am using an XML feature to web crawl on my provider's site to get a response of an sms message sent. Am using code:
ehioze = left(sResult,3)
However, i only want the results of ehioze only if its numeric characters. and if there are any alphabets, it shoudl exlude it. How woudl this be done ?
View Replies
View Related
I have used thecode which is below to get x characters on to display
<%= LEFT(rsName.Fields.Item("columnname").Value,50)%>
It works fine but when I use this same code to get x characters plus display it using VBCRLF, with the <br> with writing the code :
<%=Replace LEFT
(Recordset1.Fields.Item("Detail").Value,VbCrLf,"<br><br>",50)%>
it gives me error so please can you tell me how can i trim the characaters and at the same time use VBCRLF. why does this above code with LEFT + vbCrLF doesn't work.
View Replies
View Related
When a student taking a quiz having a duration of 2 hrs, a timer will start and keep track the time.
So if he logout or close the window, the remaining time should be recorded into the database. And when he take the same quiz again, the timer will not restart but continue from the previous time.
E.g i take a quiz having a duration of 60mins, and when i logout the time duration remain is 30mins. And when i logon and take the quiz again, the timer countdown from there 30mins but not begining of 60mins.
View Replies
View Related
I need to be able to execute some code or display a popup when a user leaves the site. Does anyone know if it is possible to detect this? Is there an event that is called before the user leaves where I could put some code?
View Replies
View Related
I have a dynamic driven web page which get's a select value from the menu choice.
I querry the database recordset and pull back the correct values.
I want to display them in a grid fashion. I want to limit how many items per page are show in each grid and then I'll use the standard DW behaviors to move to next page, etc.
The challenge I have is making the repeat region go left to right instead of repeating down.
View Replies
View Related
I can send email using C# and SMTP, but keep closing the connection before
the .eml file has left the Queue folder. The length of time the .eml file
stays in the Queue folder is dependent on the size of that file; big or many
attachments increases the time.
If I start an internet connection, issue the smtp mail send and then close
the connection in my C# program, I need to wait until the .eml file has left
the Queue folder. Otherwise, prematurely closing the internet connection
causing IIS to abort the send.
How can I detect that the .eml file has left the Queue folder?
View Replies
View Related
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
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
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
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
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   : <b>" & objRec("COUNTOF") & "</b>"
objRec.Close ...
View Replies
View Related
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
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
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 got a asp page that has right and left site frame. I got a form in the right side frame and i want it reload the left frame when the it got submited .The left side frame displays that content of newly sumitted form.I be happy if some one help reload this left page when a form got submitted in right side frame with out using any auto refresh.
View Replies
View Related
<!--#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
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
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
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
How can i insert a data using a join statement
insert into partmaster.p, execmaster.e(e.execno, e.model, e.battqty, p.partno, p.parttype, p.itemtype, p.stacklength, p.line, p.execno)
values('1234567890', 'GBM', '2', '9876543210', 'AR', 'M', '29V', '2', '1234567890')
i have a few input box for the user to enter. but as u can see that both tables has execno. it's for both tables to connect. that's why i want to check on how i can key in one input box insert into execno in two different tables
View Replies
View Related
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