Forum Replies Created

Viewing 15 posts - 211 through 225 (of 1,048 total)

  • RE: Wrong datatype for SP?

    Junglee_George (8/30/2013)


    Thanks Gail. But Chris hasn’t written the code for the splitter function there. I need that code.

    you can find the code for splitter in SSC article with the same...

  • RE: how to alter the existing id values to idetity(1,1)

    ScottPletcher (8/29/2013)


    ALTER TABLE dbo.tblemployee

    ADD ident int IDENTITY(1, 1) NOT NULL

    Edit: Added "NOT NULL"

    You are adding a new column with IDENTITY property and it works..

    The thing is that we cant add...

  • RE: need help in a stored procedure

    So what output you want?

  • RE: Invalid object name

    aiki4ever-796329 (8/27/2013)


    Geez, I should have known that!

    It's the difference between

    select * into test2 from test -- inserts into a new table

    insert into test2 select * from test --...

  • RE: Insert on condition in Trigger

    ALZDBA (8/28/2013)


    if that meets the requirement, it's ok.

    But what abt the scenario for which I posted the question...

    How can I implement this:

    Scenario is: Currently if made any changes in DeviationRequestDetails...

  • RE: Insert on condition in Trigger

    ALZDBA (8/28/2013)


    What will happen to your trigger if someone inserts data of multiple ProjectID / ProposalID / SolutionId / UnitID in a single batch ?

    Keep in mind exceptions do occur...

  • RE: Insert on condition in Trigger

    OK,

    ihave changed the code now...

    Removed the MERGE statement.

    Is this OK?

    ALTER Trigger [dbo].[Trg_DeviationRequestDetails_Ins]

    ON [dbo].[DeviationRequestDetails]

    After INSERT AS

    BEGIN

    Declare @count INT

    SELECT @count = COUNT(*) FROM INSERTED

    If @count = 1

    BEGIN

    ...

  • RE: Insert on condition in Trigger

    ALZDBA (8/28/2013)


    did you try the easy way ... split the trigger in two ?

    1 trigger only for inserts

    1 trigger only for updates

    ALTER...

  • RE: Query Help

    On basis of what criteria you are assigning flavours to the output. please provide more details on it..

  • RE: Error in creating function

    HanShi (8/27/2013)


    I can't reproduce your error on my system. I'm able to created the function with your code (changing the ALTER to CREATE). I'm also able to alter this function...

  • RE: Error in creating function

    Oops, my previous existing function was not a multi-statement table-valued function.

    I find that ALTER cannot be used to change the function type.

    So, I DROP and CREATE the function...

  • RE: Display last label value on x axis always

    I think you have posted your question to a worng forum..

  • RE: Where Statement

    lindavol (8/26/2013)


    THANK YOU - this works when I am in design and go to run

    But does not work when I double click on the report and apply the parameters. ...

  • RE: Which trigger should choose?

    Koen Verbeeck (8/26/2013)


    Seems fine to me. All nice set-based operations 🙂

    🙂 :-P:-D:-P

  • RE: Which trigger should choose?

    I have changed my code into this and used magic table INSERTED and its working now:)

    Is it ok?

    Alter Trigger Trg_DeviationRequestDetails_Ins

    ON DeviationRequestDetails

    After INSERT, UPDATE AS

    BEGIN

    MERGE INTO CLCProcessUnitDetailsCompany T

    USING INSERTED as S...

Viewing 15 posts - 211 through 225 (of 1,048 total)