Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 connect to priority via odbc

Author  Topic 

inbs
Aged Yak Warrior

860 Posts

Posted - 2008-06-27 : 12:25:04
Our priority is on dB SQL server 2005
how i define the odbc to the db (is it by the tabula or by sql server 2005)

i define by Oledb to connect to SQL SERVER 2005 to transfer data to MY db that on SQL server 2005/
my problem that i can't get proppely the Date in SQL SERVER 2005 (priority) the data of date is like 167859 instead 27/05/2008

the error that i get:
Data Conversion [6476]] Error: Data conversion failed while converting column "UDATE" (2633) to column "Copy of UDATE" (6499). The conversion returned status value 6 and status text "Conversion failed because the data value overflowed the specified type.".

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-06-28 : 22:59:58
You can load that into staging table, then convert to datetime with convert function.
Go to Top of Page

maninder
Posting Yak Master

100 Posts

Posted - 2008-06-29 : 11:48:10
This seems to be JULIAN Date. You will have to use a custom Function as in http://www.novicksoftware.com/UDFofWeek/Vol2/T-SQL-UDF-Vol-2-Num-3-udf_DT_FromJulian.htm
you cannot concert JULIAN using the normal DateTime Function.

Maninder
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-06-29 : 14:32:54
select convert(datetime, 167859)

2359-08-02 00:00:00.000
Go to Top of Page
   

- Advertisement -