Home Forums SQL Server 2005 SQL Server 2005 General Discussion How to join multiple tables (SQL) to find the difference between an order and shipped quantities? RE: How to join multiple tables (SQL) to find the difference between an order and shipped quantities?

  • kaminskidevelopment (7/12/2013)


    Thanks for getting back to me so quickly!

    Is there any quick/easy way to pull these out of SQL Management Stuido, or do I have to hand write these statements for you?

    Thanks!

    The create table stuff is pretty simple. Right the table(s), the select "script table as -> create to -> ...". For the data you will probably want to hand write it. This does NOT need to be a complete data dump. Just a few rows in each table that will represent your situation. Of course, make sure you obfuscate the data as we don't want to see anything that might be private type of information.

    You can use SSMS to script data for you but the setup is somewhat tedious and by the time you are done with that you could have just done it manually.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/