Forum Replies Created

Viewing 15 posts - 481 through 495 (of 761 total)

  • RE: case statement

    Good one Eugene.

    I was on the same logic after I saw the OP's second post where he altered the result set.

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: delaring a null parameter

    marclas (5/8/2012)


    HI

    how can i set a null value when declaring a parameter

    example

    CREATE PROCEDURE dbo.GestionStatutDossier

    -- Add the parameters for the stored procedure here

    @StaId int NULL,

    @DosID uniqueidentifier,

    @staDate datetime,

    @staBL nvarchar (50),

    @staCRprod nvarchar...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Triggers

    One way you can disable the trigger by using following sql script

    ALTER TABLE Table_Name DISABLE TRIGGER Trigger_Name

    Other way programaticlly handle it by checking a condition inside the...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: How to use WHEN EXISTS inside a CASE Statement

    Please post DDL of the tables and some sample data.

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Is the following possible

    kirkm 55368 (5/7/2012)


    Hi Vinu, I had a look but its a little too advanced for me.

    Where has has, e.g.

    Select *

    From Table1 t1

    LEFT OUTER JOIN Table2 t2

    ON t1.Col1 = t2.Col2

    What are...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Executing Errors

    Going by what you posted Anthony is absolutely right.

    He told you what the Error means. We as real people can only tell you the meaning of the Error by looking...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: remove specific row only if there is a duplicate row

    This might work too:

    ;With CTE

    As

    (Select *, Row_Number() Over (Partition by a,b Order By a Desc) As rownum From

    (SELECT 'W1' AS A, 'WWW' AS B, 'W2' AS C

    UNION ALL

    SELECT...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Need help creating case statements from a query.

    Yes you can do it as follows:

    Select (Case When field1 IN (Select field1 From Tbl Where field2 = 'Ann') Then field2 Else '' End ) From Tbl

    I hope by Dynamically...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: case statement

    Sony Francis (5/8/2012)


    try this

    select DISTINCT Field1,

    STUFF

    (

    (

    ...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Conditional select with function

    I don't really think I understand what your requirement is. But, I came up with something. Hope it helps you:

    Select b.origin_code, b.Id, b.over_weight_qty, b.over_weight_um From

    (Select Origin_Code, Id,

    (Case When...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Optimize select query

    Lynn Pettis (5/8/2012)


    We need the DDL (CREATE TABLE statement) for the tables involved in the query, including any indexes. Also the actual execution plan, saved and uploaded as a...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Triggers

    I haven't done this before. But you can use the REVOKE command inside your trigger to alter the privileges of a User.

    But, I don't think you can do it for...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: case statement

    This is my shot at it:

    DECLARE @temp1 VARCHAR(MAX);

    DECLARE @temp2 VARCHAR(MAX);

    DECLARE @temp3 VARCHAR(MAX);

    SELECT @temp1 = COALESCE(@temp1,'') + ',' + CHAR(39) + field2 + CHAR(39) + ''

    FROM tbl Where field1 = 1

    SET...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: syntax error : Msg 102, Level 15, State 1, Procedure CreerComplement, Line 43

    marclas (5/7/2012)


    hi,

    Yes it does!!!

    thks

    You're Welcome:-)

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

  • RE: Case When or Loop based on Complex Logic

    It would be very nice of you and very helpful to everyone who might provide a solution to your requirement if you could have a look at the link mentioned...

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

Viewing 15 posts - 481 through 495 (of 761 total)