Forum Replies Created

Viewing 15 posts - 27,121 through 27,135 (of 59,101 total)

  • RE: Query join

    mrivero1961 (3/28/2013)


    mrivero1961 (3/28/2013)


    Sean Lange (3/28/2013)


    This is MySql. If you want to join multiple queries together you probably need to use UNION.

    I really can't tell from what you have posted what...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: SSIS question on CSV Import

    mak101 (3/29/2013)


    Many people may have faced this problem and I searched many solutions but somehow I could not hit the right one. Sorry for repeatative question.

    Here is my data in...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Multiple order by in a result set

    santhosh_ms3 (3/29/2013)


    Thanks All for your responses.

    i tried this and its working... but not sure how far its accurate as its based on physical location.

    my requirment is to get top 3...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Need help with a .bat for a stored procedure, please.

    AndrewSQLDBA (3/30/2013)


    Why not get away from the old fashioned batch files, and use a simple SSIS package? That would be so much more simple, more efficient and much more secure....

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Are the posted questions getting worse?

    Koen Verbeeck (3/28/2013)


    Totally unrelated - as usual in this topic - I got the MCSE Business Intelligence certificate today.

    Because someone has to answer all those BI questions on this forum...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Queries and tables

    lazarjojic (3/30/2013)


    Hi!

    I was wondering if I could find some queries and database tables for them. I would like to have some complicated tasks for which I need to write queries...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Assistance with this query

    tmac25 (3/29/2013)


    Bump, still working at this. 🙂

    Thanks!

    "Bump" indeed. Instead of going back and forth, over and over, post some data and tables for us to use so we can...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: How to preserve global temporary table data

    Another problem with doing it using a permanent table, whether in TempDB or some other database, is the chance of a naming conflict. You could go through some gyrations...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Return 1 record with data from multiple tables

    vinu512 (3/28/2013)


    This is how you can transform Mickey's query into a Dynamic Cross tab:

    Declare @sql Varchar(MAX)

    -- Set up some test data

    Create table product(ProductId Int, ProductName Varchar(30),CategoryID Int)

    Create table...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Return 1 record with data from multiple tables

    umarrizwan (3/29/2013)


    one easy solution, using xml path.

    SELECT P.PRODUCTID,P.PRODUCTNAME,C.CategoryID,C.CATEGORYNAME,

    STUFF((SELECT ',' + convert(varchar,PP.ProductQuantity)

    FROM ProductPricing PP

    WHERE PP.PRODUCTID=P.PRODUCTID

    FOR XML PATH('')),1,1,'') AS ProductQuantity,

    STUFF((SELECT ',' + convert(varchar,PP.ProductCost)

    FROM ProductPricing PP

    WHERE PP.PRODUCTID=P.PRODUCTID

    FOR XML PATH('')),1,1,'') AS ProductCost

    FROM...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Parse CC in String

    Laura_SqlNovice (3/29/2013)


    Hi Guys,

    I have a table with a column which is VARCHAR. This column has text and potentially Credit Card # and also has couple of dates. What I need...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: The Command Shell

    opc.three (3/30/2013)


    Once again you're focusing in too narrow a field and only considering SQL Server auditing, and only a piece of that to boot. What about the folks that kick...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: The Command Shell

    That's part of the misperception. For example and just like xp_CmdShell, there's no natural auditability or logging (and I'm not talking the LDF file) if someone deletes rows from...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: The Command Shell

    TravisDBA (3/29/2013)


    Another thing to remember here is that script injection is NOT just restricted to SQL. MSDOS commands can be injected in a string that is passed to an...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: The Command Shell

    Steve Jones - SSC Editor (3/29/2013)


    jfogel (3/29/2013)


    I agree that if you are vigilant with security then xp_cmdshell is just fine and I've used it for years. However, over the last...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 15 posts - 27,121 through 27,135 (of 59,101 total)