Help with CREATE SELECT Statement

2004-02-11 Thread Carlos Vazquez
I get this error when I try to execute the following select statement: All Parts of a PRIMARY KEY must be NOT NULL; if you need null in a key, use UNIQUE instead. CREATE TEMPORARY TABLE IF NOT EXISTS CashVariances (PRIMARY KEY(sUnit)) SELECT sUnit, dSalesDate AS

Help with CREATE SELECT Statement

2004-02-11 Thread Carlos Vazquez
I get this error when I try to execute the following select statement: All Parts of a PRIMARY KEY must be NOT NULL; if you need null in a key, use UNIQUE instead. CREATE TEMPORARY TABLE IF NOT EXISTS CashVariances (PRIMARY KEY(sUnit)) SELECT sUnit, dSalesDate AS

Newbie: Rephrase SQL Statement

2004-02-03 Thread Carlos Vazquez
Hi, all. I built this SQL Statement in Access97. I want to rephrase it to use it in MySQL3.23. The problem is I don't know the correct syntax. Any help will be really appreciated. Thanks. SELECT bnkrestaurants.sRest, bnkdetailpos.dTransDate,

Newbie - Primary Keys

2003-10-20 Thread Carlos Vazquez
Hi all! Just wanted to know how do I create a table with two primary keys. Thanks a lot!

RE: Newbie - Primary Keys

2003-10-20 Thread Carlos Vazquez
key, and if you set it up such that it is not null, it will act much like a prmary key: CREATE TABLE test ( id1 INT UNSIGNED NOT NULL, PRIMARY KEY (id1), id2 INT UNSIGNED NOT NULL, UNIQUE KEY (id2), data VARCHAR(25) ); Hope that helps, Mark --- Carlos Vazquez [EMAIL PROTECTED

Rephrase Select Statement

2003-10-02 Thread Carlos Vazquez
Hi all! I'd like to replace the values of nIndex field in NewOrder table with the values of the same field in the table InvMast... In MySQL 4 it is like this: UPDATE neworder, invmast SET NewOrder.nIndex = InvMast.nIndex WHERE neworder.sItemNo = invmast.sItemNo The problem is this does not

Like MySQL Dump, but with FoxPro Tables

2003-09-29 Thread Carlos Vazquez
Hi all! I want to create an application that transfers data from FoxPro (*.dbf) tables to MySQL. Does MySQL have a DUMP like or LOAD LIKE function that transfers this data in one step? I just don't want to loop into thousands of records to insert them one by one into my MySQL database. It