Re: how to conver nvarchar with value like(12.23) to time (12:23)

From: Louis Davidson (dr_dontspamme_sql_at_hotmail.com)
Date: 11/09/04


Date: Tue, 9 Nov 2004 15:03:04 -0600

Can you please give us a script of some sample data to try out?

-- 
----------------------------------------------------------------------------
Louis Davidson - drsql@hotmail.com
SQL Server MVP
Compass Technology Management - www.compass.net
Pro SQL Server 2000 Database Design - 
http://www.apress.com/book/bookDisplay.html?bID=266
Note: Please reply to the newsgroups only unless you are interested in 
consulting services.  All other replies may be ignored :)
"Indra Timilsina" <itimilsina@savannaenergy.com> wrote in message 
news:OLjzogpxEHA.4004@tk2msftngp13.phx.gbl...
> Hi David,
>
> I try as you mentioned, but still I am receiving this error.
>
> "Arithmetic overflow error converting expression to data type datetime"
>
>
> INSERT INTO TourItemsTemp (FromTime, ToTime, TimeCodeID,
> TourItemDescription)
> select  Cast(replace(Col004, '.', ':') as datetime),
> replace(Col005,'.',':'), Col007, Col008 FROM UploadTour
> where Col001=N'TTL160';
>
> Thanks.
>
> Indra.
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it! 


Relevant Pages

  • Re: Query for search engine
    ... > relational database and is not restricted to SQL server. ... > our internet site and SQL for our intranet sites. ... >> Could you please post some DDL, sample data and expected result? ...
    (microsoft.public.sqlserver.programming)
  • Access SUMs Full Column When Using Subquery
    ... I jumped over to SQL Server, and it gave me the results I wanted, so ... Sample Data: Students_02272005_1 ... SELECT clause due to conditions specified on the subquery's WHERE ... Stud_ID Lesson PercentAbove5 ...
    (microsoft.public.access.queries)
  • Re: join on 3 tables for asp output
    ... The table structure and sample data is ... >> Mondays since I am scheduling instruments for a whole week. ... > some outer joins (I'm assuming this is SQL Server, ... > quicker response by posting to the newsgroup. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Need help with hint syntax in SQL Server 2000
    ... unable to recognize that it shoul push the where clause condition down ... Some sample data might help as well, ... My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis ...
    (comp.databases.ms-sqlserver)
  • Re: Strange ... SQL 2000 & SQL 2005
    ... Andrew J. Kelly SQL MVP ... I run into SQL Server 20005, ... Arithmetic overflow error converting numeric to data type numeric. ...
    (microsoft.public.sqlserver.clients)