Forum Replies Created

Viewing 15 posts - 4,546 through 4,560 (of 10,144 total)

  • RE: Dynamic SQL Giving 'Name not a valid identifier error'

    softtesting2012 (6/5/2013)


    Invalid: exec @sqlQuery

    Valid: exec (@sqlQuery)

    Not necessarily so. Read Gail's post above.

  • RE: insert records into table which record insert wrong that record only rollback remains insert

    Try looking at this problem differently:

    You want to insert some rows into a table [emp]. Any rows which will fail to insert into [emp] (e.g. duplicate key), should be inserted...

  • RE: Execution plans

    m.rajesh.uk (6/5/2013)


    i was given task identify long running queries and problematic queries.. but in the reults i got the above queries and none of the involve complex code...

  • RE: help with query

    Hi Daniel and welcome to SSC. Thanks for doing an excellent job of posting up ddl.

    danielb27 (6/5/2013)


    ...some of your products are not selling, you would like a list of...

  • RE: Mistery never ending query

    ricardo_chicas (6/4/2013)


    not an stats issue

    There's no evidence to support anything else. Lowell's explanation seems the most likely.

  • RE: Mistery never ending query

    ricardo_chicas (6/4/2013)


    I just solved the issue by adding a new index ( not necessary since I was using the clustered one)

    the query started working, then I removed the new index...

  • RE: Mistery never ending query

    ricardo_chicas (6/3/2013)


    if I remove field 2 from the equation it will work just fine

    Any ideas?

    An actual plan from the whole original query with "field 2" commented out as you...

  • RE: Mistery never ending query

    ricardo_chicas (6/4/2013)


    All

    I can't even generate the exec plan. It never ends, and none is using that table since it is a copy of the original

    And none is blocking that spod...

  • RE: MY query is procedure is not working?

    Kingston Dhasian (6/4/2013)


    ChrisM@Work (6/4/2013)


    ALTER PROCEDURE update_use

    (

    @name varchar(20),

    @class nvarchar(30)

    )

    AS

    UPDATE grts SET class = @class WHERE name = @name

    IF @@ROWCOUNT = 0

    INSERT INTO grts (name, class) VALUES (@name, @class)

    Wow. This is the...

  • RE: Mistery never ending query

    ricardo_chicas (6/4/2013)


    All

    Thanks but you are missing the point. The original query was something much bigger

    I used a top 1 just to show you that there is something wrong with one...

  • RE: MY query is procedure is not working?

    ALTER PROCEDURE update_use

    (

    @name varchar(20),

    @class nvarchar(30)

    )

    AS

    UPDATE grts SET class = @class WHERE name = @name

    IF @@ROWCOUNT = 0

    INSERT INTO grts (name, class) VALUES (@name, @class)

  • RE: Join Problem

    immaduddinahmed (6/4/2013)


    ...and this is my data of shift Table

    CompanyID--1

    BranchID--2

    ShiftID--12

    ShiftName--G

    LongName--GENERAL SHIFT (09 HRS)

    Stype--null

    timein--1/23/2013 9:00:00 AM

    Timeout--1/23/2013 6:00:00 PM

    Ltime--1/23/2013 9:16:00 AM

    HdTime--1/23/2013 2:00:00 PM

    Night--0

    TotalTime--6/3/2013 9:00:00 AM

    ...

    You are more likely to get effective help if...

  • RE: Mistery never ending query

    ricardo_chicas (6/3/2013)


    Hello all

    I have a big machine with 192gb, 16 cpus, and sql server 2012 RTM in it

    I am trying to run this query

    Select top 1

    ...

  • RE: Join to Calendar Table

    You're welcome.

    Can we see your final query?

  • RE: query to search

    Instead of writing your second query like this:

    vounum IN ('BC201203000073',

    'BC201204000001',

    'BC201204000002',

    'BC201205000001',

    'BC201206000001',

    'BC201206000002')

    write it like this:

    vounum IN (

    SELECT a.vounum

    FROM actrna as a

    INNER JOIN acinf as b ON a.comcod=b.comcod AND a.actcode=b.actcode

    INNER JOIN sirinf as...

Viewing 15 posts - 4,546 through 4,560 (of 10,144 total)