-
The symbol dot (.) plays a major role when you write queries It is mainly used to speicify the columns for the respective tables when a join is used as you see in the following example select t1.col1,t1.col2,t2.col3,t2.col4 from table1 as t1 inner join table1 as t2 on t1.col1=t2.col1 But sometimes the...
-
This challenge is all about searching for two keywords in a string with a maximum distance of 'one word' between them.. http://beyondrelational.com/puzzles/challenges/38/search-for-two-keywords-within-the-maximum-distance-of-one-word-between-them.aspx
-
Moved to http://beyondrelational.com/modules/19/tsql-beginners/323/tsql-beginners-challenge-11-find-three-most-recent-builds-of-each-application-from-xml-log.aspx?tab=info
-
One of my friends asked me if it is possible to export each table's data to each text file so that those files can be used in another system for data import? The point is he wanted to move database from SQL Server to Mysql. But there was not possible to have a connectivity between the two systems...
-
I am somewhat uncomfortable blogging this, as I feel that it falls into “Polish a turd” category. Having said that, it is a particularly ugly turd and it does polish up rather well. Though as the saying goes, it is still a turd. The evils and inadequacies of UDF (User Defined Functions) in...
-
This post aims to be a quick reference source for the beginners and shows a few simple SELECT examples. Reading attributes from an XML variable DECLARE @x XML SET @x = '<author fname="Michael" lname="Howard" />' SELECT @x.value('(/author/@fname)[1]', 'VARCHAR...
Posted to
Jacob's Blog
by
Jacob Sebastian
on
07-01-2010
Filed under:
Filed under: XQuery-Functions, XQuery-Labs, XML, XQuery, SQLSERVER, BRH, XQuery Tutorials, XQuery Lab, XQuery Functions, xquery-lab, #XML, #XQUERY, #TSQL, SQL Server XQuery, XQuery in TSQL, XQuery Training
-
This post follows my previous three posts Part I Part II Part III Best practices when using datetime values 1 Always use proper DATETIME datatype to store dates This is very important becuase lot of people use varchar datatype to store formatted date values. Only if you use datetime datatype, you will...
-
It’s as simple as that. If you don’t specify ORDER BY, then the order of your result set is not guaranteed. Oh sure , there may be situations where the data looks like it is being returned ordered, but this is not really the case. So, for example : CREATE TABLE #Example ( row_id INTEGER ); GO INSERT...
-
A few weeks back, I published a function named XMLTable() that helps to query XML documents easily. The idea behind the function is to be able to blindly query XML documents just like you do a ‘SELECT *’ on a relational table. Not only that this function helps you to query XML documents easily, it also...
-
We have completed the ‘tricky testing’ of TSQL Challenge 24 and the result is published here . The data used for the tricky testing is given here .
-
For the last four weeks, we have been able to accomplish our goal of completing the evaluation of a challenge every week. The goal for this week is to complete the evaluation of TSQL Challenge 24 . We have crated a sandbox for the tricky testing and you can find it here (Thank you Lutz for volunteering...
-
This post follows my previous two posts about datetime http://beyondrelational.com/blogs/madhivanan/archive/2010/05/25/understanding-datetime-column-part-i.aspx http://beyondrelational.com/blogs/madhivanan/archive/2010/05/25/understanding-datetime-column-part-ii.aspx Now we will see some example queries...
-
Moved to http://beyondrelational.com/modules/19/tsql-beginners/322/tsql-beginners-challenge-10-clean-up-alphanumeric-strings-by-splitting-digits-and-letters.aspx?tab=info
-
One of the questions that might come to your mind while getting started with FILESTREAM is the way FILESTREAM directories and files are named. Within the FILESTREAM Data Container, SQL Server creates a root folder per FILESTREAM enabled table. If the table is partitioned, a folder will be created for...
-
In this edition of T-SQL Tuesday, Jorge Segarra ( Blog | Twitter ) asks us what our favorite new feature of SQL 2008 or 2008 R2 is. I've decided to focus on the T-SQL and query writing enhancements of 2008. Before I do so though, let me preface this by noting that in no way do...