Forum Replies Created

Viewing 15 posts - 871 through 885 (of 1,229 total)

  • RE: Error in my SQL Statement

    Faye Fouladi (4/27/2011)


    thank you. Can you please tell me which string is bound by an extra quote?

    AND ca_d.name in (''AHLTA','Attachmate Reflection CHCS Companion with Public Keys',

    'Essentris','Dragon NaturallySpeaking','Nuance PDF...

  • RE: Error in my SQL Statement

    Faye Fouladi (4/27/2011)


    The following sql statement gives this error:...

    any idea what is wring?

    Thank you

    Yep, it took about 4 seconds.

    Put a PRINT statement right before the EXEC:

    PRINT @SoftwareQuery

    and have...

  • RE: How to avoid aggregate functions and TOP/BOTTOM ?

    Igor Savin (4/27/2011)


    This my table :

    CREATE TABLE TAB1

    (

    curr tinyint NOT NULL ,

    ddate smalldatetime NOT NULL ,

    rate decimal(15, 4) NOT NULL ,

    primary key (curr, ddate)

    )

    If "rate" didn't change in comparision...

  • RE: Recursive CTE

    Hunterwood (4/27/2011)


    Hi Chris,

    I don't know why, but it seems as if the CTE first follow one branch to the top, before following the next, but then all by a sudden...

  • RE: An Alternative for DISTINCT AND GROUP BY by using ROW_NUMBER()

    ASFSDJG (4/27/2011)


    Yes I got the solution !!

    SELECT Column1

    FROM

    (SELECT ROW_NUMBER() OVER (PARTITION BY Column1 ORDER BY Column1) As RNO, Column1

    from

    <Table_Name>)A WHERE RNO = 1

    Here's another solution.

  • RE: Insert Records In a tmp table

    with actuals as (...),

    goals as (...)

    INSERT INTO tmp_f_contrib_annual_agg (

    --put column list in here

    )

    select

    ...

    from actuals a

    full outer join goals g

    on g.credit_org_key =...

  • RE: Recursive CTE

    Hunterwood (4/27/2011)


    ...

    Now I think you can figure it out... 🙂

    /Markus

    Hi Markus

    I can't figure out how you have a 3.n in your third recursion.

    Reference: http://msdn.microsoft.com/en-us/library/ms186243.aspx

    Edit: added reference.

  • RE: Recursive CTE

    A recursive CTE can be difficult to interpret. I find it helps to map out the first few iterations using chained CTE's like this;

    ;WITH CTEAnchor (x) AS (SELECT x =...

  • RE: Recursive CTE

    Edit: Moved here.

  • RE: Adding rows od data together

    -- Create some sample data

    DROP TABLE #Temp

    CREATE TABLE #Temp (Name VARCHAR(5), Attendances INT, Did_Not_Attends INT)

    INSERT INTO #Temp (Name, Attendances, Did_Not_Attends)

    SELECT 'North', 1, 2 UNION ALL

    SELECT 'North', 2, 3 UNION...

  • RE: Inserting into an associative table

    martintalero (4/26/2011)


    The following code worked for me.

    /* INSERTs companyid and industryid INTO INDUSTRYASS table */

    INSERT INTO IndustryAss (CompanyId, IndustryId)

    SELECT DISTINCT dbo.company.CompanyId, dbo.industry.IndustryId

    FROM Company, Industry, dbo.source

    WHERE dbo.source.company=dbo.Company.CompanyName and dbo.source.Industry=dbo.industry.IndustryName

    GO

    Here's the old...

  • RE: Inserting into an associative table

    martintalero (4/26/2011)


    Thanks guys it worked.

    Martin, please can you post the code which works? This gives useful feedback to those who have responded to your request for assistance, and may also...

  • RE: Are the posted questions getting worse?

    LutzM (4/26/2011)


    bitbucket-25253 (4/26/2011)


    GilaMonster (4/26/2011)


    I don't do epic verse.

    Though... (read attached at your own risk, very amateur attempt)

    I take exception to the words "very amateur". Read both and thoroughly enjoyed...

  • RE: Are the posted questions getting worse?

    Grant Fritchey (4/26/2011)


    ChrisM@home (4/26/2011)


    Is it me, or are the posted questions from developers working on medical systems a little worrying?

    I used to work for a medical software company. it was...

  • RE: Are the posted questions getting worse?

    Is it me, or are the posted questions from developers working on medical systems a little worrying?

Viewing 15 posts - 871 through 885 (of 1,229 total)