Forum Replies Created

Viewing 15 posts - 3,571 through 3,585 (of 10,144 total)

  • RE: Query of 100 mil rows with multiple parameters

    GilaMonster (3/4/2014)


    ChrisM@home (3/4/2014)


    Less rows per page because of data duplication doesn't come without cost.

    What data duplication?

    There's always some overhead and someone always has to do the sums, calculate the cost-benefit.

    Not...

  • RE: Query of 100 mil rows with multiple parameters

    Once more with details:

    [Expr1031] = Scalar Operator(CONVERT_IMPLICIT(int,[FlexQuotes].[dbo].[BRFCLSeaWeekHis].[Year] as [FCL].[Year],0)),

    [Expr1032] = Scalar Operator(CONVERT_IMPLICIT(int,[FlexQuotes].[dbo].[BRFCLSeaWeekHis].[Week] as [FCL].[Week],0)),

    [Expr1033] = Scalar Operator(CONVERT_IMPLICIT(nchar(3),[FlexQuotes].[dbo].[BRFCLSeaWeekHis].[CurrencyCode] as [FCL].[CurrencyCode],0)),

    [Expr1034] = Scalar Operator(CONVERT_IMPLICIT(decimal(18,5),[FlexQuotes].[dbo].[BRFCLSeaWeekHis].[RateTotal] as [FCL].[RateTotal],0)),

    [Expr1035] = Scalar...

  • RE: Calculate and return the previous Date at 18:00 Hours

    SELECT DATEDIFF(dd,0,GETDATE())-1

    SELECT DATEADD(dd,DATEDIFF(dd,0,GETDATE())-1,0)

    SELECT DATEADD(hh,18,DATEADD(dd,DATEDIFF(dd,0,GETDATE())-1,0))

    Use q3. q1 and q2 help explain the algorithm.

  • RE: where exists and where not exists in sql rewrite as single query in sql server

    SELECT --TOP 100 PERCENT

    objectid AS companyid,

    -- max(CASE WHEN symbolTypeid = 7 THEN CONVERT(int, symbolValue) ELSE NULL END) AS mergentId,

    MAX(CASE WHEN symbolTypeid = 5 THEN symbolValue ELSE NULL...

  • RE: how to use One CTE value in another CTE ,in SQL 2008 R2

    You've missed the FROM list in CTE3.

  • RE: Syntax advise please

    igloo21 (3/4/2014)


    Above bolded parts in the quotes display a contradiction. Did the query run correct when removing both the CASE statements or did it NOT run correct?

    If it didn't run...

  • RE: Syntax advise please

    sCustomer_number is float:

    SELECT DISTINCT TOP (100) PERCENT

    c.iCustomer_id,

    c.sCustomer_number AS CustomerNo,

    CASE WHEN c.sCustomer_number = 1 THEN 660 ELSE c.sCustomer_number END AS sCustomer_number,

    c.sCustomer_name AS CustomerName,

    c.sCustomer_state AS Customerstate,...

  • RE: Syntax advise please

    SELECT DISTINCT TOP (100) PERCENT

    c.iCustomer_id,

    c.sCustomer_number AS CustomerNo,

    CASE WHEN c.sCustomer_number = 'SL000000' THEN 660 ELSE c.sCustomer_number END AS sCustomer_number,

    c.sCustomer_name AS CustomerName,

    c.sCustomer_state AS Customerstate,

    cc.CustomerType AS Channel,...

  • RE: Are the posted questions getting worse?

    rodjkidd (3/4/2014)


    Tom,

    Shrewsbury - somewhere else that's on my "yet to visit" list. I'm getting almost as much out of this discussion as Gail is.

    Deciding whether to wait for the discount...

  • RE: "good" plan, low reads, but still slow...

    Change the key column order of the index nci_SalesDistrict so that UbiquitousTinyIntColum is the leading edge, followed by keysalesdistrict.

    It will probably give you seeks. Better still, data should come off...

  • RE: Non Clustered index on Primary key is not used by the execution plan and showing Table scan

    Remove the index hint from the query whilst you are still testing and developing. Index hints are used when you've exhausted other, simpler, possibilities.

    Add rua.userIsBound to the index as...

  • RE: Are the posted questions getting worse?

    jcrawf02 (3/3/2014)


    GilaMonster (3/3/2014)


    I see this is going to require some careful planning...

    *ahem. Cousin Chad and I respectfully submit an item for consideration upon your route:

    http://en.wikipedia.org/wiki/Crawford_Castle

    😀

    It's tragic how little remains of...

  • RE: Are the posted questions getting worse?

    paul.knibbs (3/3/2014)


    ChrisM@Work (3/3/2014)

    It is. I was going to suggest you take the coast road but we don't really have a joined-up one of those.

    Or maybe head across the Severn Bridge...

  • RE: Are the posted questions getting worse?

    GilaMonster (3/3/2014)


    ChrisM@Work (3/3/2014)


    GilaMonster (3/3/2014)


    I'm going to picking your brain in the next month or so about vacation spots, I'm planning to take a off week after Bits, Wales looks close....

  • RE: Are the posted questions getting worse?

    GilaMonster (3/3/2014)


    rodjkidd (3/3/2014)


    GilaMonster (3/3/2014)


    BrainDonor (3/3/2014)


    SQL Bits XII has finally been announced http://www.sqlbits.com/.

    Wooot!

    Next problem, what do I submit?

    Almost posted last night that site was up. But apparently we shouldn't have noticed...

Viewing 15 posts - 3,571 through 3,585 (of 10,144 total)