Looking for equivalent MS SQL for MySQL ...... Command

Looking for equivalent MS SQL for MySQL ...... Command

Post by The WABBI » Wed, 18 Dec 2002 00:19:01



I am looking for a mssql equivalent to the following mysql

Execute("INSERT INTO $dbtables[scheduler] VALUES('', 'Y', 0,
$sched_turns, 0, 'sched_turns.php', '',unix_timestamp(now()))");

The problem is that I am unable to locate an equivalent to the
unix_timestamp(now())

Can anyone help me?

 
 
 

Looking for equivalent MS SQL for MySQL ...... Command

Post by Aaron Bertrand [MVP » Wed, 18 Dec 2002 00:27:06


If unix_timestamp is just the number of seconds since 1/1/70, then:

 ... DATEDIFF(SECOND, '19700101', GETDATE()) ...

--
Aaron Bertrand, MVP
http://www.aspfaq.com/

FREE server diagnostics component:
http://www.perfhound.com/


Quote:> I am looking for a mssql equivalent to the following mysql

> Execute("INSERT INTO $dbtables[scheduler] VALUES('', 'Y', 0,
> $sched_turns, 0, 'sched_turns.php', '',unix_timestamp(now()))");

> The problem is that I am unable to locate an equivalent to the
> unix_timestamp(now())

> Can anyone help me?


 
 
 

Looking for equivalent MS SQL for MySQL ...... Command

Post by sauro » Wed, 18 Dec 2002 00:24:32


It help you, may be:

CURRENT_TIMESTAMP

-sauron



Quote:> I am looking for a mssql equivalent to the following mysql

> Execute("INSERT INTO $dbtables[scheduler] VALUES('', 'Y', 0,
> $sched_turns, 0, 'sched_turns.php', '',unix_timestamp(now()))");

> The problem is that I am unable to locate an equivalent to the
> unix_timestamp(now())

> Can anyone help me?

 
 
 

1. Need equivalent MS SQL command for MySQL's "limit" command URGENT!!

I am building a website that displays next and previous buttons for a set
amount of records displayed at a time.  MySQL uses a "limit" clause to allow
an offset start point in a result set and a length of records in the set to
display.  Does MS SQL (7.0) have an equivalent command?  Thanks for your
help.

2. SQL Replication to CE from IIS / SQL Errors

3. looking for information about mySQL to talk with MS Access

4. ADO and ADOX together

5. MS SQL Server vs. Mysql using MS Access

6. Allowing a date field to be null value

7. SQL Server equivalent to Access Look-Up

8. Best Way to Run Repeated Parametized Queries in ADO

9. Oracle select command equivalent in Sql server help

10. T-SQL Command Equivalent for Format

11. Equivalent commands in SQL ???

12. SQL Server equivalent commands to ORACLE

13. PL/SQL equivalent of ACCEPT command?