* 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 dDate, > SUM(nStoreCash) AS aCash, > SUM(nBankCash) AS bCash, > SUM(nStoreCash) - SUM(nBankCash) AS nDifference > FROM > CashBalances
Is the sUnit column defined as NOT NULL in the CashBalances table? It should be. -- Roger -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]