Re: replication between two tables in same database

2011-10-02 Thread Anupam Karmarkar
Try out functionality you desire with trigger to replicate data From: Derek Downey To: [MySQL] Sent: Thursday, 29 September 2011 10:46 PM Subject: Re: replication between two tables in same database You could look into the sphinx engine http

Re: replication between two tables in same database

2011-09-30 Thread Peter Boros
11, you wrote: > > > >> But I could create an additional myisam table to overcome my problem > >> providing I can get the data to synchronise between the two tables > >> > >> On 29 Sep 2011, at 18:16, Reindl Harald wrote: > >> > >> &g

Re: replication between two tables in same database

2011-09-29 Thread Tompkins Neil
on InnoDb tables so you don't have to > export the data to MyISAM. > > Mike > > At 01:43 PM 9/29/2011, you wrote: > >> But I could create an additional myisam table to overcome my problem >> providing I can get the data to synchronise between the two tables &

Re: replication between two tables in same database

2011-09-29 Thread Neil Tompkins
Am thinking now that it might be best to use MySQL 5.6 as this is a new project still in development and we will have the new FullText Search with Innodb On 29 Sep 2011, at 18:43, Andrew Moore wrote: > Hey Neil, I read your question too quickly and jumped to the conclusion you > weren't sure M

Re: replication between two tables in same database

2011-09-29 Thread Neil Tompkins
ata to MyISAM. > > Mike > > At 01:43 PM 9/29/2011, you wrote: >> But I could create an additional myisam table to overcome my problem >> providing I can get the data to synchronise between the two tables >> >> On 29 Sep 2011, at 18:16, Reindl Harald wrote: >&g

Re: replication between two tables in same database

2011-09-29 Thread mos
roviding I can get the data to synchronise between the two tables On 29 Sep 2011, at 18:16, Reindl Harald wrote: > so mysql is currently the wrong database for your project > sad but true, you can not have fulltext-search and innodb this time > > Am 29.09.2011 19:15, schrieb T

Re: replication between two tables in same database

2011-09-29 Thread Neil Tompkins
But I could create an additional myisam table to overcome my problem providing I can get the data to synchronise between the two tables On 29 Sep 2011, at 18:16, Reindl Harald wrote: > so mysql is currently the wrong database for your project > sad but true, you can not have fulltext-

Re: replication between two tables in same database

2011-09-29 Thread Derek Downey
You could look into the sphinx engine http://sphinxsearch.com/about/sphinx/ No experience with this personally though - Derek On Sep 29, 2011, at 1:07 PM, Tompkins Neil wrote: > Yes, unless I can set-up some sort of replication between the two tables. > > On Thu, Sep 29, 2011 a

Re: replication between two tables in same database

2011-09-29 Thread Reindl Harald
myisam for > select * from table where field like '%input%'; > > for most workloads this is enough and you have not the problem > with stop-words, minimum input length and so on > > Am 29.09.2011 19:07, schrieb Tompkins Neil: > > Yes, unless I can

Re: replication between two tables in same database

2011-09-29 Thread Tompkins Neil
eil: > > Yes, unless I can set-up some sort of replication between the two tables. > > > > On Thu, Sep 29, 2011 at 6:05 PM, Reindl Harald >wrote: > > > >> please do NOT post off-list! > >> > >> so your only workaround is like '%whatever%' c

Re: replication between two tables in same database

2011-09-29 Thread Reindl Harald
some sort of replication between the two tables. > > On Thu, Sep 29, 2011 at 6:05 PM, Reindl Harald wrote: > >> please do NOT post off-list! >> >> so your only workaround is like '%whatever%' currently >> >> Am 29.09.2011 19:04, schrieb Tompkins Neil:

Re: replication between two tables in same database

2011-09-29 Thread Tompkins Neil
Yes, unless I can set-up some sort of replication between the two tables. On Thu, Sep 29, 2011 at 6:05 PM, Reindl Harald wrote: > please do NOT post off-list! > > so your only workaround is like '%whatever%' currently > > Am 29.09.2011 19:04, schrieb Tompkins Neil: >

Re: replication between two tables in same database

2011-09-29 Thread Jim Moseby
Sounds like a job for CREATE TRIGGER to me. :) http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html >>> Tompkins Neil 9/29/2011 12:56 PM >>> Hi I've a Innodb and MyISAM table in the SAME database that I wish to replicate the data between the two because I need to use FULLTEXT searchi

Re: replication between two tables in same database

