Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
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()
 
CHAR(a,t) AND LIMIT functions

CHAR(a,t) AND LIMIT functions

2007-01-31       - By Xavier CAMIER

 Back
Reply:     1     2     3  

MaxDB 7.6.00.34   (linux 32)
SQLStudio 7.6.00.27

Good afternoon List,

When querying my database I get unexpected results in using the CHAR and
LIMIT functions.

About the CHAR(a,t) function. The help explains "CHAR(a,t) is a function
(conversion function
<../../48/b4e428c0ca11d2a97100a0c9449261/content.htm>) that converts the
date values <../../03/50880883c411d4bb3a00508b5d5211/content.htm>, time
values <../../03/50880b83c411d4bb3a00508b5d5211/content.htm>, or
timestamp values <../../03/50880e83c411d4bb3a00508b5d5211/content.htm>
to a character string".

SELECT CHAR(MYTIMESTAMPENTRY) AS STRDATE FROM MYTABLE     works fine.
SELECT CHAR(MYTIMESTAMPENTRY,'YYYY-MM-DD') AS STRDATE FROM MYTABLE    
doesn't work. I get the following error message : Syntax error or access
violation;-5015 POS(31) Missing keyword


About the limit function. I've read a post about that but there was no
answer. According to the documentation I could use the limit function
that way : LIMIT nbrows offset.

SELECT * FROM MYTABLE ORDER BY NAME LIMIT 100   works fine. It sends the
100 first names contained by MYTABLE in alphabetical order.
SELECT * FROM MYTABLE ORDER BY NAME LIMIT 100 10 sends the 110 first
names contained by MYTABLE in alphabetical order instead of sending 100
names from the 10th.


Any idea about those problems ?
Kind regards
Xavier.


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