Forum Replies Created

Viewing 15 posts - 2,266 through 2,280 (of 4,087 total)

  • RE: How to divide money between two participants

    Please provide sample data and expected results as outlined in the first link in my signature. Also, do you want to divide it evenly, or is there some weight...

  • RE: sql query to display a trailer record at the end in txt file (using batch file)

    bcp doesn't allow you to append data to an existing file.

    You have a couple of options. You can output the data to two separate files and then concatenate them...

  • RE: sql query to display a trailer record at the end in txt file (using batch file)

    Yes, but are you having trouble getting the information to append to the file or do you have the information and you can't figure out how to append it?

    We also...

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (10/10/2016)


    Grant Fritchey (10/10/2016)


    This was an... interesting? ... read. Weird location. I've never heard of this person. I think this is their only SQL writing. It's just odd.

    No need...

  • RE: SSIS 2012 Foreach file enumerator issue

    Did you check to make sure that the agent has permissions to access the directory where the files are stored?

    The last time I worked with SSIS was SQL 2008, so...

  • RE: CONVERT DATETIME to TIME and remove seconds and milliseconds

    Chrissy321 (10/10/2016)


    My use case is I have daily jobs that are scheduled to run at a specific time. I want to alert when a job did not run.

    Your description does...

  • RE: Select Distinct and sum

    LinksUp (10/10/2016)


    Putting MIN & MAX around strings to get the desired output is not, in my opinion, a good approach or technique to use. (Though I have done it myself...

  • RE: Solving FIFO Queues Using Windowed Functions

    wtren (10/8/2016)


    beautiful work, I check the execution plan, the main cost is on sort operator, in fact we do not need that much sort, we just need sort the credit...

  • RE: Select Distinct and sum

    Sergiy (10/9/2016)


    vfn (10/9/2016)


    error:

    Column PupilPersonalDetails.Forename is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY Clause

    helllpppp

    That's right.

    If you want to...

  • RE: "Add" Hyphen Data Modification

    eandre360 (10/10/2016)


    Hmm, thanks for the support. I actually think that I managed to format to accommodate this. However, I'm getting an error for something that shouldn't be getting considered in...

  • RE: count timespans without overlaps

    Y.B. (10/7/2016)


    drew.allen (10/7/2016)


    Here is an updated version that only requires a single scan of the table. There is a complete description of the logic at New Solution to the...

  • RE: query and compare values in a text based column

    Try the following.

    DECLARE @t TABLE(doc XML)

    INSERT @t (doc)

    VALUES('

    <AUDITS>

    <Admin>

    </Admin>

    <provider_spells />

    <Refno>123456</Refno>

    <Action>UPDATE</Action>

    <Fields>

    <old_pmetd_refno></old_pmetd_refno>

    <new_pmetd_refno>4110</new_pmetd_refno>

    </Fields>

    </AUDITS>')

    SELECT f.fields.value('old_pmetd_refno[1]/text()[1]', 'INT'), f.fields.value('new_pmetd_refno[1]/text()[1]', 'INT')

    FROM @t

    CROSS APPLY doc.nodes('/AUDITS/Fields') f(fields)

    Drew

  • RE: count timespans without overlaps

    Here is an updated version that only requires a single scan of the table. There is a complete description of the logic at New Solution to the Packing Intervals...

  • RE: query and compare values in a text based column

    niall5098 (10/7/2016)


    HI There,

    it looks like sql but is actually text

    We said it was XML, not SQL, and XML IS text, but in a very specific format. Even if it's...

  • RE: Search string for matching pattern

    Luis Cazares (10/7/2016)


    Here's a query with three conditions that should fulfill your requirements.

    SELECT *

    FROM #tmp

    WHERE loginName LIKE '%_._%' --Has a period surrounded by other characters

    AND loginName NOT LIKE...

Viewing 15 posts - 2,266 through 2,280 (of 4,087 total)