Exforsys
+ Reply to Thread
Results 1 to 4 of 4

Problem with queries with DATETIME

This is a discussion on Problem with queries with DATETIME within the SQL Server forums, part of the Database category; Hi, i have a question related to DateTime date type. 1. how can i retrieve rows related to particular date. ...

  1. #1
    NareshShroff is offline Junior Member Array
    Join Date
    Apr 2004
    Answers
    18

    Problem with queries with DATETIME

    Hi,
    i have a question related to DateTime date type.
    1. how can i retrieve rows related to particular date.
    i tried using the following statement but im getting syntax error.
    Create procedure opentasks
    {
    @activedate as datetime
    }
    AS
    Select Count(*) from tasks where activedate = @activedate
    GO
    what is wrong in above procedure?
    can anyone help me out
    Thanks in advance


  2. #2
    sanereddy is offline Member Array
    Join Date
    Nov 2004
    Answers
    85

    Re:Problem with queries with DATETIME

    what is the data type for activedate


  3. #3
    NareshShroff is offline Junior Member Array
    Join Date
    Apr 2004
    Answers
    18

    Re:Problem with queries with DATETIME

    datetime


  4. #4
    sanereddy is offline Member Array
    Join Date
    Nov 2004
    Answers
    85

    Re:Problem with queries with DATETIME

    try this ....

    Create procedure opentasks
    @activedate as datetime
    AS
    Select Count(*) from tasks where activedate = @activedate
    GO


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...