Forum Replies Created

Viewing 15 posts - 571 through 585 (of 1,229 total)

  • RE: Help with Counts

    bicky1980 (1/11/2012)


    ...These are just the basic counts, I will need to then run these incoporating the where clause for various variables. If someone could advise of the best way...

  • RE: Set based updates...not using cursors or loops

    Laurie-1124340 (1/18/2012)


    What do you want to know about this string? I can put that into any format you want through VB.net.

    It's a list of selected stakeholderids from...

  • RE: Set based updates...not using cursors or loops

    Focus on resolving the string into a temp table first, the rest is straightforward.

    Can you provide us with more details about this string?

  • RE: Select Top problem

    SELECT TOP (3) WITH TIES *

    FROM ClientRequests

    ORDER BY Requests DESC

  • RE: accumulated values

    Anamika (1/9/2012)


    sorry about the interval mistake. lets take 5 minutes only.

    create table #t (d1 int primary key identity(1,1), v1 varchar(50), v2 int, v3 int)

    insert into #t values('01/05/2012 5:59:00 PM',322667648,330025988)

    insert into...

  • RE: Group By Date loses records but Date required for join

    mic.con87 (1/18/2012)


    Hi Chris, any feedback on the problem? Thanks

    Yes - your results don't match your sample data.

    The results table #DesiredResults contains ClaCaseID 25622, 42582, 42587 - possibly more -...

  • RE: Enhance the query to read the organization ID from organization table instead of listing the organization ID in WHERE clause

    You will need to wrap the SUM around a conditional which selects only the rows you wish to sum, like this:

    set @submission = 'actual'

    set @Period = '06'

    set @Year = '2011'

    use...

  • RE: Why doesn't this work?

    Works ok for me:

    DECLARE@MaxLenINT= (SELECT MAX(LEN(Name)) FROM sys.filegroups);

    SELECT

    [name],

    [MaxLen] = @MaxLen,

    [Shortname] = LEFT(name,@MaxLen),

    [ShortLength] = LEN(LEFT(name,@MaxLen)),

    CASE is_read_only

    WHEN 0 THEN 'Read Write'

    WHEN 1 THEN 'Read Only'

    ELSE 'Unknown'

    END AS AccessMode

    FROMsys.filegroups

  • RE: Group By Date loses records but Date required for join

    mic.con87 (1/18/2012)


    Hi Chris, any feedback on the problem? Thanks

    Gosh, I'm sorry, this one fell by the wayside. On it now.

  • RE: Help me: is there a way for conditional joins

    DBA Rafi (1/18/2012)


    is there a way for conditional joins.

    like,

    when (1=1) inner join table1 on column1 = column2.

    when (1=2) inner join table1 on column1 = column2.

    etc..

    Appreciating your help.

    You mean...

    INNER JOIN...

  • RE: Conditional

    nfpacct (1/18/2012)


    I have a table with a Employee Status column with values 0 or 1 or 2

    Instead of printing the values I would like to view the result as

    if...

  • RE: Help with Counts

    With a tiny mod, this produces the same results as Bicky's original query:

    ;WITH Level1 AS (

    SELECT indkey, datakey, landline

    FROM (

    SELECT indkey, datakey, landline,

    rnll = ROW_NUMBER() OVER(PARTITION BY landline ORDER...

  • RE: Help with Counts

    bicky1980 (1/17/2012)


    SQLKnowItAll (1/17/2012)


    SQLKnowItAll (1/17/2012)


    If the data could be processed in the following manner that would be great

    1. Extract all the data with a landline

    2. Dedupe the data on datakey -...

  • RE: Help with Counts

    L' Eomot Inversé (1/17/2012)


    Here's another attempt at making some progress towards a precise statement or the requirement....

    Tom, how does the query I posted here fit in with all this? Be...

  • RE: Help with Counts

    bicky1980 (1/17/2012)


    SQLKnowItAll (1/17/2012)


    L' Eomot Inversé (1/17/2012)a set of datakey-landline pairs such that each landline and each datakey occurs only once

    As far as I can tell, this is an impossible statement...

Viewing 15 posts - 571 through 585 (of 1,229 total)