Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2005
    Posts
    25

    Unanswered: Translation help please

    Hi

    Can anyone help me translate this mysql-statement to mssql??

    SELECT nickname FROM cb_chat_users WHERE activetime < DATE_ADD(now(), INTERVAL -" & cLng("0" & UserDrop) & " SECOND) AND active = 1"


    thanks in advance

  2. #2
    Join Date
    Jun 2003
    Posts
    269
    --check Sql server Books online for dateadd()
    Code:
    SELECT 
     nickname 
    FROM 
     cb_chat_users 
    WHERE 
     activetime < DATEADD(ss,@UserDrop,getdate()) -- @UserDrop is the variable here
     AND active = 1
    Last edited by mallier; 02-01-06 at 09:13.
    I love cursor,though I never use it.Cos' I dont want to misuse it.
    ----------------------------------------------

    ----cheers
    ----http://mallier.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •