Saving SQL Column Headers Results

SQL Tips
Saving SQL Column Headers Results Sometimes you can run into problems that tend to take up time and could have been solved in a minute.  One of these strange problems is when you attempt to save a Microsoft SQL query result grid to a CSV file. Using Microsoft SQL Server Management Studio (SSMS) Now most of DBA or Developers tend to use the Microsoft SQL Server Management Studio (SSMS) to do the necessary general SQL work.  As you expected when you execute a query the results grid appears displaying the results.  I as countless others tend to copy the information and save it in an excel spreadsheet to do further analysis.  But there are times you may need to save the information into a CSV file for the purpose of…
Read More

SQL Stored Procedures to get folder and files

SQL Tips
  SQL Stored Procedures to get folder and files There may be a time when you will need to get the file name contents from a folder for the purpose of using the information in your stored procedure.  The one undocumented stored procedure on Microsoft SQL Server 2016 is master.sys.xp_dirtree that you can use. In your stored procedure, we will go ahead and create a temporary table that will store the files with their correct extension.  The first thing we want to do is check whether the temporary table was left over and remove it.  Usually when you close out a session temporary tables will be destroyed but it is fine to check and do house cleaning in  your stored procedure. IF OBJECT_ID('tempdb..#FilesListing') IS NOT NULL DROP TABLE #FilesListing; The…
Read More

Nintendo announces the Switch game console

Computer PC Tips - bits and bytes, Hardware Reviews
Nintendo announces the Switch game console for March 2017 There isn't much information on the cost but it can be anywhere between $200 to $350 (USD).  This pricing is critical for Nintendo as to whether they think the Switch will compete against the Xbox or PS4.  Remember the Xbox one dropped it's price since the PS4 was winning on the console war.  Does this mean Nintendo cares about the war or are they going their own way with their fans? You can view the Switch console video which shows everybody either remotely, on planes, walking just playing their games.   Satoru Iwata, Nintendo "As proof that Nintendo maintains strong enthusiasm for the dedicated game system business, let me confirm that Nintendo is currently developing a dedicated game platform with a brand-new concept under the development codename 'NX'. It…
Read More

Getting performance statistics for cached stored procedures

SQL Tips
Getting performance statistics for cached stored procedures It is always extremely important to maintain your SQL server to the utmost efficiency.    DBAs review the database structure and whether certain pieces such as stored procedures, triggers, etc. can be tuned even further.  One of the areas that will be discussed are the stored procedure which can be used during any time as well as day.  Dynamic Management Views and Function (DMVs and DMFs) to identify resources used by stored procedures DMVs and DMFs were introduced in SQL Server 2005 and are able to obtain figures only for those stored procedures that have execution plans in the procedure cache.  The SQL Server engine starts gathering information about the performance of a stored procedure the first time that  the plan is placed in the…
Read More

Code Analysis what does it do for your application ?

Computer PC Tips - bits and bytes, Software development Concepts, Software Releases
Code Analysis what does it do for your application ? When developing an application you want to provide the best solution for your clients.  This means you need to evaluate current or possible future defects in your source code.  This is a reality during the development stage and is highly recommend that this is implemented in all cases. Necessary steps to do during the code analysis Identify potential errors and oddities. Identify from the produce warnings on why and how you can remove them. Check your code for coding convention compliance. Team code review. There are numerous packages that can be purchased to do simple to deep analysis.  Some packages are installed with the IDE you are using or are external but all have the similar need.  They have to…
Read More