Forum Replies Created

Viewing 15 posts - 4,186 through 4,200 (of 5,502 total)

  • RE: Calculating tenure in position

    What would be the expected result for the (very limited) sample data?



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: String manipulation

    I would use a table to store the character value and the substitute.

    Step two would be the replacement by calling the REPLACE function for each entry in the table and...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Sort output on diffent columns

    You could use the CASE statement. Something like:

    DECLARE @ordercol sysname,@sql AS VARCHAR(500)

    SET @ordercol='object_id'

    SELECT TOP 5 *

    FROM sys.objects

    ORDER BY

    CASE @ordercol

    WHEN 'object_id' THEN STR(OBJECT_ID)

    WHEN 'name' THEN name

    ELSE CONVERT(CHAR(10),create_date,120)

    END

    It's important to...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Need glossary index in SSRS

    duplicate post. Please continue duscussion here.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Need glossary index in SSRS

    duplicate post. Please continue duscussion here.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Querying XML stored as NVARCHAR

    Glad you found a solution that works for you and thank you for posting back.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Adding a soap header and footer to an FOR XML SELECT statement

    Glad I could help 😀



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Adding a soap header and footer to an FOR XML SELECT statement

    As far as I can see, my first code snippet and the view will return the same data. What's different?



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: XML schema - Element name used to identify item problem...

    Based on your sample data: what would be your expected result?



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Adding a soap header and footer to an FOR XML SELECT statement

    I don't really understand why you'd need a view containing just one row...

    but the following statement worked fine on my system (after changing the temp table to a permanet table,...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Adding a soap header and footer to an FOR XML SELECT statement

    change your SELECT part to the following code:

    DECLARE @soapHeader VARCHAR(1000)

    DECLARE @soapFooter VARCHAR(1000)

    SET @soapHeader='<SOAP-ENV:Envelope

    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

    <SOAP-ENV:Header>

    <ns1:AuthenticationInfo xmlns:ns1="urn:thisNamespace">

    <ns1:UserName>John Doe</ns1:UserName>

    </ns1:AuthenticationInfo>

    </SOAP-ENV:Header>

    <SOAP-ENV:Body>

    '

    --soap footer:

    SET @soapFooter=' </SOAP-ENV:Body>

    </SOAP-ENV:Envelope>'

    SELECT CAST(@soapHeader+(SELECT

    [AddressLine1] AS [Address/Address1]

    , [AddressLine2] AS [Address/Address2]

    , [City] AS [City]

    FROM

    #Address

    FOR...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: XML schema - Element name used to identify item problem...

    Would you please provide some ready to use sample data as described in the first link in my signature?

    Based on your (rather vague) sample data I'd simply use

    c.value('FERTILIZER_CHARGE[1]', 'VARCHAR(30)')

    but the...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Querying XML stored as NVARCHAR

    Since you're using a typed xml document you need to use XML NAMESPACES to qualify your elements (even though the namespace is nowhere used inside the xml document).

    Since I couldn't...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: XML Fragment Parse

    When you extract elements you should use the element name (e.g. columnid[1]).

    The way you wrote the code you're trying to query attributes.

    Here are both versions for comparison and to show...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Problems with Date Searches

    Instead of

    WHERE Date BETWEEN '1/1/2009' and '12/31/2009 23:59:59.997'

    I'd rather use

    WHERE Date >= '20090101' and Date<'20100101'

    The main reason for date formatting YMD instead of M/D/Y is to have no...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 15 posts - 4,186 through 4,200 (of 5,502 total)