Hi,

Dusan, you mixed
CHAR (....,  <some_predefined_date/time/format> ) used in SQLMODE
INTERNAL
and
TO_CHAR (..., <some string containing the definition of
date/time-layout> ) used in SQLMODE ORACLE

-->
CHAR (timestampentry, ISO) or CHAR ( DATE ( timestampentry, ISO) ) in
INTERNAL MODE  
or
TO_CHAR (timestampentry, 'YYYY-MM-DD') in SQLMODE ORACLE
 

Syntax: LIMIT [ offset] [row count]
(in later versions with comma in between)

LIMIT 100 10
should result in 10 rows.

We will check 

Elke
SAP Labs Berlin


> -----Original Message-----
> From: Dusan Kolesar [mailto:[EMAIL PROTECTED] 
> Sent: Donnerstag, 1. Februar 2007 10:47
> To: Xavier CAMIER
> Cc: MaxDB mailing list
> Subject: Re: CHAR(a,t) AND LIMIT functions
> 
> 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]
> 
> 

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to