• SET NOCOUNT ON

    DECLARE @crdate DATETIME,

    @days INT ,

    @hr INT ,

    @min-2 INT

    SELECT @crdate=crdate FROM sysdatabases WHERE NAME='tempdb'

    SET @min-2 = DATEDIFF (mi,@crdate,GETDATE())

    PRINT @min-2

    gives me: 144069

    ---------------------------------

    SET NOCOUNT ON

    DECLARE @crdate DATETIME,

    @days varchar(3),

    @hr VARCHAR(50),

    @min-2 VARCHAR(5)

    SELECT @crdate=crdate FROM sysdatabases WHERE NAME='tempdb'

    SET @min-2 = DATEDIFF (mi,@crdate,GETDATE())

    PRINT @min-2

    gives me: *

    and then i got this when running the entire script with the varchars--

    Msg 245, Level 16, State 1, Line 10

    Conversion failed when converting the varchar value '*' to data type int.

    not sure whats going on there??

    bc

    [font="Arial Narrow"]bc[/font]