Re: Getting only Date

"Paulo" <eris_paulo@xxxxxxxxxxxx> escreveu na mensagem
Hi, how do I only get the current Dte (yyyy/mm/dd) on SQL 2000?

tried below but no success... many thanks!
SELECT CONVERT (Date, GetDate())

On the sql below, can something be done to ensure the Year will return 4
digits, Month with 2 and Day with 2...? Just to use the standard: '20090512'
select Cast(Year(GetDate()) as VarChar) + Cast(Month(GetDate()) as VarChar)
+ Cast(Day(GetDate()) as VarChar)

Many Thanks


Relevant Pages

  • Re: Db2dclgn Indicator variables
    ... It is true that "49-levels" are used by most SQL products for holding ... I'd love to see a COBOL that supports the ANY LENGTH PREFIXED ... clause for a much more natural VARCHAR. ... I'd also love to see some kind of COBOL support for "null" values. ...
  • Re: how to insert xml into sql 2005
    ... For right now I just know I have to get this into the sql database. ... to XML processing no matter how big the XML document is. ... ,captionnohtml varchar 'CaptionNoHTML' ...
  • Re: Stored Procedure calling RPGLE
    ... A common problem using the given procedure definition, would be the use of CHAR versus VARCHAR. ... Unless the type is defined by a field or bound in a program, the VARCHAR must be used because the SQL will type the parameter as VARCHAR. ... IBM iSeries Access or another RPG program, it executes fine. ...
  • Re: Inserting an Email Address fails.
    ... 'Position' VARCHAR NOT NULL, ... "You have an error in your SQL syntax. ... corresponds to your MySQL server version for the right syntax to use ...
  • Re: Append to SQL Server
    ... IF it is varChar then perhaps you can use the Trim or RTrim function on the memo field in the query. ... It is possible that the Access memo field does contain trailing spaces depending on how the data got into the memo field. ... It works fine except if the field has 10 characters, 245 blank spaces are put at the end in SQL Server. ...