Microsoft
Software
Hardware
Network
Question : Insert into ... where problems
Hi Experts
I have a small problem.
i am trying to insert a birthday from one table to another with the following statement;
INSERT INTO consumerattributes( BirthDate )
SELECT 'birthday'
FROM customers
WHERE `consumerattributes`.`cust
omerid` = `customers`.`customerId`
I get this error :
#1054 - Unknown column 'consumerattributes.custom
erid' in 'where clause'
What I'm trying to do is to populate the birthday field with the info from a older database, therefor the WHERE `consumerattributes`.`cust
omerid` = `customers`.`customerId`
I know that `consumerattributes`.`cust
omerid` exist. - It works if i just use
WHERE `customerid` = `customers`.`customerId`
but it just inserts the data in new rows :'(
I'm really hoping that you are able to help
:)
/DeviliX
Answer : Insert into ... where problems
Try this...
INSERT INTO consumerattributes([BirthD
ate])
SELECT Birthday FROM customers WHERE consumerattributes.custome
rid = customers.customerId
Random Solutions
PING (Partimage Is Not Ghost) : Unattend Restore from Networked Image
Goal Seek and Tax rates & Excel Formula
DB owner
SQL 2005 database move to Windows 7 64 Bit with SQL 2008 R2 Engine installed
auto query windows security log for specific event id
How do I execute a Windows Batch File from SQL?
How can I allow user to modify the interface of the application (Visual Studio)?
Jquery Help, Body on load
USB DRIVE ERROR -- " Please insert a disk into drive O: "
Visual Basic - datagridview returns 2 rows for single database entry