Quantcast
Channel: beyondrelational.com
Browsing all 25 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Merge statement and identity insert - SQL Server

Today I asked by my friend for merge statement and identity insert, how to insert identity column data using merge statement? I posted for the merge statement without identity insert. Please read that...

View Article



Image may be NSFW.
Clik here to view.

#0235 - SQL Server - T-SQL Deprecated feature - Start using semi-colons as...

A while ago, I read a post from Aaron Bertrand (B|T) regarding an appeal to start using semi-colons actively as statement terminators. Semi-colons as statement-terminators has been around for as long...

View Article

Image may be NSFW.
Clik here to view.

SSIS - Split single row to Multiple rows

Its been a long long time since I have blogged. So have I been away from forums hence no ideas to blog. I was back at forum today and got a nice scenario. How do you split a single row to multiple...

View Article

Image may be NSFW.
Clik here to view.

#0239 - SQL Server 2012 - Msg 402 - The data types datetime and time are...

Microsoft SQL Server 2008 came with a wide array of T-SQL enhancements. One of them was the ability to split a DATETIME value into DATE and TIME values. From a storage standpoint this allowed us to...

View Article

Image may be NSFW.
Clik here to view.

Could not find the Distributor or the distribution database for the local...

A few days back, I spoke about the manual failover of mirroring and also explained one issue and workaround too. Continuing with the same failover, I want to express one more issue here. This issue is...

View Article


Image may be NSFW.
Clik here to view.

Question of the month February 2013 - How does HAVING clause work without...

When you run the following codeselect name from sys.objects having 1=1you get the following error Msg 8120, Level 16, State 1, Line 2 Column 'sys.objects.name' is invalid in the select list because it...

View Article

Image may be NSFW.
Clik here to view.

Merge statement with TOP clause - SQL Server

A week ago, I posted for Insert, Update and Delete statement with TOP clause and Merge statement as individual post. If you not read those posts then read it before to move next. In this posts I used...

View Article

Image may be NSFW.
Clik here to view.

Print screen for Remote Desktop

Earlier on Beyondrelational I read a tip, for the same topic. combination of keys Shift + Print screen, allows us to take screen shot of Remote Desktop. But recently I faced problem using these keys....

View Article


Image may be NSFW.
Clik here to view.

Skip distributor agent error in sql server transactional replication - How to

A while before few weeks, I discussed about an error of replication “The row was not found at the Subscriber when applying the replicated command”.  We had a tricks to get discrepancies for error table...

View Article


Image may be NSFW.
Clik here to view.

Import data - solving data convertion and truncation error

Often developers use Import wizard from SSMS or SSIS to import data from a text file into a table. You may or may not import it successfully based on the nature of the data.Create a text file named...

View Article

Image may be NSFW.
Clik here to view.

GO statment

Today i studied an interesting thing related to GO statment See in the following queries executed .***The batch preceding GO will execute the specified number of times***. create table test( id int not...

View Article

Image may be NSFW.
Clik here to view.

How to increase the number of characters retrieved from the server for XML...

You may worked with xml and you may aware of title mentioned in this post. Today when I was working to collect information from one table which having xml column, I was trying to open xml data result...

View Article

Image may be NSFW.
Clik here to view.

BCP - Changing the default column terminator

BCP is one of the fastest methods to export data to various formats like csv,txt,etc and doing this in a command mode is faster than doing it via SSMS.Let us create this simple tablecreate table...

View Article


Image may be NSFW.
Clik here to view.

Adding/Modifying files and filegroup in Database - SQL Server

You all know about the database file structure as whenever we created databases without specifying file location and filegroups , they will be created in default path and default filegroup. Here i have...

View Article

Image may be NSFW.
Clik here to view.

Handling multiple resultsets returned from Stored Procedure

One of my friends asked me if it is possible to load multiple resultsets returned from a stored procedure into a temporary table for some analysis purpose. The answer is "It depends". If all the...

View Article


Image may be NSFW.
Clik here to view.

Failed to acquire connection. Connection may not be configured correctly -...

This week, I resolved one issue which I received continuously which is noting but exactly displayed in post title.  The issue occurred  when I ran ssis package with batch file or scheduled job and same...

View Article

Image may be NSFW.
Clik here to view.

Conditional aggregation - SUM Vs COUNT

You can do conditional aggregation like SUM(CASE WHEN .. THEN 1 ELSE 0 END),....etc to find a count for a particular match. This type of conditions are useful when you want to write a CROSS-TAB/PIVOT...

View Article


Image may be NSFW.
Clik here to view.

Moving table or indexes on another filegroup - SQL Server

Because of data growth and performance issue we need to move tables or indexes to other filegroups. The purpose of moving tables or indexes to improve the database performance as it reduce I/O from...

View Article

Image may be NSFW.
Clik here to view.

The EXECUTE permission was denied on the object 'xp_sqlagent_enum_jobs' - SQL...

Recently while working with one query to get schedule jobs status, i used xp_sqlagent_enum_jobs object which gives details of state values of all jobs in msdb database and this is undocumented object....

View Article

Image may be NSFW.
Clik here to view.

When exactly scheduled jobs started and completed - SQL Server

Some days ago, i worked to get failed jobs detail and an alert for the same. I used some system tables from msdb database to fetch the details for same. And msdb.dbo.sysjobhistory is one of the table...

View Article
Browsing all 25 articles
Browse latest View live




Latest Images