Forum Replies Created

Viewing 15 posts - 376 through 390 (of 455 total)

  • RE: Grouping Question

    USE CREATE PROCEDURE INSTEAD OF ALTER

    THANKS

    Prasad Bhogadi
    www.inforaise.com

  • RE: Grouping Question

    Hi this is not a very clean or optimized solution but should solve your problem from the requirement point of you, This is not an advised methodology to implement as...

    Prasad Bhogadi
    www.inforaise.com

  • RE: DELETE Trigger

    Well you can insert the deleted data from the deleted table to the desired table, well I didnot exactly get your question though, However you may want to refer to...

    Prasad Bhogadi
    www.inforaise.com

  • RE: Dynamically selecting column

    Well, It is a very valid point that it is better to use dynamic SQL to bare minimum or if possible not to use at all but like in inevitable...

    Prasad Bhogadi
    www.inforaise.com

  • RE: Stored Procedure issue

    This gets compiled, this is exactly what David Posted but I just removed the THEN KEYWORD which was duplicated.

    CREATE PROCEDURE MTDPerformance3

    AS

    SELECT department,

      [Date],

      SUM(CASE [Product] WHEN 'E-Tech' THEN...

    Prasad Bhogadi
    www.inforaise.com

  • RE: Stored Procedure issue

    Hi Dragon,

    I could not see the error that you pasted, basically I missed a comma before holidays column in the group by clause, if you could please re post the...

    Prasad Bhogadi
    www.inforaise.com

  • RE: Stored Procedure issue

    Well Try This if it works

    CREATE PROCEDURE MTDPerformance AS

    SELECT  tblInput_Output.department, 

     tblInput_Output.[Date],

            CASE [Product]

     WHEN 'E-Tech'

     THEN

      SUM([1st-output] + [2nd-output] + [3rd-output] + [OT-output])

     else

      0

     END as 'E-TECH',

            CASE...

    Prasad Bhogadi
    www.inforaise.com

  • RE: sp to update existing or insert new row -- it this a good way to do it?

    What I feel is First rin the update statement statement as

    update alert set text = @alertText where alertID = ( select alertid from alert where source = @source and IncidentNo...

    Prasad Bhogadi
    www.inforaise.com

  • RE: select low 10 values

    sorry for the typing mistake

    select top 10 * from sales order by [identitycolumn or Primary key or what ever the criteria] desc

    Thanks

     

    Prasad Bhogadi
    www.inforaise.com

  • RE: select low 10 values

    Well use select top10 * from sales order by identitycolumn desc.

     

    Thanks

    Prasad Bhogadi
    www.inforaise.com

  • RE: Searching Stored Procedures

    This script also does the same functionality

    http://www.sqlservercentral.com/scripts/contributions/1120.asp

    However Greg has pointed out that it could be done with out using a cursor with the following script

    create procedure myproc...

    Prasad Bhogadi
    www.inforaise.com

  • RE: bcp

    Please refer to

    http://www.sqlservercentral.com/scripts/contributions/1127.asp

    Thanks

     

    Prasad Bhogadi
    www.inforaise.com

  • RE: Assigning column headers at runtime.

    Well this can be done using Dynamic SQL however you may want to get yourself clear if you want to go with dynamic SQL or not and it also requires...

    Prasad Bhogadi
    www.inforaise.com

  • RE: Commit Work and rollback work

    Well COMMIT WORK and ROLLBACK WORK works similar to COMMIT TRANSACTION and ROLLBACK TRANSACTION, but if you are using multiple BEGIN TRANSACTIONS in your SP the ROLLBACK work will rollback...

    Prasad Bhogadi
    www.inforaise.com

  • RE: Group by problem

    Yeah the hard and fast rule for Group By is that the condition should include only database fields however you can use key words like ALL.

    Thanks

    Prasad Bhogadi
    www.inforaise.com

Viewing 15 posts - 376 through 390 (of 455 total)