Showing posts with label driver. Show all posts
Showing posts with label driver. Show all posts

Thursday, March 29, 2012

convert adDBtimeStamp to datetime

Hello,
I use a SQL Server with ODBC driver and >NET C#.
I want to convert a date field with adDBtimeStamp format to a DATETIME
format, but no solution could be found till now.
My query is as follows:
SELECT received_at as EXPR1
FROM TTable
WHERE datepart(w(datetime(received_at)))>10
Has anybody any solution for conversion?
*** Sent via Developersdex http://www.examnotes.net ***What is the SQL datatype of "received_at" and what are you attepting to
do with it? adDBtimeStamp maps to a DATETIME type in SQL Server so no
conversion should be necessary. However your example code isn't valid
in SQL Server - there is no WEEK or DATETIME function and your syntax
for DATEPART is wrong.
Maybe the following was what you intended, assuming you are in fact
dealing with a DATETIME column:
SELECT received_at AS expr1
FROM TTable
WHERE DATEPART(WEEK,received_at)>10 ;
David Portas
SQL Server MVP
--|||
It seems that no conversion is made and no explicit conversion could be
applied.
for the sequence:
SELECT received_at AS expr1
FROM TTable
WHERE DATEPART(WEEK,received_at)>10
the outcome is:
Driver]Expected lexical element not found: )
*** Sent via Developersdex http://www.examnotes.net ***|||Lucian,
If the adDBtimeStamp values are seen as strings of the
form 'yyyymmddhhmmss', try this:
declare @.t table (
adDBtimeStamp char(14)
)
insert into @.t values ('20051012171534')
select
convert(datetime,
substring(adDBtimeStamp,1,8) + space(1) +
substring(adDBtimeStamp,9,2) + ':' +
substring(adDBtimeStamp,11,2) + ':' +
substring(adDBtimeStamp,12,2),
112) as SQLdt
from @.t
Steve Kass
Drew University
Lucian Baltes wrote:

>Hello,
>I use a SQL Server with ODBC driver and >NET C#.
>I want to convert a date field with adDBtimeStamp format to a DATETIME
>format, but no solution could be found till now.
>My query is as follows:
>SELECT received_at as EXPR1
>FROM TTable
>WHERE datepart(w(datetime(received_at)))>10
>Has anybody any solution for conversion?
>
>
>*** Sent via Developersdex http://www.examnotes.net ***
>

Sunday, March 25, 2012

Conversion of Oracle Version 0-1 from DEC Machine

Hi... Have a customer who's running version 1 of oracle on a DEC
machine.. is there a driver out there for that stuff? How might one
get the data from the DEC machine to Sql Server 2000?? All I have
now are fdl/sfl files.

thanks in advance.

SteveSteve Walker wrote:
> Hi... Have a customer who's running version 1 of oracle on a DEC
> machine.. is there a driver out there for that stuff? How might one
> get the data from the DEC machine to Sql Server 2000?? All I have
> now are fdl/sfl files.
> thanks in advance.
> Steve

It is extremely unlikely that your customer has version 1 of Oracle
considering Oracle customer list at that point. Find out what they
really have and how they determined it.

--
Daniel A. Morgan
University of Washington
damorgan@.x.washington.edu
(replace 'x' with 'u' to respond)|||Hi

If there is an ODBC driver you may be able to connect.

John
"Steve Walker" <swalker@.ainet.com> wrote in message
news:bde87b71.0410221056.b2368dc@.posting.google.co m...
> Hi... Have a customer who's running version 1 of oracle on a DEC
> machine.. is there a driver out there for that stuff? How might one
> get the data from the DEC machine to Sql Server 2000?? All I have
> now are fdl/sfl files.
> thanks in advance.
> Stevesqlsql