This tag will generally be used by those unfamiliar with SQL, asking basic questions about joins. In SQL, data is stored in tables. Frequently, queries need data from multiple tables, and the way that they are connected may not be obvious.
Questions tagged [multiple-tables]
823 questions
5
votes
1 answer
How to upsert/insert records in all tables in an Azure SQL Database with Azure Data Factory v2
I have an Azure SQL database with many tables that I want to update frequently with any change made, be it an update or an insert, using Azure Data Factory v2.
There is a section in the documentation that explains how to do this.
However, the…

Arthur Nieuwland
- 51
- 1
- 3
5
votes
3 answers
Oracle SQL Loader split data into different tables
I have a Data file that looks like this:
1 2 3 4 5 6
FirstName1 | LastName1 | 4224423 | Address1 | PhoneNumber1 | 1/1/1980
FirstName2 | LastName2 | 4008933 | Address1 | PhoneNumber1 |…

Chepech
- 5,258
- 4
- 47
- 70
5
votes
4 answers
Query to get vacant time MYSQL
Would like some logical help on formulating a MYSQL Query that gets results that isn't within the data of the table.
I have a table named schedule that has columns with data type 'time' that indicates when this certain schedule starts and ends and a…

zangetsu
- 127
- 8
5
votes
2 answers
DQL delete from multiple tables (doctrine)
I need to perform DQL delete from multiple related tables.
In SQL it is something like this:
DELETE r1,r2
FROM ComRealty_objects r1, com_realty_objects_phones r2
WHERE r1.id IN (10,20) AND r2.id_object IN (10,20)
I need to perform this…

singer
- 2,616
- 25
- 21
5
votes
2 answers
How do I use full text search across multiple tables, SQL Server 2005
I have a full text catalog with two tables in it.
tableA has 4 columns (a1, a2, a3, a4) of which 3 are indexed in the catalog, a2,a3,a4.
a1 is the primary key.
tableB has 3 columns (b1, b2, b3, b4), two of which are indexed in the catalog, b3 and…

Greg B
- 14,597
- 18
- 87
- 141
5
votes
2 answers
Using "imhist" function in Matlab to plot multiple histograms on the same figure
I'm new to Matlab and am trying to do a bit of image processing. I have two color images that I convert to grayscale. My goal is to be able to put the histograms for both grayscale images on the same figure so I can compare them. My code looks…

user2650768
- 71
- 2
- 2
- 3
5
votes
1 answer
How to join records from multiple object tables to a master table with a single query?
So I have a data model which is set up with a table that contains NAME, ID, and CONDITION columns for a series of objects (each object has a unique id number). The rest of the attributes for these objects are contained in columns of several…

Sam Hazleton
- 470
- 1
- 5
- 21
5
votes
2 answers
How to make a search results page with pg_search multisearch that has links to the results?
I finally figured out how to implement pg_search's multisearch feature. But I'm having trouble making a usable search results page that displays links back to the various articles and faqs that contain the search terms. It's a pretty basic setup…

Gruntled
- 143
- 9
4
votes
2 answers
SQL: Replace part of a column on multiple rows based on second table
I have a table (pages) that holds properties for web pages, including a column for the page content itself, an NVARCHAR(MAX) column.
Within that column, I need to find and replace a bunch of text strings and replace them with other text strings;…

Chris
- 41
- 1
- 2
4
votes
4 answers
Multiple oracle queries problem
I'm trying to run a query from a .NET page but I seem to having some problems with having multiple queries.
My query is similar to this
SELECT * FROM table1; SELECT * from table2
But i seem to get an invalid character error when executing this from…

Jamie Taylor
- 3,500
- 21
- 65
- 99
4
votes
1 answer
can't make joins work correctly
I have the following data :
customer
+---------------------------------------------------------------------------------------------+
| id | email | firstname | lastname | no_pub | customer_address …

VaN
- 2,180
- 4
- 19
- 43
4
votes
1 answer
Bigquery how to query multiple tables of the same structure?
I have datasets of the same structure and i know I can query them like this, they are named by date:
SELECT column
FROM [xx.ga_sessions_20141019] ,[xx.ga_sessions_20141020],[xx.ga_sessions_20141021]
WHERE column = 'condition';
However I actually…

shecode
- 1,716
- 6
- 32
- 50
4
votes
3 answers
SQLite - Aggregating related data (tree-like) between 2 tables with multiple potential intermediate relationships
I have an SQLite database (v. 3.8.1) with somewhat unusual schema that can't be changed.
For the purposes of this questions, there are 5 tables (t1 through t5), and I need to create a summary report using data from t1 and t5, but the data I need…

JPBro
- 85
- 8
4
votes
1 answer
SQL Access 2010 - Full outer join on three tables
I need help with a composite query in MS Access 2010.
I've got one table with this structure:
ChoirOrder(name, category, day, h_start, h_end, ord);
where name and category are the primary key of ChoirOrder. The category field can be A, B or Y.
I…

jiraky90
- 43
- 6
4
votes
3 answers
Search in multiple tables with Full-Text
I'm trying to make a detailed search with asp and SQL Server Full-text.
When a keyword submitted, I need to search in multiple tables. For example,
Table - Members
member_id
contact_name
Table - Education
member_id
school_name
My query;
select…

Burak F. Kilicaslan
- 535
- 2
- 8
- 20