Questions tagged [multi-table]

138 questions
1
vote
1 answer

getting and adding data to existing SQLite database

im trying to get the data from a table then add it to another table. i need the KEY_CATEGORYIDwhich auto increments from table 1 and then i need to add it to table 2 and 4. i cant figure out how to do this as KEY_CATEGORYID will only have a value…
1
vote
2 answers

Updating two tables in mysql with one statement

I have two tables- "events" and "rooms". The rooms table looks like this: CREATE TABLE `rooms` ( `roomKey` INT(9) UNSIGNED NOT NULL AUTO_INCREMENT, `locationID` INT(9) NOT NULL DEFAULT '0', `locationName` VARCHAR(150) NOT NULL…
Brian Bell
  • 165
  • 1
  • 1
  • 5
1
vote
2 answers

sort same field from different tables

I have somes tables (around 20) with the same structure and I'm trying to sort them with a php script and insert them in a new table with the cheapest price in cheapest1, then cheapest2 for more expensive... and the most expensive in column…
remyremy
  • 3,548
  • 3
  • 39
  • 56
1
vote
1 answer

How can I iteratively query a large MySQL dataset from within Solr's data importer?

I have 256 tables in my production database. Each table has around 10,000,000 rows -- I can't get all of the rows from any one table in one SELECT query. Actually I put the query-phases in solr/conf/data-config.xml just like this as a test; it has…
1
vote
1 answer

Django Multi-table Inheritance, Django-model-utils errors

I am working on a hobby project for my garage shop. I was directed to django-model-utils for what I need. (I have serial CNC machines, serial machines have two flow control methods) I have a parent class of SerialMachine (defines address, baud…
Dan
  • 259
  • 1
  • 10
0
votes
1 answer

Is there a way to make only one query of a super class then get a list of all the respective sub classes in django?

Possible Duplicate: Django Model Inheritance query a central table Following along the officail docs found here https://docs.djangoproject.com/en/dev/topics/db/models/#multi-table-inheritance I see that I can query Place which is a Super of…
Polygon Pusher
  • 2,865
  • 2
  • 27
  • 32
0
votes
1 answer

Get updates from current user and all their friends - mysql query

I'm building a Facebook-like wall and wish to retrieve all updates from both the current user and all their friends. As it stands I'm only getting updates from user's friends. How do I include user's own updates too? SELECT M.msg_id, …
Brian Byrne
  • 107
  • 1
  • 5
  • 17
0
votes
1 answer

Multi-table query - get friend updates

SELECT M.msg_id, M.uid_fk, M.message, M.created, U.fname, U.lname, M.uploads FROM messages M, users_friends F, users U WHERE M.uid_fk=F.friendID and F.userID = '5' and status='2' Building a facebook-like wall and want to grab messages(updates)…
Brian Byrne
  • 107
  • 1
  • 5
  • 17
0
votes
1 answer

Database query: get updates from friends

EDIT: Got it! SELECT `update`, `date` from updates, users_friends WHERE updates.userID = users_friends.friendID and users_friends.userID = "5" and users_friends.status = "2" I realised I was trying to call an update that didn't exist. In order to…
Brian Byrne
  • 107
  • 1
  • 5
  • 17
0
votes
1 answer

SELECT from separate tables without relationship

How can relise in one query this SELECTs from tables without relationship? SELECT discount_rate.valueSet, discount_rate.dateSet FROM discount_rate WHERE discount_rate.dateSet<='2011-12-11' ORDER BY discount_rate.dateSet DESC LIMIT 1; SELECT…
Alexander Shlenchack
  • 3,779
  • 6
  • 32
  • 46
0
votes
1 answer

Multi-table Update in Oracle

Just like Multi-table insert(using INSERT ALL) is there multi-table Update facility in Oracle? In which version?
Plymouth Rock
  • 472
  • 2
  • 6
  • 20
0
votes
2 answers

Selecting the same field from multiple tables

I'm writing a query to copy databases for Dynamics NAV to make test environments. The difficulty that I'm addressing is that once the new test environment is made, I need to clear out information from some of the fields so that live data doesn't get…
0
votes
1 answer

android multi table adapters queries

I've been reading about having multiples tables in a SQLite database in Android. One approach is to have 1 adapter class for each table, and each adapter will implement CRUDs methods for each table. My questions are: Is this the best aproach to…
gutiory
  • 1,135
  • 5
  • 13
  • 33
0
votes
0 answers

ORACLE APEX - How can I insert form data into multiple tables, in my case- one table is storing text data while other table is for BLOB?

I have a form to target 2 tables - one for text data, 2nd for documents (BLOB) for stroing text data eg. Name, address details etc. - I am using process which executes PL/SQL procedure on passed page item values (in procedure i am calling next val…
0
votes
0 answers

duplication of expandable functionality in multi Tables antd

I am using one table from 'antd' component for multiple tables on the same page. However, the expandable functionality is duplicated for all tables (that is, when I expand row 1 in one table and move to another table, row 1 is also expanded there).…
Miangel
  • 53
  • 7