Forum Replies Created

Viewing 15 posts - 946 through 960 (of 1,473 total)

  • RE: Min Max Quartile

    What is the performance of that cursor like? On my system, it ran for 7 minutes with the processor pegged at 100% before I stopped it (coming from my...

  • RE: Need to copy data from table to table with update statement

    Pat,

    What this all kinda boils down to, is that every solution here does exactly the same thing (assuming nobody typo'd an alias), it just shows different styles of...

  • RE: Min Max Quartile

    Excellent call Chris. The below shows an example of doing exactly that. The times are from my highly overloaded and underpowered dev box.

    [font="Courier New"]-------------------- SETUP --------------------------------

    CREATE TABLE #Product(

    ProductIdent      ...

  • RE: Get most recent record

    If you don't get an answer to this, it's likely because what you're asking for is somewhat obscure. Please refer to the link in my signature for how to...

  • RE: Need to copy data from table to table with update statement

    Egad I hate those commas on the left.:hehe:

    (I know I know, it makes it easier to comment out lines and such, but I still hate it)

    I do put each column...

  • RE: Need to copy data from table to table with update statement

    AS is optional. I've never liked it, and never use it. I'll even go so far as to remove it in a lot of cases. (For purely...

  • RE: Help with joining tables to exclude data

    Two main problems.

    1. You're using the wrong sign. Next Payment date is never > Maturity date, so you're not getting anything with the where. Switched it to...

  • RE: Need to copy data from table to table with update statement

    You were fine Pat, I think he meant HE posted to the wrong forum.

    The best practices post is the same one many of us (including myself) have in our signatures...

  • RE: Min Max Quartile

    Garadin (12/9/2008)


    Chris,

    Although it does seem like it might be more efficient due to the derived tables, the execution plans are virtually identical (once I add the aliases to your outer...

  • RE: Need to copy data from table to table with update statement

    populate/update the leaseNumber row in the MachineAudit table where the LeaseInfoImport.[computerName] = MachineName.[machineName]

    First...

    SELECT MA.MachineID, MN.MachineName, L.LeaseNumber

    FROM MachineAudit MA

    INNER JOIN MachineName MN ON MA.MachineID =...

  • RE: Create values in Stored Procedure based on date & date frequency

    Example Posted above.

  • RE: Create values in Stored Procedure based on date & date frequency

    You can do this using a Tally table.

    See the following article for an explanation of what a Tally Table is:

    http://www.sqlservercentral.com/articles/TSQL/62867/

    ---[Edit]---

    Here is an example:

    [font="Courier New"]DECLARE

    @StartDate VARCHAR(20),

    @Enddate VARCHAR(20),

    @User numeric,

    @Freq      VARCHAR(20)

    SET @Freq = 7

    SET...

  • RE: Query Help Please

    Mike Feuti (12/9/2008)


    OK let's try this. Is this what you are looking for?

    From name table:

    SELECT '10002',Walton@email.chop.edu,'Vernathan Walton' UNION ALL

    SELECT '10004',craig.engstrom@wfhc.org,'Craig W. Engstrom, CBET' UNION ALL

    SELECT '10006',,'Larry R. Pallatt, CBET'...

  • RE: Query Help Please

    Say for instance, you have a table Products with three fields, ProductIDent, ProductID and UnitPrice

    You could supply the information about this table like this:

    Table Products

    ProductIDent (identity)

    ProductID

    UnitPrice

    Data

    ProductID ...

  • RE: Min Max Quartile

    Chris Morris (12/9/2008)


    Kelvin Phayre (12/9/2008)


    I put 1.5m rows into a table and then ran your query. I then stopped the query before it crashed the server.

    I then took a different...

Viewing 15 posts - 946 through 960 (of 1,473 total)