Forum Replies Created

Viewing 15 posts - 1 through 15 (of 31 total)

  • RE: Problem with CAST

    Try this one

    SUM(CASE CAST(IA.IAT_DATA AS VARCHAR(25)) WHEN 'Financial Reporting' THEN 1 AS ELSE 0 END) AS [Financial Reporting],

    SUM(CASE CAST(IA.IAT_DATA AS VARCHAR(25)) WHEN 'Performance Management' THEN 1 ELSE 0 END)...


    Rohit

  • RE: read data from fields between 2 dates?

    try this one

    SET @CMD = 'SELECT [' + @ColName + '] from [Resource]' + ' where [date] between ''' + @sDate1 + ''' + and + ''' @sDate2 + ''''

    exec...


    Rohit

  • RE: "cursor does not exist" error in trigger

    Your First Problem is that you did the spelling mistake in deallocating the cursor curInsterted instead of curInserted.

    To debug your trigger ,first install the SQL server debugger and then...


    Rohit

  • RE: whats wrong with this stored procedure

    This Error is Not Coming because of the parameter you are passing but the Prcessing you are doing in your procedure do one thing take the query from web page...


    Rohit

  • RE: Cursor or String

    Thanks Calvin and David for your responses

    As Calvin you told that there is one method of fetching all the rows from one table

    Now i just want to know that...


    Rohit

  • RE: IF @@ERROR is not trapping all errors

    i have also faced this problem

    Statements given below should trap the error but will not

    i have gone through bol where there is written about severity of error but not...


    Rohit

  • RE: Using the Table data type in a stored procedure.

    use this connection string then try agin fetching the records in record set

    "driver={SQL Server};server=;database=;uid=;pwd="


    Rohit

  • RE: Transact-SQL Debugger

    thank god you have dicussed this problem . i got the solution


    Rohit

  • RE: What is the Best Way for Comparing Datetime value in SQLSERVER 2000?

     

    Create Function sf_Monthlyconsumption(@DD Varchar(2),@MM Varchar(2),@YY Varchar(4))

    Returns Table

    As

    --change sysobjects with your table

     Return Select * From Sysobjects Where Cast(Cast(month(CrDate) as varchar(2)) +'/'+Cast(Day(CrDate) as varchar(2))+'/'+Cast(Year(CrDate) as varchar(4)) as DateTime) > Cast(@MM+'/'+@DD+'/'+@YY As...


    Rohit

  • RE: Can an UDF be used in a join

    Yes you are right !!!


    Rohit

  • RE: Set Command in UDF

    that means you can not use Set Commnads in UDF so any can make me available limitations od UDF cause i use them exetensively


    Rohit

  • RE: DateTime to Character

    Select * From Table1

    Join Table2

    On

    Table1.DateField=Cast(Table2.CharDateField +' '+Table2.CharTimeField as DateTime)


    Rohit

  • RE: Query date and time data

    Create Function DateOnly(@dt DateTime)

    returns Datetime

    as

    begin

    return Cast(convert(varchar(8),@dt,1) AS datetime)

    end

    select * from test where dbo.Dateonly(chkdate) = '2004-01-06'

    This way...


    Rohit

  • RE: Can Procedure return datatype TABLE?

    UDF can not contain strored procedures calls and also you can not use set command in UDF so if any output required is in table with these requirements in...


    Rohit

Viewing 15 posts - 1 through 15 (of 31 total)