Re: Convert help needed desperately

From: CL (cl_at_mail)
Date: 05/14/04


Date: Thu, 13 May 2004 19:22:57 -0500

I tried this already as well - this is the Error I get

'Customer' table
- Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Arithmetic
overflow error converting expression to data type datetime.
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been
terminated.

Is my sql server hosed????
"Tom Moreau" <tom@dont.spam.me.cips.ca> wrote in message
news:#q8WegUOEHA.892@TK2MSFTNGP09.phx.gbl...
> Don't use timestamp. Change the column datatype to datetime and simply
set
> the value = getdate(). Timestamp - now known as rowversion - is not used
> for anything to do with time.
>
> --
> Tom
>
> ----------------------------------------------------
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com/sql
> .
> "CL" <cl@mail> wrote in message
> news:uT8y0cUOEHA.3044@TK2MSFTNGP10.phx.gbl...
> It is just getting the current system date and placing it a field that is
of
> the timestamp data type. I'm trying to do an update query and this is a
> required field - and does not accept null
> "Tom Moreau" <tom@dont.spam.me.cips.ca> wrote in message
> news:Own$yBUOEHA.3044@TK2MSFTNGP10.phx.gbl...
> > Unlike its name, timestamp has absolutely nothing to do with time. What
> is
> > your actual business requirement?
> >
> > --
> > Tom
> >
> > ----------------------------------------------------
> > Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> > SQL Server MVP
> > Columnist, SQL Server Professional
> > Toronto, ON Canada
> > www.pinnaclepublishing.com/sql
> > .
> > "CL" <cl@mail> wrote in message
> news:eor1A$TOEHA.556@tk2msftngp13.phx.gbl...
> > I have a stored procedure that is throwing an error 291 when I'm trying
to
> > convert datetime to a timestamp.
> >
> > The table I am inserting into needs to have a timestamp My code in
> question
> > looks like this:
> >
> > , Convert(timestamp(8), getdate()) as upsize_ts
> >
> > Can any one help to see what I am doing wrong????
> >
> > CL
> >
> >
>
>



Relevant Pages

  • Re: Using CASE .. WHEN to have dynamic sort
    ... > I'm trying to create a Stored Procedure that returns a recordset, ... > The conversion of a char data type to a datetime data type resulted in ... > an out-of-range datetime value. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: Data Types
    ... > moved to SQL Server and I don't know the best newsgroups yet. ... > Does a Unique Identifier data type take up less storage space than a 32 ... A uniqueidentifier uses 16 bytes. ... but I'm looking at the data types and think that the TimeStamp ...
    (microsoft.public.sqlserver.programming)
  • Re: Convert help needed desperately
    ... The timestamp column is useless to you. ... a new column of datatype datetime and populate it with getdate. ... Columnist, SQL Server Professional ... > "Tom Moreau" wrote in message ...
    (microsoft.public.sqlserver.programming)
  • Re: Date Stamp
    ... HireDate etc.) and the issue about reserved words. ... TIMESTAMP is a standard SQL data type, ... Acess/Jet's big sister, SQL Server, has a TIMESTAMP ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Oh... no....
    ... select castas datetime) ... Obviously it would be better to use the "standard" format. ... Pro SQL Server 2000 Database Design ... >> data type of the date_variable in stored proc have been set to char ...
    (microsoft.public.sqlserver.programming)