Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL++ - Programming with the C++ API to MySQL
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
Problem with querie

Problem with querie

2006-06-01       - By Martijn Tonies

 Back
Reply:     1     2  



> Dear friends

Please do not send your messages as "urgent" to a mailinglist.
It might be urgent to you, but not to the hundreds of people
receiving your e-mail.

> 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)
>

What problem are you having?

> 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)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
>

Martijn Tonies
Database Workbench - development tool for MySQL, and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=mysql@(protected)