Jump to content

Search the Community

Showing results for tags 'JOIN'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 17 results

  1. VJS

    HELP with JOIN

    I am joining 2 tables using the query below. Its many to many relationship. The join works fine but creates multiple rows for each item which is expected but the Amount/value column is also duplicated. How to avoid this? Thanks As you can see the Current output the value (50000 appears 3 times instead of 1 and 27000 appears 3 times instead of 1) SELECT * FROM T1 INNER JOIN T2 ON T1.Projectex = T2.WBS_Parent Table 1: +-----------+------------+-----------+----------+--------+----------+-------+ | Projectex | CAPEX_OPEX | costelmnt | sap_vers | Period | FISCYEAR | VALUE |
  2. Hi, i have a problem with my sql query, I tried everything but until now not the right results. Problem : I have two tables, One that is called Alarms and the other one Logs. From Alarms I want to use the fields Machine, Message en datetime which is in 2020-02-27 19:11:54:123 format. In the table Logs I have the fields Anode and Datetime also in 2020-02-27 19:11:54:123 format. When a alarms occurs I want to use the datetime field to look for the Anode in the other table Logs with the same Datetime value but only on the whole second, I want only one value back. So the ouput would b
  3. DAVID F

    Understand Syntax

    Hi All, I have this example: SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate FROM Orders INNER JOIN Customers ON Orders.CustomerID=Customers.CustomerID; Can you please help me and tell me why the "FROM" is from "Orders" table and not also from "Customers" table ?
  4. PROBLEM: Turn a two-step SELECT procedure into a one-step procedure. The two-step procedure is 1) Discover with a query to a parent table what other rows in the parent table are related to the queried row. 2) Obtain selected data for the queried row and other related rows from the parent table and a child table that are connected by a FOREIGN KEY. BACKGROUND: I have two tables -- a parent (parent_table) and a child (child_table) table - connected by a valid FOREIGN KEY and an additional table (ref_table) that contains information about the relationship among the rows of both
  5. TULMER

    updatetext

    I need to update over 400 email address in a table in the database. I need to keep the first half of the email address and change everything after the '@' symbol. Example: FROM: john.doe@oldname.com -- TO: john.don@newcompanyname.com Is there any easy way?
  6. Hi all, I have a question about join or inner join; not sure in what way it should be used. I now use 2 queries in 2 different databases (made in phpmyadmin). SELECT `title` FROM `writers` WHERE id ='qwert58efedd1979f'; SELECT `name`, `lastname`, `str`, `nr`,` place` FROM `client` WHERE id ='qwert58efedd1979f'; I would like to make one mysql query and use join to search in 2 tables in 2 different databases. Can anyone tell how mysql does this?
  7. Hi all, I'm trying to create a query which selects fields from 2 tables. I have a table 'stock' to store cars for sale and a table called 'custstock' which has the customer username and the vehID. How do I show all the cars that relate the that user who is logged in? My current query that doesn't work; $username = "-1"; if(isset($_SESSION['username'])){ $username = $_SESSION['username']; } // executeable query $sql = ("SELECT * FROM [stock] JOIN custstock ON [stock].custstockvehID = custstock.vehID WHERE username = '$username'"); Thanks, Jack
  8. I have a mySQL posts table, a files table, and a relationships table. I need to sum file download counts grouped by the post the files are associated with. SELECTp.id, p.post_title, count(d.download_id) FROM posts p INNER JOIN file_log d ON p.id = d.file_idgroup by p.post_title The above query works as long as the titles of the files are the same, which is not always the case. I really need to group them by their relationship to the post they are associated with. The relationships are stored in relationships r, which shows r.post_id (which is p.id from posts), and r.file_id (wh
  9. Hi Guys, am new to PHP and just got stuck with this error message: Column count doesn't match value count at row 1. The code is this below: $query = "INSERT INTO members(email, name, gender, dob, profile, password, group_ID) SELECT operations.group_ID FROM operations JOIN members ON operations.group_ID = members.group_ID" ; $result = $db->query($query); Am trying to insert data into a table called members, and needs to get the group_ID from another table called operations. Not so sure what is wrong with the code; will appreciate help from anyone. Cheers.
  10. I am making packet type system when in my **Packet Table** , parent packet ( `id` which is primary key ) and its N -Sub Packet is under (`parent_id`) is stored , below is my table structure :**Packet_table** id | packet_name | parent_id | 1 | 01 | 0 2 | 02 | 0 3 | 03 | 1 4 | 04 | 1 5 | 05 | 1 6 | 06 | 4 7 | 07 | 4 8 | 08 | 3 9 | 09 | 5 10 | 010 | 2 ........................so on and on with N packets in same table Below is what i have tried *but
  11. hello, i am trying something new, well new for me that is, and im not sure how to go about doing this, i am trying to find out who just joined my page and if the person just join i would like to display that person name onto the site. i just need to know how to find out who just join and i believe i can take it from there
  12. Greetings, I've used sql to a moderate degree within vba and some third-party software (i.e. ReportWriter) and for the most part I do ok. I currently have a report I am trying to generate with an underlying sql query and I just can't get it to work. I was able to mimic what I needed in MS Access but there are some syntax and formatting that I have not used before. I've looked through the examples but I'm missing something. The report will displays radio assets that have Not been assigned a workorder ticket for a current project that is underway. Particulars:- ProjectID=27 if the asset has/h
  13. Hi.Wonder if you can help, am quite new to SQL. In simple terms, I have a transaction table - and in that table are references to other related tables. In this simple query I am trying to obtain the first name and last name from the user ID for a transaction. SELECT transaction.transactionId, user.firstName, user.lastNameFROM [transaction]INNER JOIN [user]ON transaction.userId = user.userIdORDER BY user.userId However I get the response "incorrect syntax near the keyword transaction". I then try: SELECT 'transaction'.transactionId, user.firstName, user.lastNameFROM [transaction]INNER JOIN [us
  14. {post removed by author}
  15. Hey Everyone, I am fairly new to SQL and pulling out whatever little hair is left on my head. I have a data dump where we are trying count the "First Call Resolution" for tickets that an employee opens and closes himself. The company is using MS Access and I am working with a basic data dump from the ticketing system. I have already weeded out everything I don't need, but I'm having trouble trying to compare and count two rows in the same table. Here is an example of the info in the table ticket_number | agentID | activity | notesGLOB-1234 | tier1_A1 | OPENS | ticket opene
  16. magician

    Join query

    Hi I've been looking at the tutorial and spoken to a few people regarding a query which requires me to join two tables together and data within a specific data range. The environment I am running this in is SQL Server 2005. The following is the query I have tried to run: select *from individual (this is a table name)where update_timestamp <= 31/12/2008join delegate (this is a table name)as on member.member_ref=delegate.member_Refwhere start_date >= 31/12/2008 but when I run this, I get:Msg 156, Level 15, State 1, Line 4Incorrect syntax near the keyword 'join'. Someone advised me
  17. Hi Guys, I am into SQL Query as follows: Event table : need from here event_id :: this PK here and FK in Event attendee Event_attendee table : need from here teacher_id:: FK here and PK in teacher table Teacher table : need from here to know if male or female based on teacher_id What I am into get the total of attendee total of male total of female how Can I do that? Thank you in advance for any help
×
×
  • Create New...