Friday, March 30, 2012
One minute SQL Server 7 date time synchronization
How to force SQL Server 7 synchronize its date&time from the system ?
It looks like it is polling once a minute.
Thanks,
Ivan
That's the way that SQL Server work. In SQL2K, SQL Server doesn't keep it's own counter anymore (AFAIK).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Ivan Rubin" <ivan.rubin@.gmx.net> wrote in message news:1bc4e8d1.0405040706.30ff025b@.posting.google.c om...
> Hello,
> How to force SQL Server 7 synchronize its date&time from the system ?
> It looks like it is polling once a minute.
> Thanks,
> Ivan
|||There is no way for triggering a synchronization event in the SQL
Server 7?
In our system, after receiving date & time data from the host and
setting it on the NT box through SetLocalTime Win32API, some stored
procedures are triggered for calculating expiration dates upon the
current (SQL Server) date & time.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message news:<OZKZpqfMEHA.3012@.tk2msftngp13.phx.gbl>...[vbcol=seagreen]
> That's the way that SQL Server work. In SQL2K, SQL Server doesn't keep it's own counter anymore (AFAIK).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Ivan Rubin" <ivan.rubin@.gmx.net> wrote in message news:1bc4e8d1.0405040706.30ff025b@.posting.google.c om...
|||> There is no way for triggering a synchronization event in the SQL
> Server 7?
Not AFAIK...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Ivan Rubin" <ivan.rubin@.gmx.net> wrote in message news:1bc4e8d1.0405041325.2cea1da3@.posting.google.c om...
> There is no way for triggering a synchronization event in the SQL
> Server 7?
> In our system, after receiving date & time data from the host and
> setting it on the NT box through SetLocalTime Win32API, some stored
> procedures are triggered for calculating expiration dates upon the
> current (SQL Server) date & time.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
news:<OZKZpqfMEHA.3012@.tk2msftngp13.phx.gbl>...[vbcol=seagreen]
One minute SQL Server 7 date time synchronization
How to force SQL Server 7 synchronize its date&time from the system ?
It looks like it is polling once a minute.
Thanks,
IvanThat's the way that SQL Server work. In SQL2K, SQL Server doesn't keep it's
own counter anymore (AFAIK).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Ivan Rubin" <ivan.rubin@.gmx.net> wrote in message news:1bc4e8d1.0405040706.30ff025b@.posting
.google.com...
> Hello,
> How to force SQL Server 7 synchronize its date&time from the system ?
> It looks like it is polling once a minute.
> Thanks,
> Ivan|||There is no way for triggering a synchronization event in the SQL
Server 7?
In our system, after receiving date & time data from the host and
setting it on the NT box through SetLocalTime Win32API, some stored
procedures are triggered for calculating expiration dates upon the
current (SQL Server) date & time.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message news:<OZ
KZpqfMEHA.3012@.tk2msftngp13.phx.gbl>...[vbcol=seagreen]
> That's the way that SQL Server work. In SQL2K, SQL Server doesn't keep it'
s own counter anymore (AFAIK).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Ivan Rubin" <ivan.rubin@.gmx.net> wrote in message news:1bc4e8d1.040504070
6.30ff025b@.posting.google.com...|||> There is no way for triggering a synchronization event in the SQL
> Server 7?
Not AFAIK...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Ivan Rubin" <ivan.rubin@.gmx.net> wrote in message news:1bc4e8d1.0405041325.2cea1da3@.posting
.google.com...
> There is no way for triggering a synchronization event in the SQL
> Server 7?
> In our system, after receiving date & time data from the host and
> setting it on the NT box through SetLocalTime Win32API, some stored
> procedures are triggered for calculating expiration dates upon the
> current (SQL Server) date & time.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in messag
e
news:<OZKZpqfMEHA.3012@.tk2msftngp13.phx.gbl>...[vbcol=seagreen]sql
One minute SQL Server 7 date time synchronization
How to force SQL Server 7 synchronize its date&time from the system ?
It looks like it is polling once a minute.
Thanks,
IvanThat's the way that SQL Server work. In SQL2K, SQL Server doesn't keep it's own counter anymore (AFAIK).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Ivan Rubin" <ivan.rubin@.gmx.net> wrote in message news:1bc4e8d1.0405040706.30ff025b@.posting.google.com...
> Hello,
> How to force SQL Server 7 synchronize its date&time from the system ?
> It looks like it is polling once a minute.
> Thanks,
> Ivan|||There is no way for triggering a synchronization event in the SQL
Server 7?
In our system, after receiving date & time data from the host and
setting it on the NT box through SetLocalTime Win32API, some stored
procedures are triggered for calculating expiration dates upon the
current (SQL Server) date & time.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message news:<OZKZpqfMEHA.3012@.tk2msftngp13.phx.gbl>...
> That's the way that SQL Server work. In SQL2K, SQL Server doesn't keep it's own counter anymore (AFAIK).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Ivan Rubin" <ivan.rubin@.gmx.net> wrote in message news:1bc4e8d1.0405040706.30ff025b@.posting.google.com...
> > Hello,
> >
> > How to force SQL Server 7 synchronize its date&time from the system ?
> > It looks like it is polling once a minute.
> >
> > Thanks,
> > Ivan|||> There is no way for triggering a synchronization event in the SQL
> Server 7?
Not AFAIK...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Ivan Rubin" <ivan.rubin@.gmx.net> wrote in message news:1bc4e8d1.0405041325.2cea1da3@.posting.google.com...
> There is no way for triggering a synchronization event in the SQL
> Server 7?
> In our system, after receiving date & time data from the host and
> setting it on the NT box through SetLocalTime Win32API, some stored
> procedures are triggered for calculating expiration dates upon the
> current (SQL Server) date & time.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
news:<OZKZpqfMEHA.3012@.tk2msftngp13.phx.gbl>...
> > That's the way that SQL Server work. In SQL2K, SQL Server doesn't keep it's own counter anymore (AFAIK).
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> >
> >
> > "Ivan Rubin" <ivan.rubin@.gmx.net> wrote in message news:1bc4e8d1.0405040706.30ff025b@.posting.google.com...
> > > Hello,
> > >
> > > How to force SQL Server 7 synchronize its date&time from the system ?
> > > It looks like it is polling once a minute.
> > >
> > > Thanks,
> > > Ivan
One kind of transformation
original data type is string ,format like MM/dd/YYYY,also there exists null or "" value
I need to convert them into datetime,format like YYYY--MM-dd
any idea about this?
thanks in advance
Using a derived column and some simple string manipulation you could cut the string by the /'s and build it the way you want.|||however, converting to datestamp failed
|||SSIS is rather rigid in it's conversion from string to DT.See http://sqljunkies.com/WebLog/knight_reign/archive/2005/07/14/16073.aspx for examples on strings that will work.|||
yes, it's not difficult to convert from string to DT
but i still could not figure out how to determine if the current value is null or not
just like that,
[value]!=""?(DT_Date)(): ....
how to define the otherwise portion? or other better method?
thanks
|||Use the isnull() function.|||yes, i used
(trim([value])!=""&&isnul[value]==false)?(DT_Date)[value]: ....
but, how to deal with null or "" to convert to DT?
thanks
|||Are you asking us what datetime value you should pass out if the incoming value is null? How do we know - that depends on your business rules.
I guess I'm misunderstanding.
-jamie
|||Sorry for my explains not clear
I want to know how to let it work if value is null
many thanks
|||(TRIM([value]) != "" && ISNULL([value]) == FALSE ) ? (DT_DBDATE)(SUBSTRING([value],FINDSTRING([value],"/",2) + 1,4) + "-" + SUBSTRING([value],1,2) + "-" + SUBSTRING([value],FINDSTRING([value],"/",1) + 1,2)) : NULL(DT_DBDATE)
this can work now, thanks
sql