List:General Discussion« Previous MessageNext Message »
From:culikr Date:June 1 2006 2:06am
Subject:Problem with querie
View as plain text  
Dear friends
Im having some problems with this queries on mysql 4.1.15
"SELECT * FROM scg00_scga2800_dbf WHERE taxdvig >= '20050302' OR (taxdvig = (SELECT
max(taxdvig) FROM scg00_scga2800_dbf WHERE taxdvig < '20050302') AND (SELECT
count(taxdvig) FROM scg00_scga2800_dbf WHERE taxdvig = '20050302') = 0)

is this query sybtax ok?
bellow the table structure
CREATE TABLE scg00_scga2800_dbf (
  taxdvig date default NULL,
  taxcmpe double(5,2) default NULL,
  taxenfi double(5,2) default NULL,
  taxdtra date default NULL,
  taxdt01 date default NULL,
  taxpr01 double(7,4) default NULL,
  taxdt02 date default NULL,
  taxpr02 double(7,4) default NULL,
  taxpr03 double(7,4) default NULL,
  tax_iof double(7,4) default NULL,
  sr_recno bigint(15) NOT NULL auto_increment,
  sr_deleted char(1) NOT NULL default '',
  UNIQUE KEY sr_recno (sr_recno),
  KEY SCG00_SCGI2801_000007 (taxdvig,sr_recno),
  KEY SCG00_SCGI2802_000008 (taxdtra,sr_recno)


Problem with querieculikr1 Jun
  • Re: Problem with querieMartijn Tonies1 Jun