SQL Server 2012 :: UNIX Timestamp In Second

Oct 27, 2014

I've got a question about the UNIX timestamp solutions, I am using this one:

select convert(datetime, switchoffset(convert(datetimeoffset, dateadd(second, start_date, '19700101')), datename(TzOffset, sysdatetimeoffset())))
from x

This works great for today (wintertime), but when I query the past, say last week, it will still hold the current offset of my server GMT+1, where it was GMT+2.

Is there a way to get always the right date/time from a sql-query?

View 0 Replies


ADVERTISEMENT

Inserting Non-unix Timestamp

Sep 6, 2013

Is it possible to insert a timestamp into a db if it's in this format?

Sep-04-13 07:13

I don't need it to stay in this format. I just need to know if I can cast it as a unix timestamp somehow & insert or if the manipulation to the datetime fomrat has to happen before inserting.

View 3 Replies View Related

Convert Unix Timestamp To UTC

Sep 12, 2007



Hi

Is there a way in T-SQL (Server 2005) to convert unix timestamp to UTC

So want to do this:
1189481763.61 -> Tue, 11 Sep 2007 03:36:03 UTC(or any UTC format)


Thanks

View 3 Replies View Related

Unix Timestamp To DATETIME Datatype

Jan 16, 2004

Hi all,

I have moved a mysql table to SQL Server and the table had an int datatype storing the value of the Unix timestamp. I want to convert this datatype into a DATETIME type in SQL Server.

Any ideas how I could do it?

Thanks in advance.

View 8 Replies View Related

SQL 2012 :: How To Download Data From Server In UNIX

Dec 6, 2014

I know that SQL Server runs on Windows Server, is it possible to download data in UNIX using shell script? does SQL Server has any binary or command line client for any operating system other than Windows?

View 5 Replies View Related

SQL Server 2012 :: Increment Day To Timestamp When Time Is After 00:00

Jun 29, 2015

I have a series of time from 08:10 till 00:55 and a single date in a seperate column. What I need to have is associate the date with each time from 08:10 and when it comes after 23:55 the date needs to be incremented to the next day.

something like below

29Jun2015 08:10
29Jun2015 08:15
29Jun2015 08:20
29Jun2015 08:25
29Jun2015 08:30
29Jun2015 08:35
29Jun2015 08:40
.....
.....
....
....
29Jun2015 23:55
30Jun2015 00:00
30Jun2015 00:05
30Jun2015 00:10
30Jun2015 00:15
30Jun2015 00:20

I tried to add the based on the datepart minute however its getting added only to 00:00 and not after that.

View 9 Replies View Related

Unix, Windows For Unix, And Direct Read Of .mdf File This Is A True Story

Sep 13, 2007

First, let me start by saying I know the answer to this, but due to politics any answer I give will be viewed with some disdain and disbelief.

