chrometweaks.org

Can I use Yahoo Business Email account if I host my domain name with iPage?

Click Here To View All Answers...


My 1st question is: Can I use Yahoo Business Email account if I host my domain name with iPage? Hoping for any comment. Another question on my mind: Hi there people.

Right, does anyone know how to run a query that will compare two tables and if they differ update the different field....

For example, I have two tables - one called rectron and one called test!.

The test table needs to be updated if the price in the rectron table changes, now it should be strightforward but it's not working - here's what I'm using!.

UPDATE test.

SET test.products_price = rectron.products_price.

WHERE test.products_model = rectron.products_model.

This is the error message:.

MySQL said:.

Unknown table 'rectron' in where clause.

Help, what am I doing wrong, tried :.

UPDATE test.

SET test.products_price = (SELECT products_price FROM rectron).

WHERE test.products_model = (SELECT products_model FROM rectron).

And still get error messages...it should be simple but it isnt.....

Am I on the right track here now - to explain what I'm doing - my supplier sends me a pricelist every week with updated prices - the model number of the product stays the same, the price changes... so what I'm doing is importing the new prices and the model from an excel file into a rectron table and then comparing the differences with the "test" table...is that right? Or is there an easyier way to do it?.

Any help will be appreciated so much,.

Sweet,.

Nick..

Comments (19)

The answer is Yes, but you might wanna make sure and wait for someone else here to confirm it as I am unsure of myself. Better yet, why don't you call the iPage guys because they can answer you better...

Comment #1

Ok, looked on the mysql helpline...says something about going like this :.

UPDATE test, rectron.

SET test.products_price = (SELECT products_price FROM rectron).

WHERE test.products_model = (SELECT products_model FROM rectron).

Still not helping much...arrrrrrgggggggggggggggggg!!!!!!!!..

Comment #2

Maybe you can try this:.

UPDATE test, rectron.

SET test.products_price = rectron.products_price.

WHERE test.products_model = rectron.products_model.

In msaccess this works but I'm not so sure for mysql database.

Second solution may be.

1).

Use of CREATE TABLE bar (UNIQUE (fields...)) SELECT (desired fields to compare for both tables) FROM test, rectron where test.keyid=rectront.keyid; // you create there one temporary table with two tables in it..

2).

Update desired table with data from temporary table.

Also I think there must be other solutions for your problem.

Nickos.

This post has been edited by.

Nickos.

: 13 February 2004, 18:51..

Comment #3

Nope, that didnt wanna work either....Um, anybody else have any idea's?.

Thanks anyways!!!.

Nick..

Comment #4

Hey.

Does nobody else have any idea's??? Please please pretty please if you know please tell me???.

Nick..

Comment #5

Yiiiiippppeeeeeeeeeeee.

Yipppppepeeeeee..... it works it works - Nico, your my hero... that MsAccess way worked.....

Thanks ALOT bro..

Comment #6

Hi there people.

Right, does anyone know how to run a query that will compare two tables and if they differ update the different field....

For example, I have two tables - one called rectron and one called test!.

The test table needs to be updated if the price in the rectron table changes, now it should be strightforward but it's not working - here's what I'm using!.

UPDATE test.

SET test.products_price = rectron.products_price.

WHERE test.products_model = rectron.products_model.

This is the error message:.

MySQL said:.

Unknown table 'rectron' in where clause.

Help, what am I doing wrong, tried :.

UPDATE test.

SET test.products_price = (SELECT products_price FROM rectron).

WHERE test.products_model = (SELECT products_model FROM rectron).

And still get error messages...it should be simple but it isnt.....

Am I on the right track here now - to explain what I'm doing - my supplier sends me a pricelist every week with updated prices - the model number of the product stays the same, the price changes... so what I'm doing is importing the new prices and the model from an excel file into a rectron table and then comparing the differences with the "test" table...is that right? Or is there an easyier way to do it?.

Any help will be appreciated so much,.

Sweet,.

Nick..

Comment #7

Example number one isn't even valid SQL syntax on any DBMS. Example number two is usgin a subquery in an update statement, which MySQL deosnt' support, yet..

The solution is to utilize mySQL's new support for multi-table updates. You have to join the two tables together in the update...

Comment #8


This question was taken from a support group/message board and re-posted here so others can learn from it.