bigator

Archive for the ‘Script’ Category

Retrieving id of inserted record: What to use @@IDENTITY or SCOPE_IDENTITY() or OUTPUT

Hi guys, This seems very basic information but need to know properly. Issue: I need to find out or have the id of the records which I inserted in table. Analysis: This requirement seems very simple but there could be various cases where you would not get the correct id just by using @@IDENTITY function. Think […]

bigatorFebruary 6, 2013 · bigatorKhilitchandra Prajapati · bigatorNo Comments
bigatorTags: , , , , , ,  · Posted in: Business Intelligence, Free, General, Interview QA, Quick Fix, Quick Tips, Script, SQL Server, SQL Server 2012, SQLServerPedia, T-SQL, Training, Tutorial

The Story of Precision, Scale, and Length in SQL Server

Hi guys, Did you ever faced issues with BIG mathematical figures – related to either overflow or any  other arithmetic errors. This may be applicable to SQL arithmetic operations or arithmetic  operations you do with SQL table in SSIS etc. Well, check 1 more time, if you have any issues in your database design related […]

bigatorJanuary 28, 2013 · bigatorKhilitchandra Prajapati · bigatorOne Comment
bigatorTags: , , , , ,  · Posted in: Business Intelligence, Free, General, Interview QA, Quick Fix, Quick Tips, Script, SQL Server, SQL Server 2012, SQLServerPedia, SSAS, SSIS, SSRS, T-SQL, Tutorial

Tracking Down Ghost Characters: WHERE Clause Does Not Work Properly In T-SQL Query

Hi guys, I would like to share an experience with you when I was working on 1 SSIS related issue. Scenario was: I have to exclude some records from Table A by matching some keys of Table B.  Table A Year Month CustomerCode <Extra Columns> 2012 JAN CX1000   2012 JAN CX2000   2012 JAN […]

bigatorJanuary 25, 2013 · bigatorKhilitchandra Prajapati · bigatorNo Comments
bigatorTags: , , , , , , , , ,  · Posted in: Business Intelligence, Free, General, Interview QA, Quick Fix, Quick Tips, Script, SQL Server, SQL Server 2012, SSIS, T-SQL, Tutorial

View is not showing newly added column in table

Hi all, This is for the people who still use “Select * From Table” in their SQL Views. I don’t know what is the reason that you are using this way to create your views, but you could be the victim of this scenario (see… what title says). Let me show you how you can […]

bigatorJune 27, 2012 · bigatorKhilitchandra Prajapati · bigatorOne Comment
bigatorTags: , , , , ,  · Posted in: General, Interview QA, Quick Fix, Quick Tips, Script, SQL Server, SQL Server 2012, T-SQL, Tutorial

Enhanced “Generate Scripts” dialog box in SQL Server 2012 RC0

Hi All, I have been monitoring the “Generate Scripts…” functionality of SQL Server Database. One thing bothers me for last few years or since SQL Server 2005 is that once I right-click on any database -> Tasks -> Generate Scripts, I would expect to generate scripts only for that database which I have selected. But […]

bigatorFebruary 19, 2012 · bigatorKhilitchandra Prajapati · bigatorOne Comment
bigatorTags: , ,  · Posted in: Script, SQL Server


bigator