A Unix/Network [rtdpmin one our sister agencies is trying to solve a problem that really does not need to be solved, but ....

The sister agency uses Information Builder's WebFocus on Unix. When they try to read my data warehouse in SQL Server 2000 it times out on them (on their end and they claim they cannot fix it) (This is using the supplied WebFocus ODBC/JDBC driver for SQL Server). This has lead to accusations of us not letting them read the data.

After much gnashing of teeth over "if you do data and data analysis for a living, why do I have to show you how to set-up an ODBC connection" we have shown them how to connect to the data, read it, and transfer it using MS-ACCESS, EXCEL, and more importantly SPSS. This is not good enough because they cannot figure out how to put it into WebFocus.

Their network person has come-up with the brilliant idea of reading the .mdf directly by installing Windows for Unix on the Unix side and then just pointing to the .mdf file and "reading it ".

Unless I have missed something somwhere (I will admit possible), I know you need a driver to read MS-SQL and that driver in every example I have seen could care less about the physical location of the .mdf file. It wants to know what database, what server (ip or name) and what security/login to use.

Could someone give me a more "technical answer" or even Microsoft's party line so I do not have this person mucking around with my production server trying to acomplish the impossible.

View 5 Replies View Related

Error While Converting Oracle Timestamp To Sql Server Timestamp (datetime) - Invalid Date Format

Jun 19, 2007

I am populating oracle source in Sql Server Destination. after few rows it fails it displays this error:

[OLE DB Destination [16]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005 Description:
"Invalid date format".



I used this script component using the following code in between the adapters, However after 9,500 rows it failed again giving the same above error:








To convert Oracle timestamp to Sql Server timestamp

If Row.CALCULATEDETADATECUST_IsNull = False Then

If IsDate(DateSerial(Row.CALCULATEDETADATECUST.Year, Row.CALCULATEDETADATECUST.Month, Row.CALCULATEDETADATECUST.Day)) Then

dt = Row.CALCULATEDETADATECUST

Row.CALCULATEDETADATECUSTD = dt

End If

End If



I don't know if my code is right . Please inform, how i can achieve this.

View 6 Replies View Related

SQL 2012 :: NCI On Row Version / Timestamp Column

Mar 18, 2014

I have a question regarding the rowversion / timestamp column. I want to use it to track changes in some tables and I created a non clustered index on the timestamp column (with three includes) to get a better performance while searching / gathering the data. It works very well, but I experienced a big performance hit on the inserts and my first thoughts are that it has something to do with this index.

I know that this NCI has to be updated with every insert and so this could have an impact on performance, but we have a lot of other indexes as well, which are also get updated with every insert. Why this index / column has such a big impact? Our application use a lot of dynamic cursors, maybe it has something to do with that?

View 4 Replies View Related

SQL 2012 :: Datatype - Timestamp Field In ERP

Jul 14, 2014

What sql data type would fit these value? This is timestamp field in the ERP.

2013-05-24-20.03.46.843480

View 3 Replies View Related

SQL 2012 :: How To Get Name And Timestamp Of File From A Directory

Mar 18, 2015

I want to write a stored procedure or a simple T-SQL snippet that takes a parameter "Directory Path" and gives me the name and datetimestamp associated with each of the files within that directory. I can not use xp_cmdshell since it is not allowed. CLR integration is not enabled on the server either.

Is there any other way at all to achieve this directly from SQL Server using T-SQL?

View 3 Replies View Related

C++/Unix/SQL Server

Jun 20, 2001

I am very new to this board and I am not sure whether the following question belongs to this board. I will ask it anyway.

Can someone tell me where (book or web site or an example) I can go to learn how to be able to connect to a SQL Server database in a unix (in my case Solaris) environment using C/C++. I have been doing database programming using Oracle, Acess on NT with C/C++/ODBC comfortabley. I just need to learn how to go about in a Unix environment.

Wango

View 1 Replies View Related

SQL Server (not 6.5) On Unix?

Apr 23, 2008

Are there any tools for installing SQL Server on a unix machine? (It seems to me like 6.5 might have been the last version that worked on unix?)

View 4 Replies View Related

Transact SQL :: Query To Display Avg Values For Each Timestamp And Count Of Timestamp

Jun 23, 2015

date        time         s-sitename TimeTaken(Seconds)
6/8/2015 10:56:26 TestSite 100
6/8/2015 10:56:26 TestSite 500
6/8/2015 10:56:26 TestSite 800
6/9/2015 11:56:26 TestSite 700
6/9/2015 11:56:26 TestSite 200
6/12/2015 12:56:26 TestSite 700

I have a table with above values, I am looking for a sql query to find AvgTimeTaken at different time stamps and total count of each time stamp

Output
date        time         s-sitename TimeTaken(Seconds) Count_of_Request
6/8/2015 10:56:26 TestSite 1400                  3
6/9/2015 11:56:26 TestSite 900                   2
6/12/2015 12:56:26 TestSite 700                   1

View 5 Replies View Related

Connecting To SQL Server From Unix

Feb 24, 2004

Has anyone tried to connect to a SQL Server 2K running on Windows 2000 from a unix machine? If so then could you provide me some help?
Thanks in advance

View 2 Replies View Related

Accessing SQL-Server From UNIX

Apr 11, 2008



I have UNIX application, running on AIX, SUN and HP, (RISC & Itanium).
This application working with Oracle, via OCI, and OCCI, (I can use ODBC as well).

I would like replace Oracle with SQL-Sever.

Does there is a way/driver to access MS-SQL Server from Unix?

View 5 Replies View Related

How Can I Access SQL Server From SCO Unix?

Jan 11, 2007

We are running SCO Unix 5.0.5. We need a command line sql client that can connect to a MS SQL server running on a windows server. Can someone point me in the right direction? I don't want to write a sql client. I just want a command line sql client binary that is ready to work.

I want to do something like this in a unix shell script:

# sql -s 10.1.2.3 -u username -p password -f sqlcommandsinafile.txt -o sqlresults.txt

Any help would be appreciated....

View 1 Replies View Related

Accessing SQL-Server From UNIX

Apr 12, 2008



Hi,

My program is running on UNIX, (SUN, AIX and HP), and work with Oracle.
I would like to use SQL-Server instead of Oracle, but the program must run on UNIX.

Is there is a way/driver to work with SQL-Server from UNIX?

*new in SQL-Server area...

Thanks

View 5 Replies View Related

Accessing Sql Server Data From Unix

Apr 5, 2001

Hello !

I am owrking in java developmenton solaris using weblogic6.0
Does any body know how to access sql server data from solaris.
If some body knows that, can you please post me the steps
that i need to do it.

Thanks
Veena

View 3 Replies View Related

Read UNIX File From SQL Server

Feb 6, 2004

Is it possibel to run a DTS job to read a file from unix server?

View 4 Replies View Related

Accessing SQL Server 2000 Via UNIX

Jul 20, 2005

Hi,I am having a problem accessing SQL Server 2000 via UNIX. I amaccessing SQL Server 2000 from Solaris using Sybase Open Client(CT-Lib). Here is the error message:CT-LIBRARY error:ct_connect(): network packet layer: internal net libraryerror: Net-Library operation terminated due to disconnectI have another SQL server 6.5 and I do not have any problems accessing6.5 using the same strategy. Can someone tell me how I shouldconfigure to access SQL Server 2000 from UNIX?Thanks,Amy

View 1 Replies View Related

MS SQL Server Client Under Linux/unix.

Jul 20, 2005

Hi, everyone!I was just wondering if any of you knows of a linux/unix client(preferably on the command line) that would connect to ms sql server?Any hints would be appreciated!Roumen.

View 1 Replies View Related

NFS Between Unix And Windows Server 2003 R2

Jan 18, 2008

I have a windows server 2003 R2 sharing a filesystem using NFS. I have created a group and passwd file and mapped the ids' to the unix login ids' . I', able to mount but when I try to cd to the directory I get "NFS access failed for server testsrvr: RPC: Authentication error". On the win2k3 server I'm getting an event error "There was a mapping failure". I have the Admin id on the win2k3 server mapped to the unix root login .

View 1 Replies View Related

Oracle/Unix Environments --&&> SQL Server 2005/Windows 2003 Server

May 8, 2007

I was a Oracle Developer / DBA on Unix Environments all along my career, Very recently iam starting to manage a SQL Server 2005/Windows 2003 Server setup.

Part of my new job is to automate to load Huge Data files/Flat Files (3/4 GB in size) into SQL Server 2005 DB.

Have these initial questions..
Since the files are too large to open at once... What sort of Command Line Interfaces people use on the Windows Boxes.. like doing a "wc" (Word Count) / GREP 'ng Files / Massaging Data Files one line at a time (Like using SED / AWK Commands).. Etc

Any Input / Direction is appreciated...

View 4 Replies View Related

How To Replicate From ODBC-Unix(Progress) To SQL Server

Oct 12, 2001

Hello,

How can I assign the ODBC Database(Progress) on UNIX as publisher and SQL Server as subscriber. When I use the Enterprise Manager, I cannot see the Unix Server. I just can see the server and database in DTS.

Would you please explain the steps?

Alice

View 2 Replies View Related

Connection Between SCO UNIX And Microsoft SQL Server 7.0 Using BCP(sisql)

Jun 8, 1999

Hello,
I am trying to connect to a Microsoft SQL Server 7.0 from a SCO box (version 3.2v4.2)using sisql/bcp (sybase product). I can connect to a 6.5 database but when I try the same script to connect to 7.0 I get the following message: DB-LIBRARY error:
Unable to connect: SQL Server is unavailable or does not exist.
Is there anything I can do in order to fix this problem? Any ideas?
Thanks

View 1 Replies View Related

Site In MYSQL Server But Autoresponder In UNIX

Apr 14, 2008

HI...I wonder if anybody could assist my problem. I am very new to online. I have bought a DIY portal and hosting. It is on SQL server.

I wanted to do a lead capture page and put an Autoresponder to it. I bought AD 2019 and Porfit Sponder, but it's requirement is UNIX operating system.

1. Can I link the AR(needs UNIX) to my site on SQL ?
2. Does it need a device to translate any data ?

Regards,

Lena

Money is in the lists...where did my money go?
http://simurl.com/more-E-GOLD
http://simurl.com/Top3Percent

View 4 Replies View Related

URGENT: UNIX DATE FORMAT CONVERION TO SQL SERVER

May 9, 2001

I HAVE ONE COLUMN CONTAING THE INTEGER TYPE DATA COMING in UNIX DATE FORMAT. NEED TO CONVERT IT TO THE SQL SERVER DATE TIME FORMAT.

NOTE: UNIX IS STORING THE DATE IN SECONDS STARTING FROM 1970/1/1

ANYBODY CAN HELP ME TO SOLVE THIS PROBLEM.

e.g. The UNIX date time is 973101026 need to be converted to SQL DATE TIME

View 2 Replies View Related

Girl In Need! Anyone Do This: Unix Client -&> ODBC -&> MSSQL Server

Jul 28, 2004

Anyone support a config where you have an unix/linux (AIX here) ODBC client connection to SQL Server database? I am looking for a simple, supportable configuration that does not require me to learn perl or instal a bunch of crap gnu shareware on enterprise class machines.

Please help!

View 2 Replies View Related

Access SQL Server 2005 From C++ Programs In UNIX/LINUX

May 17, 2007

Hi,



Is there as way to access SQL SErver DB for DML Operations from C++ programs in UNIX/LINUX. The current approach is by uisng Pro C to connect to ORACLE from C++. But I want to connect to SQL Server 2005.



Regards,

Kart

View 3 Replies View Related

Is It Possible To Use A Simple ODBC Config On A Unix Client To Connect To MS-SQL Server?

Jul 20, 2005

Anyone support a config where you have an unix/linux (AIX here) ODBCclient connection to SQL Server database? I am looking for a simple,supportable configuration that does not require me to learn perl orinstal a bunch of crap gnu shareware on enterprise class machines.Please help!

View 3 Replies View Related

SQLServer 2005 JDBC Driver - Date Rendered Correctly On Local Environment(windows), But Not On Websphere Server (unix)

Dec 6, 2006

Hi,

We are trying to move our application from SQL2005 to SQL2005, we are using 2005 jdbc driver 1.1.

The problem we have is, when a date is retrieved from the database, only the year part got correctly, but the date is automatically set to January 1 of that year. The interesting thing is this problem doesn't occur on local development environment (developer's windows platform), it only happens when we deploy the application to production server (unix).

Does anyone know what is going on, how to fix it?

Thanks.

Cathie

View 12 Replies View Related

Using Timestamp With ASP.net / SQL Server

Sep 10, 2004

I have a database that I don't want to lock. I decided that before any updates can occur I would check a timestamp value and ensure that nobody else updated before I did (avoiding the 'last update wins' scenario).

I have a problem, I can read the Timestamp from the db when I read the record. I currently use the data to pre-fill a form (gee go figure ;) ) and the user changes some values and updates.

I don't know what to DO with the timestamp value while I am holding it. I have tried putting it into a hidden field on the form but the value does not seem to translate back and forth.

Do I have to store it as in memory as part of the session or can I somehow convert to and from text??

I have about 0 experience working with byte arrays so the best answer is one with an example.

Thanks.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved