AmosFiveSix.com

Experience, Knowledge, Creativity

  • Increase font size
  • Default font size
  • Decrease font size
Home SQL
SQL

SQL Server Management Studio Tricks

E-mail Print PDF

This post was inspired by Quick poll : what is your favorite Management Studio tip or trick? by Aaron Bertrand on SQLblog.com.

My favorite SMSS (2005 for me) tricks include:

  • CTRL-Tab for switching between windows.
  • CTRL-R for showing and hiding the results pane.
  • Include column headers when copying or saving the results options under Tools | Options | Query Results | SQL Server | Results to Grid.
  • Highlight any table or view name in T-SQL and hit Alt+F1 for sp_help and a list of its fields. (Suggested by dan from the above mentioned post.)

More tips here: DAT315 – Session Review for SSMS Tips & Tricks Session by Bill Ramos.

 

More SQL Server 64-Bit Issues

E-mail Print PDF

Here are some more issued we encountered when moving up to a 64-Bit SQL Server 2005. 

  •  64-Bit Product level is insufficient errors - This happened to us because we didn't have full SSIS installed on the server, just the development version.
  • 64-Bit Offline Mode is True error - This just required a regsvr on a DLL.
  • 64-Bit Linked Server Error - 64-bit SQL Server calls a stored procedure that doesn't exist on linked SQL 2000 servers. Creating a wrapper around a similar existing procedure fixed the problem for us.
  •  

    64 Bit SQL Server SSIS Packages with Excel and Access Data

    E-mail Print PDF

    If you've just switched to the 64-bit version of SQL Server and have SSIS packages that access Excel or Access, you may find that you packages stop working. That's because the JET driver that is used to access Excel and Access is 32-bit only. SSIS normally uses the 64-bit DTExec to run SSIS packages, it has not access to the 32-bit drivers. Here are some articles with all the details and work arounds

    Quick Reference: SSIS in 32- and 64-bits
    http://toddmcdermid.blogspot.com/2009/10/quick-reference-ssis-in-32-and-64-bits.html

    SSIS Snack: SSIS, Excel, and a 64-bit OS
    http://sqlblog.com/blogs/andy_leonard/archive/2010/01/19/ssis-snack-ssis-excel-and-a-64-bit-os.aspx 

    64-bit Excel Driver in Microsoft Office 14
    http://dougbert.com/blogs/dougbert/archive/2009/08/28/64-bit-excel-driver-in-microsoft-office-14.aspx

    Excel (and Access) Data Source in 64-bit environment
    http://ssis.trigonblue.com/Excelin64bitenv/tabid/523/Default.aspx

    Read more...
     

    How to Check for the Continental United States

    E-mail Print PDF

    This information is based on the United States Postal Service standard abbreviations for states and territories: http://www.usps.com/ncsc/lookups/usps_abbreviations.html

    If your data needs to include addresses for the continental United States only, it's best to check if the address's state is included in the list of continental states, rather than checking if the state is not in the list of non-continental states.

    For example, this incorrect SQL snipit allows addresses in Guam and other territories to pass through:

    WHERE store.State NOT IN ('AK','HI','VI','PR')

    This is the correct code to check for continental United States:

    WHERE store.State IN ('AL', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY') AND store.Country = 'United States'
     



    Subscribe

    Subscribe by e-mail:

    Site Search

    Google Ads