Forum Replies Created

Viewing 15 posts - 21,616 through 21,630 (of 22,189 total)

  • RE: FOR XML output

    ecreese (10/19/2007)


    Grant when I run your query I get this error

    Msg 421, Level 16, State 1, Line 1

    The xml data type cannot be selected as DISTINCT because it is not...

  • RE: FOR XML output

    I tested using the original query, not the DISTINCT. Hang on.

  • RE: FOR XML output

    Oops.

    Got it. Add this to the inner join:

    FOR XML PATH (''), type

    so it looks like this:

    SELECT DISTINCT LocalID as "@ID"

    , (SELECT ItemUrl

    FROM foo X

    WHERE f.LocalID=x.LocalID

    ORDER BY x.photoseq

    FOR XML PATH(''),...

  • RE: FOR XML output

    Just so I had some data to mess with, I modified your query to use something form AdventureWorks:

    SELECT A.ProductId "@ID"

    ,a.Name "Col1"

    , (SELECT x.StandardCost

    FROM [Production].[ProductCostHistory] X

    WHERE A.ProductId=X.[ProductID]

    ORDER BY X.StartDate

    FOR XML PATH('')

    )...

  • RE: Syteline(Progres) Data Pull

    Until we get the 2008 MERGE statement, you need to do three passes through the data, joining on the incoming data such that you do a batch of updates where...

  • RE: A Matter of Degree

    Luke L (10/19/2007)


    Luke L (10/19/2007)


    Well let's see, I started off with 2.5 years attempting a Sound Engineering Degree (The goal was to go work for Skywalker sound out on the...

  • RE: OWNET Database Structure

    I still don't understand what you mean by tasks & processes. What those are and what you're attempting to compare between the database and the front-end?

    Do you mean the queries...

  • RE: A Matter of Degree

    I'm one of those flaky individuals who kind of backed into this gig. I did four years in the Navy. I was effectively an inheritor of Robert Fulton, working on...

  • RE: Dynamic Query in SQL Server Function

    You could try creating a table valued user defined function that uses dynamic sql to run a query against the table you have and then generate a select statement. The...

  • RE: Get list of Tables where a specific user is dbo..

    There are TONS of ways. Here's one simple one:

    SELECT * FROM [INFORMATION_SCHEMA].[TABLES]

    WHERE TABLE_SCHEMA = 'dbo'

  • RE: OWNET Database Structure

    I'm sorry, I don't understand what you're asking.

    Do you mean, where are the stored procedures? Depending on the app, there may not be any, but if there are, they're part...

  • RE: Stored Procedure Concurrency

    Unless you put a lock on the table as suggested in the previous post, yeah, the second query will try to delete what the first query was doing.

    You may want...

  • RE: Actual Reason to Use CLR

    Derek Karpinski (10/18/2007)


    Nolock - depends on your db. But can be useful, if you are careful to only use it on SELECts.

    Where you don't need absolute acuracy. For...

  • RE: Suggestions for PASS

    Sounds reasonable. I guess I'm going to have to get off my dead behind & get my MCDBA.

    Seriously though, it doesn't sound unreasonable. You just need to get the infrastructure...

  • RE: How to dynamicaly exclude chosen ID in SP for the next run?

    Exactly.

    Another option might be to keep them in the call app and pass them in as either a delimited list or XML list and then either turn the delimited list...

Viewing 15 posts - 21,616 through 21,630 (of 22,189 total)