Questions tagged [multi-table]

138 questions
1
vote
2 answers

MYSQL selection - particular case

I have a first table T1 with 2 columns: 'id','info' Examples of value: 'p1','infoP1' 'p2','infoP2' 'c1','infoC1' 'c2','infoC2' 'c3','infoC3' 'e4','infoE4' I have a second table T2 with 2 column: 'id_p','id_c' Examples of…
Kozame
  • 289
  • 2
  • 11
1
vote
1 answer

SQL Execute a Query then execute another based on the results

Im trying to make a Database Migration SQL Script to transfer data from one database to another, the old database has about 10-15 tables the new one has in excess of 300, now im trying to do one big migration i know where eveything needs to go , I…
Hudson
  • 397
  • 1
  • 12
1
vote
2 answers

Update multi table in mysql

I'm trying to update mysql multiple tables, although there's no error but the changes are not reflected in the mysql database. Please let me if i would need to use JOIN to put the query update within one string. Do I also still…
Doran L
  • 299
  • 2
  • 5
  • 19
1
vote
3 answers

Query with multi tables

I have four tables: characters arena_team arena_table_member arena_team_stats. characters table has guid, name arena_team table has arenateamid, name, type arena_table_member table has guid(this is the same as in characters table),…
Tom
  • 541
  • 2
  • 7
  • 24
1
vote
0 answers

SQL multiple BLOB tables or one

I am currently rebuilding our Intranet and in the process simplifying the database. Currently I have several tables with BLOB objects for resources. I have an Announcements table with photos or files, a user table with a photo and a marketplace item…
Tod
  • 2,070
  • 21
  • 27
1
vote
2 answers

Best way to handle multi-table Laravel migrations that failed halfway through?

Originally I wanted to use an array to keep track of image paths of product shots. I decided to replace this column with a separate 'images' table that references my 'inventory' table. This allows me to use the auto-incrementing 'image' 'id' as part…
wizardofkoz
  • 111
  • 1
  • 3
1
vote
1 answer

How to perform multiple table operations in mysql?

I just want to perform multiple table operations in single query. The query is: select name,sno , id as ids ,(select sum(amount) from client_credits where user_id = ids) As total from clients where sno = '4' and total > '0' This query is not…
Dinesh G
  • 244
  • 1
  • 13
1
vote
1 answer

select last entry for every user multi table example

Given the following tables table message id message time_send 14 "first" 2014-02-10 22:16:31 15 "second" 2014-02-14 09:35:20 16 "third" 2014-02-13 09:35:47 17 "fourth" 2014-03-10 22:16:31 18 "fifth" 2014-03-14 09:35:20 19…
1
vote
1 answer

HBase MapReduce ,Multi-table operation

There are two HBase Tables(table1, table2) as input source, using MapReduce to compare one column in table1 with one column in table2, if the one in table1 is equivalent with the one in table2, output them to table3. How can we solve the problem…
Kinsomc
  • 13
  • 5
1
vote
1 answer

Enter data in mother table using data from child tables

Hi all, I have 3 tables in an access 2010 database: Crew: CrewID; Name; Adres;... Voyage: VoyageId; Voyage name; Departure harbour; Arrival harbour Crewlist: CrewlistId, VoaygeId, CrewId, Rank The VoaygeId and CrewId from the Crewlist table are…
1
vote
2 answers

How to sort multiple columns in a multitable query?

I have a question about how to find salary discrimination based on the employee gender. I have MS Acess 2007 and must use SQL queries to figure it out Keep in mind, this is after I joined 3 tables together into one multi-table query. Within this…
1
vote
1 answer

MySQL - return rows in one table that correspond to minimum date in another (indirectly linked) table

Table semesters: semesterID startDate 1 2013-01-01 2 2013-03-01 3 2013-06-01 Table classes: classID class_title semesterID 1 Math 1 2 Science 1 3 Math 2 4 Science …
1
vote
1 answer

SQL search in multitable

i have two tables: songs and singers and this my query: Select * FROM ( SELECT idx, name, IDsinger, permission, (name LIKE '%XXX%') As relevancy, 'table1' As t FROM `songs` where isActive<>'0' AND name LIKE…
1
vote
4 answers

mySQL complex multitable query

my problem is that I don't even know if this kind of query is possible. I'll try to explain: I have two tables regarding telephone calls, "Calls" and "Failed_Calls". Important columns in both tables are "Destination" and "Route", but there are many…
1
vote
3 answers

Complex MySQL query with multiple select statements

I have three tables in Mysql that are link together: Profile (ID, Name, Stuff..) Contact(ID, ProfileID,desc,Ord) Address(ID,ProfileID, desc, Ord) Now I need to select all profile from the profile table, with the “desc” field from Contact and…
Daniel Berthiaume
  • 100
  • 1
  • 3
  • 14
1 2
3
9 10