Forum Replies Created

Viewing 15 posts - 2,911 through 2,925 (of 5,504 total)

  • RE: Assigning Multiple Variables with Values at the same time

    SELECT TOP 1

    @FirstName = FirstName,

    @MiddleName = MiddleName,

    @LastName = LastName

    FROM

    SomeTable

    WHERE SomeColumn = SomeValue

    ORDER BY SomeOtherColumn

    Please note that I added TOP 1 together with...

  • RE: count and new column

    It's a little confusing... In your verbal description you're talking about a new colum but your example shows a new row. :ermm:

    If you need a new column, you could use...

  • RE: Are the posted questions getting worse?

    Jan Van der Eecken (8/31/2010)


    Various curries, beer and red wine on this side. And no, I'm not a DBA either, so my choice of energy providing food/drink sources may not...

  • RE: Dynamic Columns - Cash Flow problem

    Please have a look at the CrossTab article referenced in my signature to get your data pivoted.

    Once you know how the concept works move on to the DynamicCrossTab article to...

  • RE: Crosstab for Generic Data

    Please have a look at the DynamicCrossTab article referenced in my signature. I guess this approach will do the job.

    If you need further assistance please provide table def, sample data...

  • RE: Service Broker - Recommended Reading?

    I refer to rusanu's web site[/url] once in a while.

    It might help you as well, even though most of the stuff he wrote about is related to SS2K5.

    I can also...

  • RE: help with query...

    Please read and follow the advice given in the first link in my signature and provide ready to use sample data. Furthermore, please include your expected result based on the...

  • RE: help on xml schema

    You need to include the namespace declaration in your SELECt statement.

    Assuminig you're using SS2K5 or SS2K8, here's the XQuery snippet I would use:

    declare @xml xml

    set @xml='<HousingLoan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <MemberData>

    <Name>alan</Name>

    </MemberData>

    <FinanciarData>

    <Source>Bank</Source>

    </FinanciarData>

    </HousingLoan>'

    ;

    WITH XMLNAMESPACES

    ('http://www.w3.org/2001/XMLSchema-instance' as...

  • RE: Are the posted questions getting worse?

    RBarryYoung (8/28/2010)


    ...

    *sigh* Long story, ... between work problems and medical problems I literally have no time for anything else. Don't get me wrong, neither is serious, but both...

  • RE: Are the posted questions getting worse?

    RBarryYoung (8/28/2010)


    CirquedeSQLeil (8/27/2010)


    Trey Staker (8/27/2010)


    The executive assistant to our CIO ...

    Ha - I first read that as "Execution Assistant..."

    That would have been funny.:-D Would go really well with the...

  • RE: Pivot w/o aggregation...query not working

    Your pvt subqry does not contain a column named [Personnel_id]. Therefore, your ORDER BY fails.

    I think that's not the only flaw in your query...

    But without any table def, sample data...

  • RE: Can a SP invoke a thread to call another function

    I think it will be better to redesign the whole process. Modify the analysis procedure to process all products at once instead of calling it for each product separately. Or,...

  • RE: Error converting data type varchar to float.

    How about providing table def, ready to use sample data and expected result? It would help a lot more than asking one question at a time...

  • RE: Error converting data type varchar to float.

    How about

    CAST (Replace(Performance,',','.') AS DECIMAL(7,3))

    As a side note: Why did you try to cast it to float in between? Shouldn't be needed.

  • RE: xml datatype/return as a result set

    I don't know why you'd want to return the content of the ROOT node as well, but...

    Here's my approach:

    DECLARE @tbl TABLE (TRNKEY_XML XML)

    INSERT INTO @tbl SELECT

    '<ROOT>

    <PROGRAM>ACSYNC</PROGRAM>

    <Old_SSN>123456789</Old_SSN>

    <New_SSN>987654321</New_SSN>

    </ROOT>'

    SELECT

    TRNKEY_XML,

    T.c.value('PROGRAM[1]','VARCHAR(10)') AS PROGRAM,

    T.c.value('Old_SSN[1]','VARCHAR(10)')...

Viewing 15 posts - 2,911 through 2,925 (of 5,504 total)