Re: CHAR(a,t) AND LIMIT functions

"Dusan Kolesar" <[email protected]>
Newsgroups gmane.comp.db.maxdb
Message-ID <op.tm2df8ccb4v8cn@dusanxp>
Hello Xavier

On Wed, 31 Jan 2007 18:17:10 +0100, Xavier CAMIER  
<[email protected]> wrote:

> 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".
>

CHAR(a,t)
is a function (conversion function) that converts the date values, time  
values, or timestamp values to a character string (expression a) with the  
format for date values, time values, or timestamp values specified in t.

t (second parameter) is:
<datetimeformat> ::= EUR | INTERNAL | ISO | JIS | USA



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

Try :
SELECT CHAR (DATE (MYTIMESTAMPENTRY)) AS STRDATE FROM MYTABLE
OR
SELECT CHAR (DATE (MYTIMESTAMPENTRY), ISO) AS STRDATE FROM MYTABLE
OR
SELECT CHAR (DATE (MYTIMESTAMPENTRY), EUR) AS STRDATE FROM MYTABLE
if you want only date fraction.

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

This is new for me.
LIMIT works only in version 7.6.0.34 not in older version 7.6.0.16  
unfortunately (we are using mostly this version).


>
> Any idea about those problems ?
> Kind regards
> Xavier.
>
>



-- 
Dusan Kolesar
Helsinska 19
040 13  Kosice
Slovakia
e-mail primary : [email protected]
e-mail alternative : [email protected]
ICQ# : 160507424


-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.