Forum Replies Created

Viewing 15 posts - 2,656 through 2,670 (of 10,144 total)

  • RE: Need assistance with Update Query

    Your query isn't properly formed, the subquery (timesheets join employeemaster) isn't correlated with the UPDATE target leavehoursearned.

    Start by writing a SELECT query which correctly joins all three tables and...

  • RE: CASE vs ISNULL? Which is faster?

    Bhushan Kulkarni (2/1/2015)


    Performance of both will be same. I tested both queries on my test database. I got same execution plan for both ISNULL and Case statement

    If you look at...

  • RE: Sql Select query is not working on one table but the same is working on copy of the table

    praveenkumarpalla (2/2/2015)


    Thank you for the reply, Yes I agree with you...

    My requirement is like user will upload the excel in which there will be a lab id, block id, mutation1,...

  • RE: Sql Select query is not working on one table but the same is working on copy of the table

    You've probably got an optimiser timeout on that query. I count ten tables in the FROM list, and that's counting the table-valued function as one table. More than about seven...

  • RE: Need Help !! Its urgent

    Fantastic, thanks for going to the trouble of posting this up Chris.

    Here's IO and timing stats for both queries as-is:

    LIKE ========================================

    (229 row(s) affected)

    Table 'TestData'. Scan count 9, logical reads 10605,...

  • RE: Need Help !! Its urgent

    Christopher Kutsch (1/30/2015)


    Try using PATINDEX instead of LIKE. I have had good luck using this method where indexes are available on the search column.

    DECLARE @status NVARCHAR(50)

    ,...

  • RE: Deleting 10 million rows from table

    vsuresh (1/30/2015)


    A lot of unwanted rows got entered into a table due to a faulty script. This caused the database to grow by 6GB. I need to delete these rows....

  • RE: Update or Insert SQL Codding help

    atul.jadhav (1/30/2015)


    Dear expert

    I am using import/export wizard to upload excel in sql table

    I have primary key in my table

    and all primary key value has been change every day

    i.e. I have...

  • RE: Display one row for the query

    Try this:

    CREATE TABLE #tbl_TMIS_DATASET (

    [BL_ID] [decimal](10, 0) NOT NULL,

    [VESSEL] [nvarchar](10) NULL,

    [VOYAGE] [nvarchar](12) NULL,

    [LEG] [nchar](3) NULL,

    )

    INSERT INTO #tbl_TMIS_DATASET

    VALUES('19516116','HJAMRC','0010E','E')

    CREATE TABLE #MG_BL_ITINERARY(

    [BL_ID] [numeric](10, 0) NULL,

    [LEG_SEQ_NBR] [numeric](3, 0) NULL,

    [VESSEL_CD] [varchar](10) NULL,

    [VOYAGE_CD] [varchar](12) NULL,

    [LEG_CD] [char](1)...

  • RE: Need Help !! Its urgent

    There may be a chance here...can you provide a few examples of si.ShippingKey and the range of o.OrderNumbers which you would expect to match? You may be able to...

  • RE: update data based on case condtion

    Run this query and post back the results:

    SELECT

    [EVT.VAL42 = 0] = SUM(CASE WHEN EVT.VAL42 = 0 THEN 1 ELSE 0 END),

    [EVT.VAL42 <> 0] = SUM(CASE WHEN EVT.VAL42 <> 0...

  • RE: update data based on case condtion

    farrukhhameed786 (1/29/2015)


    I am doing like that but if EVT.VAL42 >0 the first update query not run it goes to second update

    IF NOT EXISTS (SELECT ...

  • RE: Display one row for the query

    pwalter83 (1/29/2015)


    Hi,

    For the following query, I am trying to fetch only one row (no duplicates) for each BL_ID based on

    the logic that if I have multiple rows for one...

  • RE: update data based on case condtion

    farrukhhameed786 (1/28/2015)


    Hi

    How to do this?

    Without seeing the code you have already written which would help to describe your problem, it would have to be a guess. Something like

    UPDATE MyTable SET...

  • RE: update data based on case condtion

    farrukhhameed786 (1/28/2015)


    Hi Experts !

    I have two sql queries needs to run on condition. In Sub Query if the column having value 0 then run first update statement else...

Viewing 15 posts - 2,656 through 2,670 (of 10,144 total)