2011-09-29 Thread Reindl Harald
Am 29.09.2011 18:56, schrieb Tompkins Neil: > Hi > > I've a Innodb and MyISAM table in the SAME database that I wish to replicate > the data between the two because I need to use FULLTEXT searching on > the MyISAM table. Is this possible ? If so how do I do it. in short: no in longer: why in

replication between two tables in same database

2011-09-29 Thread Tompkins Neil
Hi I've a Innodb and MyISAM table in the SAME database that I wish to replicate the data between the two because I need to use FULLTEXT searching on the MyISAM table. Is this possible ? If so how do I do it. Thanks Neil

Re: left join two tables

2011-04-28 Thread Darryle Steplight
Hi Johan, I think you probably want something like this. Give the following a shot. SELECT * FROM table1 LEFT JOIN table2 ON table1.ID = table2.subID LEFT JOIN table3 ON table1.ID= table3.subID On Thu, Apr 28, 2011 at 9:41 AM, Johan De Meersman wrote: > Hey there, > > - Original Message -

Re: left join two tables

2011-04-28 Thread Johan De Meersman
Hey there, - Original Message - > From: "Rocio Gomez Escribano" > Hi!! Is it possible to create a left join consult with 2 tables?? > I mean: > SELECT * FROM table1 LEFT JOIN (table2, table3) on table1.ID = > table2.subID and table1.ID= table3.subID Pretty close already. Might I sugg

left join two tables

2011-04-28 Thread Rocio Gomez Escribano
Hi!! Is it possible to create a left join consult with 2 tables?? I mean: SELECT * FROM table1 LEFT JOIN (table2, table3) on table1.ID = table2.subID and table1.ID= table3.subID Thanks!!! Rocío Gómez Escribano r.go...@ingenia-soluciones.co

Re: Finding Data in One of Two Tables

2011-02-07 Thread Shawn Green (MySQL)
On 2/2/2011 04:23, Hal Vaughan wrote: I'm using this query in a Perl program: SELECT Distinct x.Search FROM $source.Searches AS x LEFT JOIN searching.Status AS s ON x.Search=s.Search AND s.Source='$source' WHERE x.RedoTime<'$now' AND s.Search IS NULL This program runs other programs t

Finding Data in One of Two Tables

2011-02-02 Thread Hal Vaughan
I'm using this query in a Perl program: SELECT Distinct x.Search FROM $source.Searches AS x LEFT JOIN searching.Status AS s ON x.Search=s.Search AND s.Source='$source' WHERE x.RedoTime<'$now' AND s.Search IS NULL This program runs other programs that do internet searches. I have diffe

Re: select data from two tables and SUM qty of the same ID

2010-11-10 Thread HaidarPesebe
--- Original Message - From: "Aveek Misra" To: "HaidarPesebe" Cc: "MySQL Lists" Sent: Wednesday, November 10, 2010 5:38 PM Subject: Re: select data from two tables and SUM qty of the same ID SELECT product.ID, product.ProductName, product.ISBN, SUM(salesreport.QTY)

Re: select data from two tables and SUM qty of the same ID

2010-11-10 Thread HaidarPesebe
n 'product.product_id' in 'field list' Note: product_id (product) = bid (sales_report) haidarpesebe - Original Message - From: "Aveek Misra" To: "HaidarPesebe" Cc: "MySQL Lists" Sent: Wednesday, November 10, 2010 5:38 PM Subject: Re:

select data from two tables and SUM qty of the same ID

2010-11-10 Thread HaidarPesebe
please help us look for the data select from two tables with the following details: Primary table: product ID | ProductName | ISBN | --- 1 | Product A | 123 | 2 | Product B | 456 | 3 | product C | 444 | --- second table

Re: select data from two tables and SUM qty of the same ID

2010-11-10 Thread Aveek Misra
ata select from two tables with the following > details: > > Primary table: product > ID | ProductName | ISBN | > --- > 1 | Product A | 123 | > 2 | Product B | 456 | > 3 | product C | 444 | > --- > >

Re: select data from two tables and SUM qty of the same ID

2010-11-10 Thread haidarpesebe
Thanks a lot. We will try and inform you. --Original Message-- From: Aveek Misra To: Albahar Uya Cc: MySQL Lists Subject: Re: select data from two tables and SUM qty of the same ID Sent: Nov 10, 2010 17:38 SELECT product.ID, product.ProductName, product.ISBN, SUM(salesreport.QTY) as

Re: Formatting in same columns when selecting from two tables.

