Forum Replies Created

Viewing 15 posts - 226 through 240 (of 428 total)

  • RE: construct interco elim query

    It is not exactly what you asked for, but isn't this what you meant to get? This gives you the total of what every company needs to pay to the...

  • RE: Selecting Max Date

    I would rather try something like below query. It uses window function row_number() to partition by server - status combination, ordering descending on the update_date. All most recent server -...

  • RE: Adding either a "1" or "2" in a column (using Select, Union All, and three tables)

    TDSapp (10/4/2011)


    I hope I have given you enough details on what I need help with.

    You could give us the criteria for a customer being in group 1 or group 2......

  • RE: Index/Stats Maintenance execution

    derekr 43208 (10/3/2011)


    Thanks tested but doesnt work

    This is the result:

    (18 row(s) affected)

    Msg 102, Level 15, State 1, Line 3

    Incorrect syntax near 'GO'.

    Msg 102, Level 15, State 1, Line 6

    Incorrect syntax...

  • RE: Comparing columns in two tables for unequal values

    mapperhd (10/2/2011)


    Thanks for the replies.

    However, I need to keep only the columns that are not equal. Let's say there are 12 columns in the two records being compared. If columns...

  • RE: Need advice on Logging XML

    UnionAll (10/1/2011)


    Thank you!

    Convinced to store XML directly in a table.

    A follow up question, let's say for example the XML file that's sent has 3 tags as below.

    Always a blank field...

  • RE: Need advice on Logging XML

    Better not make the column's type [xml]. If you do make it an [xml] column, you will not be able to store a file that happens to be malformed; i.e....

  • RE: Need advice on Logging XML

    I agree with that: storing the document itself is the best audit you can have. You may however still, next to storing the documents, read the orders from them to...

  • RE: Need advice on Logging XML

    Can't you generate the xml, then read it to find the orders in there for the audit? If it's an audit you want to be sure the xml generation didn't...

  • RE: Index/Stats Maintenance execution

    You don't need to know the exact number of rows in the temp table to know you need to continue. Knowing there is at least one row is sufficient. So...

  • RE: 52 weeks hig/low

    I think below query does what you want: return the columns from @stock, plus from all rows that have the same INDEX_CODE as that on the row and have an...

  • RE: Need help with data ASAP PLEASE

    Can you give us some ddl and sample data so we can verify what we're doing? This code is very hard to read with all those generated names and aliases....

  • RE: Syntax problem: WITH XMLNAMESPACES in subquery

    Apart from the T-SQL syntax errors that Drew gave you a solution for, you also seem to have a misconception on the use of namespaces in xml.

    The xml document you...

  • RE: SQL Insert Data from one table to other table

    Even if the serial values are unique within each table (for example by a key constraint), there may still be duplicates when trying to insert them. This is due to...

  • RE: How to get output in following formats

    It's this link[/url] I'm talking about. If you do not supply the information we need, that will be an opportunity missed for you.

Viewing 15 posts - 226 through 240 (of 428 total)