| Author |
Topic |
|
rwaldron
Posting Yak Master
131 Posts |
Posted - 2008-10-28 : 11:49:25
|
| Hi all ,I have a linked server from SQL to sybase.I can see and query all the views on sybase db from within Visual studio..I am trying to query based on todays date.Every view in sybase has a column called timestamp of datatype smalldatetime.When I look at the data in this column all rows say Timestamp and don't display any form of date or time.I therefore cannot qury this table based on getdate()Does anyine know how I use this Timestamp column for my queries ?Ray.. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-28 : 11:51:42
|
| What values does it contain? Hex codes? |
 |
|
|
rwaldron
Posting Yak Master
131 Posts |
Posted - 2008-10-28 : 11:56:47
|
| Hiya,The value in this column also says "Timestamp"Properties of the column from within visual studio says OdbcType.DateTime.This is what I find hard to understand.The column doesn't display anything that looks like a date or time .It just contains the word Timestamp ? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-28 : 12:00:08
|
| not sure about that. But we have a timestamp datatype in sql server which stored binary values. see thishttp://doc.ddart.net/mssql/sql70/ta-tz_5.htm |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-10-28 : 12:01:17
|
SELECT * FROM LinkedServerWHERE DATEDIFF(DAY, sourceCol, GETDATE()) = 0 E 12°55'05.63"N 56°04'39.26" |
 |
|
|
rwaldron
Posting Yak Master
131 Posts |
Posted - 2008-10-28 : 12:07:38
|
| Hiya, I triedSELECT "Timestamp", CDN, CDNName, CallsAbandoned, CallsAnswered, CallsOffered, CallsTerminated, "Time", SiteID, SiteFROM dbo.dCDNStatWHERE DATEDIFF("DAY", TIMESTAMP, GETDATE()) = 0I got the error "The provider has thrown an exception with no information "Any more help ? |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-10-28 : 12:09:52
|
Maybe you should ask over at dbforums.com? E 12°55'05.63"N 56°04'39.26" |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-28 : 12:10:35
|
| dont put "" around column names. use Timestamp,Time instead of "Timestamp","Time" |
 |
|
|
rwaldron
Posting Yak Master
131 Posts |
Posted - 2008-10-28 : 14:14:07
|
| Hiya all,SQL is adding the " " around timestamp and time columns.I have installed crysatl reports and this links ok to sybase DB showing dates in the Timestamp column.Is this an issue with SQL because timestamp is a reserved word and the column name in Sybase is timestamp ?How do I work around this ? |
 |
|
|
|