Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms (2)

1
vote
1answer
15 views

select a column based on multiple condition but no direct connection in tables

Okay, well I know title might be a little unclear, but I couldn't find a better title. Let me explain the situation, I have 3 tables (actually many, but for this example we need 3). 1. teachers table ...
-1
votes
3answers
37 views

Combining MySQL queries

I have two seperate tables in my DB, here the relevant fields: table images: CREATE TABLE `images` ( `image_id` int(4) NOT NULL AUTO_INCREMENT, `project_id` int(4) NOT NULL, `user_id` int(4) ...
0
votes
1answer
17 views

mysql join not use index for 'between' operator

So basically I have three tables: CREATE TABLE `cdIPAddressToLocation` ( `IPADDR_FROM` int(10) unsigned NOT NULL COMMENT 'Low end of the IP Address block', `IPADDR_TO` int(10) unsigned NOT NULL ...
0
votes
2answers
11 views

Joining two unrelated tables in hibernate

Is there any way that we can join two tables without direct relationship between them but have two common fields in hibernate? I have two tables called boiler_plates and profile with no direct ...
1
vote
4answers
24 views

Ignoring a column when joined column has more than one value

I have a table, Orgs, that contains the following data: ID Name AddressID 0 McDonalds 4 1 Starbucks 5 2 Burger King 7 I also have a table, Addresses, ...
0
votes
2answers
16 views

SQL Assistance: Trying to retrieve rows from two related tables (exclude/ filter-out specific user_id from the results)

I'm in need some SQL advice. What is the best way (making use of SQL Joins and/ or Sub-queries) to solve this problem? Thanks in advance :) users TABLE (user_id = Primary Key) ...
2
votes
4answers
34 views

MySQL, order by multiple columns from multiple tables

I have two tables: Table of Artists (tbl_artist): artist_id - primary key artist_name - has index Table of Albums (tbl_album): album_id - primary key album_artist_id - foreign key, has index ...
2
votes
3answers
32 views

Can I do this kind of join operation with pure SQL?

there are some data like this: name number 12_PAGE19901_CHN.DISPLAY_NT n.115 12_PAGE19901_CHN.DISPLAY_NT n.114 KAITEST123.DISPLAY_NT n.110 ...
0
votes
0answers
9 views

Wordpress usermeta MySQL query

I have the following query: mysql_query("SELECT SUM(u1.value) AS sumPoints, u1.userid, m1.meta_value AS reputation, m2.meta_value AS name FROM wp_scloyalty u1 RIGHT JOIN wp_usermeta m1 ON ...
3
votes
1answer
44 views

Perl JOIN in a different way?

I am working on a perl module and looking for an output (string) of the form : a:value1 OR a:value2 OR a:value3 OR ... The values value1, value2, value3... are in an array (say, @values). I know we ...
1
vote
1answer
30 views

A simple MYSQL view to disaply info about a player and its guardians

I need to create a view called phonelist which list each player, their guardians, the guardians phone number and the team they play in. How would I code this. All the information you need you should ...
0
votes
2answers
23 views

mysql select sum 2 rows from different tables

I have been trying to find the correct way to sum 2 rows from 2 different tables. I can easily identify the rows I want to sum using these two queries: select * from ...
0
votes
1answer
19 views

creating an SQL view that returns person details, caregivers and team plays in

I am wanting to create a view using MYSQL that lists all players in that play in a team, their guardians (note: a player can have a single parent or both) the guardians phone number and the team the ...
0
votes
1answer
29 views

SQL Update Join error

I have had a read through a few of the other issues around joining on SQL Updates but haven't been able to finalise a query. System is all in MySQL (INNODB table structure) We are wanting to update ...
1
vote
2answers
45 views

Best Practices for JPA - joining read-only data

I am using a JPA model with two classes. The first one is mapping a table with "dynamic" data, the second one is mapping a table with read-only, reference data. As an example, I have a Person entity ...

1 2 3 4 5 379
15 30 50 per page