Forum Replies Created

Viewing 15 posts - 3,916 through 3,930 (of 4,085 total)

  • RE: stopping index generation

    teutales (8/16/2010)


    Why do you want to not update an index during a batch?

    because of duration... I thought this is a big brake...

    thank you all for your replies!!!!

    Your cursor is more...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Sql Query to extract the data.. Need Help...

    There are a couple of options.

    CASE 1: Left outer join

    SELECT DISTINCT e.EmpID, e.Name, CASE WHEN sub.EmpID Is NULL THEN 'N' ELSE 'Y' END AS Manager_Status

    FROM Employee AS e

    LEFT OUTER...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: sql trigger using cte - need help

    Your assignment statement is in the wrong place. Your statement should be

    WITH CTE AS (....)

    SELECT @MyVal = ( SELECT .... FROM CTE .... )

    Also, the query you are using...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: optimise avoid using loop

    His function already returns the CustomerCode, so he can join on that instead of rewriting the function.

    UPDATE TR

    SET Amount_Lastest = FGA.AmountFinal

    FROM #TempResults ...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Create #Temp Table using While Loop Instead of Cursor

    It's really not clear what you are trying to accomplish. Are you trying to replicate the Information_Schema.Columns view? How about providing sample data and expected results as recommended...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Updating 2 rows in table B based on 1 row from table A

    ziedkallel (8/12/2010)


    Actually the descriptions table is created from scratch based on some (simple) business rules. I'm hoping I can rely on those business rules to do the joint. Here is...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Convert a weird character string

    Try CASTing it as varbinary(max).

    You might also want to check that the collations on the two databases match. Different collations can treat the same character differently.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: deploy database change to ms sql server

    The basic idea is that you check whether an object already exists. If it doesn't you add it.

    IF NOT EXISTS (

    SELECT *

    ...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Financial Year Query

    All you have to do is add/subtract the appropriate amount to adjust the beginning of your fiscal year to Jan. 1. In your case, subtracting three months (or adding...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Help needed to generate an XML Structured output file

    A couple of things. In order for us to help you with your problem, the sample data has to be representative of your live data. Since it's obvious...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: how to unescape

    Web browsers unescape the characters for you. In order to display the escaped characters, you have to escape the ampersands that are produced by your query.

    col1(No column name)

    1<A>, <B>,...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: how to do this without a cursor?

    I'll go one step further. Your OrderID and LineID should either be int (highly recommended) or at least padded with zeros to get a consistent length. Otherwise when...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Outputting XML to file with extended characters html encoded?

    It sounds like your original query was treating your XML data as string data. There are a number of ways that you can correct this, but since you didn't...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: read/parse an XML field

    You can also filter in your XPath expression. For example:

    SELECT

    b.header.value('Value[1]', 'varchar(20)') AS Typex2

    FROM @bb.nodes('//ProcessTraceNode[contains(FunctionSymbol[1],"SUBFORMULA")]') AS b(header)

    I'm not sure which is more efficient.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Delete Rows

    If you group on the driver ID, you can find the Min() of the status. You can also use a PIVOT if the group by won't work for some...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 3,916 through 3,930 (of 4,085 total)