2008-03-06 Thread Lucas . CTR . Heuman
/06/2008 09:14 AM To Lucas CTR Heuman/ACT/CNTR/[EMAIL PROTECTED] cc Subject Re: Formatting in same columns when selecting from two tables. Good Morning Lucas- could you define the formatting specifics of DATA and DATASTAMP result-type? Thank You Martin - Original Message - W

Re: Formatting in same columns when selecting from two tables.

2008-03-06 Thread mgainty
Good Morning Lucas- could you define the formatting specifics of DATA and DATASTAMP result-type? Thank You Martin - Original Message - Wrom: REXCAXZOWCONEUQZAAFXISHJEX To: Sent: Thursday, March 06, 2008 8:43 AM Subject: Formatting in same columns when selecting from two tables. > I h

Formatting in same columns when selecting from two tables.

2008-03-06 Thread Lucas . CTR . Heuman
I have a table in my database with 4 fields, Because it is already implemented in the application I am modifying I cannot change the table. Here is what I have DATA1STAMP type DATE , DATA1DATA type INTEGER, DATA2STAMP type DATE, DATA2DATA type INTEGER in my DATATABLE. I now need to select this

Re: Comparing keys in two tables

2007-10-26 Thread Baron Schwartz
Rob Wultsch wrote: On 10/26/07, Baron Schwartz <[EMAIL PROTECTED]> wrote: Aaron Fischer wrote: Thanks Peter and Baron, these both worked well. The "left join on" took .1919 seconds and the "left outer join as" took .1780 seconds. They are synonymous in MySQL. The only difference is 6 extra c

Re: Comparing keys in two tables

2007-10-26 Thread Peter Brawley
Aaron >The "left join on" took .1919 seconds and the "left outer join as" took .1780 seconds. Caching :) PB - Aaron Fischer wrote: Thanks Peter and Baron, these both worked well. The "left join on" took .1919 seconds and the "left outer join as" took .1780 seconds. =) On Oct 26,

Re: Comparing keys in two tables

2007-10-26 Thread Rob Wultsch
On 10/26/07, Baron Schwartz <[EMAIL PROTECTED]> wrote: > > Aaron Fischer wrote: > > Thanks Peter and Baron, these both worked well. > > > > The "left join on" took .1919 seconds and the "left outer join as" took > > .1780 seconds. > > They are synonymous in MySQL. The only difference is 6 extra ch

Re: Comparing keys in two tables

2007-10-26 Thread Baron Schwartz
Aaron Fischer wrote: Thanks Peter and Baron, these both worked well. The "left join on" took .1919 seconds and the "left outer join as" took .1780 seconds. They are synonymous in MySQL. The only difference is 6 extra characters in the query text. The difference was probably due to caches.

Re: Comparing keys in two tables

2007-10-26 Thread mysql
Aaron Fischer wrote: Greetings! I have a problem that it seems would best be solved using subqueries. However, I am working on a server that is running MySQL 3.23.58, so subqueries are not available to me. What I am trying to do: I have two tables, each containing approximately 37,000

Re: Comparing keys in two tables

2007-10-26 Thread Aaron Fischer
Thanks Peter and Baron, these both worked well. The "left join on" took .1919 seconds and the "left outer join as" took .1780 seconds. =) On Oct 26, 2007, at 11:37 AM, Peter Brawley wrote: Aaron An exclusion join: SELECT a.col FROM a LEFT JOIN b ON a.col=b.col WHERE b.col IS NULL; PB

Re: Comparing keys in two tables

2007-10-26 Thread Peter Brawley
available to me. What I am trying to do: I have two tables, each containing approximately 37,000 records. I want to compare the index field in Table A to the index field in Table B. I would like to see all records where the index in Table A does not exist in Table B. Thoughts? Suggestions

Re: Comparing keys in two tables

2007-10-26 Thread Baron Schwartz
Aaron Fischer wrote: Greetings! I have a problem that it seems would best be solved using subqueries. However, I am working on a server that is running MySQL 3.23.58, so subqueries are not available to me. What I am trying to do: I have two tables, each containing approximately 37,000

Comparing keys in two tables

2007-10-26 Thread Aaron Fischer
Greetings! I have a problem that it seems would best be solved using subqueries. However, I am working on a server that is running MySQL 3.23.58, so subqueries are not available to me. What I am trying to do: I have two tables, each containing approximately 37,000 records. I want to

sequential numbering in Auto_Increment Field across two tables

