|
Posted by Filips Benoit on 06/21/06 20:35
Thank for following me,
I'm still not done with that date-convertion-problem
I want to be able to run the SP below but it triggers error = 'Aritmitic
overflow error converting expression to data type datetime'
What am i missing.
Thanks²,
Filip
Alter Procedure StoredProcedure1
-- dates in CPROP_VALUE ( nvarchar) as '1/1/2000' or'01/01/200' or
'1/06/2000' tested in access with function IsDate()
As
SELECT CPROP_PRP_ID,
CPROP_VALUE
FROM dbo.COMPANY_PROPERTY
where CPROP_PRP_ID = 370 and
convert(datetime, CPROP_VALUE, 103 ) = getdate()
"Erland Sommarskog" <esquel@sommarskog.se> wrote in message
news:Xns97E99E050F7DYazorman@127.0.0.1...
> Filips Benoit (benoit.filips@pandora.be) writes:
> > Float-convertions is OK
> >
> > Can't find a code for datetime-conversion from nvarchar format
DD/MM/YYYY
> > http://doc.ddart.net/mssql/sql70/ca-co_1.htm
>
> It's there on that page. You need to read the table headers a little more
> closely.
>
> > What is the max lenght of sql_variant?
>
> 8000 bytes.
>
> > Now CPRP_VALUE = nvarchar 1024 Is it possible to change the
> > field-datatype having existing data?
>
> One way or another it is. I would guess that ALTER TABLE ALTER COLUMN
works,
> but I have not actually tried it. But obviously if you do that, all
> data will be converted with a basetype of nvarchar, so you would have to
> write some script to repopulate the column.
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|