Results 1 to 3 of 3

Thread: stored proc in sql server to compare a given date with datetime field in a table.

  1. #1
    Join Date
    Jul 2006
    Posts
    2

    stored proc in sql server to compare a given date with datetime field in a table.

    how to compare a datetime field called date1 with date part alone.
    i want to compare the date part of the column with date input to select the matching record.
    show me the query. I want this as a stored procedure in sql server 2000 to access in my prg.

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    select * from table1 where convert(varchar(8), columnname, 112) = convert(varchar(8), @datevariable, 112)

  3. #3
    Join Date
    Jul 2006
    Posts
    2

    stored proc in sql server to compare a given date with datetime field in a table

    thanks.

    i want to use this stored procedure in crystal report.
    how to create a dataset.xsd in .net to link to crystal report in .net.
    i am using 2 tables in sp.
    how to create crystal report and link to sp ?.

Posting Permissions

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