2007-10-11 Thread Stephen Sunderlin
I have two tables. TableA is current data. TableB (created with 'Create Table A like Table B' ) is an archive where deleted data is inserted from Table A before being deleted from table B with "INSERT INTO TableA Select * , Null, NOW (), 'ACTION', 'USER

Re: do I need two tables or one will do just fine?

2007-10-08 Thread afan pasalic
On table it is! :-D Thanks to all of you who helped me with my "problem". -afan John Meyer wrote: > Afan Pasalic wrote: >> hi, >> I have a employees table (first name, last_name, address, city, >> state, zip, phone,...). >> though, I got a requested to add additional info about people, like >

Re: do I need two tables or one will do just fine?

2007-10-06 Thread John Meyer
Afan Pasalic wrote: hi, I have a employees table (first name, last_name, address, city, state, zip, phone,...). though, I got a requested to add additional info about people, like phone_extension, zip+4, nick, DOB... that will not be used very often. what would be better solution: a) add these

RE: do I need two tables or one will do just fine?

2007-10-05 Thread Daevid Vincent
'. If you have NULL, you know that field is not set, but having a 0 (default) you don't know if the value is truly 'false' or 'not set'. > -Original Message- > From: Afan Pasalic [mailto:[EMAIL PROTECTED] > Sent: Friday, October 05, 2007 8:42 AM

RE: do I need two tables or one will do just fine?

2007-10-05 Thread Jerry Schwartz
orated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 www.the-infoshop.com www.giiexpress.com www.etudes-marche.com > -Original Message- > From: Afan Pasalic [mailto:[EMAIL PROTECTED] > Sent: Friday, October 05, 2007 11:42 AM > To: mysql@lists.mysql.com &

do I need two tables or one will do just fine?

2007-10-05 Thread Afan Pasalic
hi, I have a employees table (first name, last_name, address, city, state, zip, phone,...). though, I got a requested to add additional info about people, like phone_extension, zip+4, nick, DOB... that will not be used very often. what would be better solution: a) add these columns to employees

How to get query result from two tables...

2007-03-16 Thread aljosa
I have two tables: Table A: Code | Name 100 | Name A 200 | Name B 300 | Name C Table B: Code | Date | Qty | Value 100 | 2007-01-01 | 10 | 123 100 | 2007-02-01 | -2 | 300 200 | 2007-02-01 | 3 | 100 What I want is to get this result: Result Table on date example 2007-01-05: Code | Name | Qty

Re: SELECT data FROM two tables into outfile

2007-02-05 Thread Rolando Edwards
From: "List User" <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Sent: Monday, February 5, 2007 4:19:08 PM (GMT-0500) US/Eastern Subject: SELECT data FROM two tables into outfile Hello list: Need some help with the following query: mysql> SELECT header.date_in,header.pid,he

SELECT data FROM two tables into outfile

2007-02-05 Thread List User
Hello list: Need some help with the following query: mysql> SELECT header.date_in,header.pid,header.status,body.body_data from header,body where header.date_in='1170705152' and body.date_in=header.date_in and header.pid='26878' and body.pid=header.pid into outfile '/tmp/mysql/117070515226878'

Re: select from two tables when they correspond, otherwise one table

2006-12-21 Thread boll
Thanks, Jocelyn. That's what I was looking for. Jocelyn Fournier wrote: Hi, SELECT products.sku, products.title, products.price, qty_price.qty, qty_price.qprice FROM products LEFT JOIN qty_price ON (products.sku = qty_price.qsku) WHERE products.vendor_id=15 AND products.category='widgets'; s

RE: select from two tables when they correspond, otherwise one table

2006-12-21 Thread Ruan
ecember 21, 2006 9:56 AM To: mysql@lists.mysql.com Subject: select from two tables when they correspond, otherwise one table This query will display from the 'products' and 'qty_price' tables when the 'products.sku' and 'qty_price.qsku' fields match: S

Re: select from two tables when they correspond, otherwise one table

2006-12-21 Thread Jocelyn Fournier
Hi, SELECT products.sku, products.title, products.price, qty_price.qty, qty_price.qprice FROM products LEFT JOIN qty_price ON (products.sku = qty_price.qsku) WHERE products.vendor_id=15 AND products.category='widgets'; should do what you want. Regards, Jocelyn Fournier www.mesdiscussions.

select from two tables when they correspond, otherwise one table

2006-12-21 Thread boll
This query will display from the 'products' and 'qty_price' tables when the 'products.sku' and 'qty_price.qsku' fields match: SELECT products.sku, products.title, products.price, qty_price.qty, qty_price.qprice FROM products, qty_price WHERE products.sku = qty_price.qsku AND products.vendor_id=1

Strange (to me) result when selecting from two tables

2006-12-08 Thread John Nichel
Hi, I have two tables: orders - orderid int(11) [UNIQUE] total decimal(12,2) source varchar(64) [...] order_details - orderid int(11) amount int(11) [...] The 'orders' table holds basic information about the order (customer, sales tax, etc.) and the 'order_details'

Re: Performance Problems With Two Tables With Over 500K Rows

2006-11-27 Thread Duncan Hill
On Saturday 25 November 2006 17:54, John Kopanas wrote: > The following query takes over 6 seconds: > SELECT * FROM purchased_services WHERE (purchased_services.company_id = > 535263) What does EXPLAIN say about that query? Have you done an optimize recently? -- Scanned by iCritical. -- MySQL

Re: Performance Problems With Two Tables With Over 500K Rows

2006-11-27 Thread Dominik Klein
My innodb_buffer_pool_size is: innodb_buffer_pool_size | 8388608 That looks like 8MB... that sounds small if I have a DB with over 1M rows to process. No? Yes, that's extremely small. I'd go for at least 256M, and maybe 512M if your machine will primarily be doing mysql duties. Did

Re: Re: Performance Problems With Two Tables With Over 500K Rows

2006-11-26 Thread mos
At 08:31 PM 11/26/2006, John Kopanas wrote: When I did a: SELECT * FROM purchased_services WHERE company_id = 1000; It took me 7 seconds. This is driving me crazy! I am going to have to try this on another computer and see if I am going to get the same results on another system. Argh... T

Re: Re: Performance Problems With Two Tables With Over 500K Rows

2006-11-26 Thread John Kopanas
Yes... with FORCE INDEX it still takes 7 seconds. On 11/26/06, Dan Nelson <[EMAIL PROTECTED]> wrote: In the last episode (Nov 26), John Kopanas said: > On 11/26/06, Dan Nelson <[EMAIL PROTECTED]> wrote: > >In the last episode (Nov 26), John Kopanas said: > >> Thanks a lot for your help. > >> > >

Re: Performance Problems With Two Tables With Over 500K Rows

2006-11-26 Thread Dan Nelson
In the last episode (Nov 26), John Kopanas said: > On 11/26/06, Dan Nelson <[EMAIL PROTECTED]> wrote: > >In the last episode (Nov 26), John Kopanas said: > >> Thanks a lot for your help. > >> > >> The query should and only does return 1-6 rows depending on the id. > >> Never more then that. Here a

Re: Re: Performance Problems With Two Tables With Over 500K Rows

2006-11-26 Thread John Kopanas
When I did a: SELECT * FROM purchased_services WHERE company_id = 1000; It took me 7 seconds. This is driving me crazy! I am going to have to try this on another computer and see if I am going to get the same results on another system. Argh... On 11/26/06, Dan Nelson <[EMAIL PROTECTED]> wro

Re: Performance Problems With Two Tables With Over 500K Rows

2006-11-26 Thread Dan Nelson
In the last episode (Nov 26), John Kopanas said: > Thanks a lot for your help. > > The query should and only does return 1-6 rows depending on the id. > Never more then that. Here are the comperative EXPLAINs: > > mysql> EXPLAIN SELECT * FROM purchased_services WHERE id = 1000; > ++-

Re: Re: Re: Re: Performance Problems With Two Tables With Over 500K Rows

2006-11-26 Thread John Kopanas
The application is not in production yet but when it will go in production the server will be considerably faster and have much more RAM. But before I put the app in production I want to make sure it is working properly. 500K rows does not sounds like that much in this day in age. If I understa

Re: Re: Performance Problems With Two Tables With Over 500K Rows

2006-11-26 Thread John Kopanas
Thanks a lot for your help. The query should and only does return 1-6 rows depending on the id. Never more then that. Here are the comperative EXPLAINs: mysql> EXPLAIN SELECT * FROM purchased_services WHERE id = 1000; ++-++---+---+-+--

Re: Re: Re: Performance Problems With Two Tables With Over 500K Rows

2006-11-25 Thread Dan Buettner
This kind of timeframe (2 - 2.5 secs) could just be the result of running on a laptop. You've got a small amount of RAM compared to many servers, a bit slower processor, and *much* slower hard disk system than most servers. If your query has to access multiple records spread out throughout the t

Re: Performance Problems With Two Tables With Over 500K Rows

2006-11-25 Thread Dan Nelson
In the last episode (Nov 25), John Kopanas said: > Sorry about these questions. I am used to working with DBs with less > then 10K rows and now I am working with tables with over 500K rows > which seems to be changing a lot for me. I was hoping I can get some > people's advice. > > I have a 'com

Re: Re: Performance Problems With Two Tables With Over 500K Rows

2006-11-25 Thread John Kopanas
If I just SELECT id: SELECT id FROM purchased_services WHERE (company_id = 1000) It takes approx 2-2.5s. When I look at the process list it looks like that it's state seems to always be in sending data... This is after killing the db and repopulating it again. So what is going on? On 11/25/06

Re: Performance Problems With Two Tables With Over 500K Rows

2006-11-25 Thread John Kopanas
I tried the same tests with the database replicated in a MyISAM engine. The count was instantaneous but the following still took 3-6seconds: SELECT * FROM purchased_services WHERE (purchased_services.company_id = 535263) The following though was instantaneous: SELECT * FROM purchased_services

Performance Problems With Two Tables With Over 500K Rows

2006-11-25 Thread John Kopanas
Sorry about these questions. I am used to working with DBs with less then 10K rows and now I am working with tables with over 500K rows which seems to be changing a lot for me. I was hoping I can get some people's advice. I have a 'companies' table with over 500K rows and a 'purchased_services'

Re: Two Tables Comparator

2006-10-06 Thread Dan Buettner
Rich, it looks to me like your SQL should work - I've never used '!IN', always used 'NOT IN' instead, but that's not to say it won't work. I do note that you're missing the join criteria for your tables classes, signups ... Am I misunderstanding your question? Dan On 10/5/06, Rich <[EMAIL PROT

Two Tables Comparator

2006-10-05 Thread Rich
Hi folks. Any suggestions on the following? If a student signs up for classes, I don't want them viewing those classes so they can choose them again. So I want to take out their 'signups' from the master class list. "select classnumber, classnumbersignup from classes, signups whe

RE: Show differences between two tables

2006-09-15 Thread Jerry Schwartz
/ FAX: 860.674.8341 -Original Message- From: Neil Tompkins [mailto:[EMAIL PROTECTED] Sent: Friday, September 15, 2006 5:04 AM To: mysql@lists.mysql.com Subject: Show differences between two tables Hi I've two tables TableA FieldID Enabled TableB FieldID Enabled What query would I ne

Re: Show differences between two tables

2006-09-15 Thread Dan Buettner
, Neil Tompkins <[EMAIL PROTECTED]> wrote: Hi I've two tables TableA FieldID Enabled TableB FieldID Enabled What query would I need to show what FieldIDs which are the same, but the enabled field status is different ?Thanks, Neil _

Show differences between two tables

2006-09-15 Thread Neil Tompkins
Hi I've two tables TableA FieldID Enabled TableB FieldID Enabled What query would I need to show what FieldIDs which are the same, but the enabled field status is different ?Thanks, Neil _ Be one of the first to try Wi

Re: Distinct from two tables

2006-06-29 Thread Peter Brawley
Mark Steudel wrote: Is there a way get distinct results between pf and sf? Select pf.name, sf.name From tblpropertyfeatures, tblsuitefeatures Inner Join tblfeatures AS pf ON tblpropertyfeatures.featureid = pf.id Inner Join tblfeatures AS sf ON tblsuitefeatures.featureid = sf.id Do you m

Distinct from two tables

2006-06-29 Thread Mark Steudel
Is there a way get distinct results between pf and sf? Select pf.name, sf.name From tblpropertyfeatures, tblsuitefeatures Inner Join tblfeatures AS pf ON tblpropertyfeatures.featureid = pf.id Inner Join tblfeatures AS sf ON tblsuitefeatures.featureid = sf.id --

Re: Find ids that are NOT in other two tables.

2006-05-22 Thread Ben Liu
kind help. Would it work, if I rewrite your query as below to remove all records from company_db that don't have any relation to other two tables? > > > DELETE > FROM company_db c ... -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscr

Re: Find ids that are NOT in other two tables.

2006-05-22 Thread Jay Pipes
Yesmin Patwary wrote: Hi, Greatly appreciated your kind help. Would it work, if I rewrite your query as below to remove all records from company_db that don't have any relation to other two tables? DELETE FROM company_db c LEFT JOIN person p ON c.company_id = p.compa

Re: Find ids that are NOT in other two tables.

2006-05-19 Thread Yesmin Patwary
Hi, Greatly appreciated your kind help. Would it work, if I rewrite your query as below to remove all records from company_db that don't have any relation to other two tables? DELETE FROM company_db c LEFT JOIN person p ON c.company_id = p.company_id LEFT JOIN customer

Re: Find ids that are NOT in other two tables.

2006-05-19 Thread Jay Pipes
Yesmin Patwary wrote: Dear All, Need to find ids that are NOT in other two tables. With the help of PHP scripting and three queries I am able to do the task. Can this be done with one mysql query? Below are current quires: SELECT DISTINCT company_id FROM company_db SELECT

Find ids that are NOT in other two tables.

2006-05-19 Thread Yesmin Patwary
Dear All, Need to find ids that are NOT in other two tables. With the help of PHP scripting and three queries I am able to do the task. Can this be done with one mysql query? Below are current quires: SELECT DISTINCT company_id FROM company_db SELECT company_id FROM

Re: Merging two tables

2005-12-16 Thread SGreen
--- > Scott HanedaTel: 415.898.2602 > <http://www.newgeo.com> Novato, CA U.S.A. > > When joining tables, you need to specify the conditions on which the two tables are supposed to match. If you do not,

Merging two tables

2005-12-16 Thread Scott Haneda
I need to do this just once... I have table zip_codes and table hardiness_zones In this case, the key will be the actual zip codes. hardiness_zones has two fields, zone_start and zone_end, these are all empty in the zip_codes table. I just need to move the data over, where the zip codes are ==.

Re: report from two tables

2005-11-03 Thread [EMAIL PROTECTED]
s_No DESC LIMIT 100 It works for me. Regards! -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Enviado el: Jueves, 03 de Noviembre de 2005 03:55 p.m. Para: MySQL List Asunto: report from two tables Hi, I have two table for orders and I have to create a Report with list

RE: report from two tables

2005-11-03 Thread ISC Edwin Cruz
ROTECTED] Enviado el: Jueves, 03 de Noviembre de 2005 03:55 p.m. Para: MySQL List Asunto: report from two tables Hi, I have two table for orders and I have to create a Report with list of orders from both tables for specific day. I made Reports for each table and they work just fine, but don&

report from two tables

2005-11-03 Thread [EMAIL PROTECTED]
Hi, I have two table for orders and I have to create a Report with list of orders from both tables for specific day. I made Reports for each table and they work just fine, but don't know how to "put them together": Query for Order Table 1: SELECT o.Trans_No, o.SoldBy, sm.LName, sm.FName, sm.

Re: comparing two tables

2005-10-27 Thread sheeri kritzer
Oops, you are correct. I missed a "not" in the original post. -Sheeri On 10/27/05, Brent Baisley <[EMAIL PROTECTED]> wrote: > You would want to do a left join and only keep the null values. > > SELECT tableA.* > FROM tableA > LEFT JOIN tableB ON tableA.recordID=tableB.recordID > WHERE tableB.rec

Re: comparing two tables

2005-10-27 Thread Brent Baisley
You would want to do a left join and only keep the null values. SELECT tableA.* FROM tableA LEFT JOIN tableB ON tableA.recordID=tableB.recordID WHERE tableB.recordID IS NULL On Oct 27, 2005, at 6:35 AM, Christopher Molnar wrote: If I have two similar tables, with identical columns how would I

comparing two tables

2005-10-27 Thread Christopher Molnar
If I have two similar tables, with identical columns how would I select rows that are not duplicated between both tables? Any easy way to do this? Thanks, -Chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PRO

Re: Merging two tables which contain passwords with different encryption methods [SOLVED]

2005-09-06 Thread Dave
No, because that would require MySQL to 'see' the plain text version of the password. For MySQL to do that, the proces would look something like: PASSWORD()ed password ---> plain text ---> MD5ed password The first link in that chain is mathematically impossible (even if you never saw the

Re: Merging two tables which contain passwords with different encryption methods

2005-09-05 Thread Jasper Bryant-Greene
Dave wrote: [snip] I believe I will need to use the new password hashing algorithm, because using the old one would require me to reconfigure the PHP code for the forum, which would be a level of complexity beyond my capabilities. So I now understand that I can not decrypt the passwords into

Re: Merging two tables which contain passwords with different encryption methods

2005-09-05 Thread Dave
It did change between MySQL 3.2 and 4.1. You need the old-passwords configuration directive, it is in the MySQL manual at dev.mysql.com. Thank you. I believe the old-passwords configuration has already been set by my web host. You can't decrypt the password fields. That's the point of *one

Re: Merging two tables which contain passwords with different encryption methods

2005-09-05 Thread Jasper Bryant-Greene
Dave wrote: [snip] The current members tables uses the default PASSWORD encryption built into MySQL. Although my current MySQL version is 4.1.3, I believe this is the same password encryption that was used in MySQL 3.2. The user data was created in an earlier version of MySQL, and later the

Merging two tables which contain passwords with different encryption methods

2005-09-05 Thread Dave
MySQL General List, Server specifications: MySQL 4.1.3-beta, phpMyAdmin 2.5.7-pl1, PHP 4.3.8 My specifications: MySQL beginner, PHP intermediate, HTML and CSS advanced. The situation: I have a table of information on roughly 150 users. Recently, I have added a forum ( "Simp

Re: Compare two tables

2005-08-26 Thread Peter Brawley
Alfredo, If you are using MySQL 5.02 or later, here is an information_schema query that will list table structure _differences_. The idea is to group the UNION of rows in information_schema.columns for the two tables on all information_schema.columns columns, then use HAVING to pick only

Re: Compare two tables

2005-08-26 Thread Martijn Tonies
> > You could check the table DDL. > > > > Or use a third party tool, like Database Workbench, that can do this for > > you and even generator a change script. Check www.upscene.com > > > > With regards, > > > > Martijn Tonies > > Hmmm. No Linux version. Thank you anyway. Nope, indeed. Se

Re: Compare two tables

2005-08-26 Thread Alfredo Cole
El Viernes, 26 de Agosto de 2005 08:56, Gordon Bruce escribió: > If you have the 5.0.x version of MySQL then INFROMATION SCHEMA can give > you what you want. i.e. > > SELECT a.*, b.* > FROM INFORMATION_SCHEMA.COLUMNS AS a >INNER JOIN _SCHEMA.COLUMNS AS b >ON (a.column_name

Re: Compare two tables

2005-08-26 Thread Mark Addison
On Fri, 2005-08-26 at 09:14 -0600, Alfredo Cole wrote: > El Viernes, 26 de Agosto de 2005 08:16, Martijn Tonies escribió: > > > > You could check the table DDL. > > > > Or use a third party tool, like Database Workbench, that can do this for > > you and even generator a change script. Check ww

Re: Compare two tables

2005-08-26 Thread Alfredo Cole
El Viernes, 26 de Agosto de 2005 08:16, Martijn Tonies escribió: > > You could check the table DDL. > > Or use a third party tool, like Database Workbench, that can do this for > you and even generator a change script. Check www.upscene.com > > With regards, > > Martijn Tonies Hmmm. No L

RE: Compare two tables

2005-08-26 Thread Gordon Bruce
Cole [mailto:[EMAIL PROTECTED] Sent: Friday, August 26, 2005 9:08 AM To: mysql@lists.mysql.com Subject: Compare two tables Hi: I need to compare the structure of two tables (fields, field types, field lengths, indices, etc.) to determine if they have the same schema, even if the fields may be in a

Re: Compare two tables

2005-08-26 Thread Martijn Tonies
Hi, > I need to compare the structure of two tables (fields, field types, field > lengths, indices, etc.) to determine if they have the same schema, even if > the fields may be in a different order. Is there a command in mysql that will > do this? This will be used to determine if th

Re: Compare two tables

2005-08-26 Thread SGreen
Alfredo Cole <[EMAIL PROTECTED]> wrote on 08/26/2005 10:07:30 AM: > Hi: > > I need to compare the structure of two tables (fields, field types, field > lengths, indices, etc.) to determine if they have the same schema, even if > the fields may be in a different order.

Compare two tables

2005-08-26 Thread Alfredo Cole
Hi: I need to compare the structure of two tables (fields, field types, field lengths, indices, etc.) to determine if they have the same schema, even if the fields may be in a different order. Is there a command in mysql that will do this? This will be used to determine if the tables are

RE: Need a query to get the difference of two tables

2005-01-31 Thread Harish
: mysql Cc: Harish; Michael Stassen Subject: Re: Need a query to get the difference of two tables Harish wrote: > Hi All, > > This query worked for me. > > SELECT a.address >FROM a >LEFT JOIN b ON a.id != b.iid AND b.message='y' Strange... that query sho

  1   2   3   >