In this issue

Featured Contents

Editorial

Featured Script

 
 advertisement
 
SQL Source Control Database source control in just 5 minutes
It takes just 5 minutes to connect your SQL databases to source control. Got 5 minutes to spare? Get started now.
 
SQL DBA Bundle ‘Beating Backup Corruption’
The DBA Team are back, revealing more of their ‘Top 5 Hard-earned Lessons’. Lesson two is out now! Learn to beat backup corruption.
 
SQL Data Compare Save time when comparing and synchronizing database contents
"It has also streamlined our daily update process and cut back literally a good solid hour per day." George Pantela, GPAnalysis.com. Download a free trial of SQL Data Compare now.

In This Issue

Stairway to PowerPivot and DAX - Level 3: The DAX DISTINCT() Function and Basic Distinct Counts

Bill Pearson, Business Intelligence architect and author, exposes the DAX DISTINCT() function, and then provides some hands-on exposure to its use in generating distinct counts. Moreover, he further explores working with measures in the PivotTable in this, the third Level of our new Stairway to PowerPivot and DAX series. More »


SQL Saturday #192 - Tampa

Come and join SQL Saturday Tampa in their new venue (HCC) now that they've outgrown K-Force! More »


Full Text Searches on Documents in FileTables

SQL Server's FileTable technology is an intriguing way of accomodating file-based text data in a database, and allowing for complex searches. As with most technologies, the best way of learning them is to try it out and experiment. Feodor shows how to set it up, add some sample data and set up full-text search. More »


From the SQLServerCentral Blogs - A Month of PowerShell – Day 20 (Databases: Table-Valued Functions)

Welcome to Day 20 of my “A Month of PowerShell” series. This series will use the series landing page on... More »


Editorial - Look Beyond the First Result

This story about Orbitz was very interesting in the way metadata about users was affects the results of queries on the Orbitz site. It's slightly skewed to imply Orbitz was charging OSX users more than Windows users, but that doesn't seem to be the case. Instead, if an OSX user was detected, the order of search results was changed to show more expensive options first. Users were understandably upset, as some of them ended up paying more for services than they might have otherwise.

However is this a valid way to present the data? From the business side of things, this makes sense. If you identify a trend, you may look to exploit it or incorporate the potential results into your decision making. I could even see some sort of business intelligence system making this decisions automatically, without human intervention. As we build more sophisticated software, using a large set of inputs, I could see exactly this type of thing occurring more frequently.

Is it fair? Is it moral? Those are tough questions. We often want to go where the data leads us, and while many of our human tendencies don't make any sense, the data sometimes shows patterns in our behavior. In the end, I'd argue this was a very poor model of the data. All Mac users aren't looking to spend more money on goods or services just because they might have purchased a more expensive computer. There are likely quite a few other qualifications inputs that should be considered as well.

» Join the debate, and respond to today's editorial on the forums


The Voice of the DBA Podcasts

We publish three versions of the podcast each day for you to enjoy.

Everyday Jones

The podcast feeds are available at sqlservercentral.mevio.com. Comments are definitely appreciated and wanted, and you can get feeds from there. Overall RSS Feed: or now on iTunes!

Today's podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com.

You can also follow Steve Jones on Twitter:

» To submit an article, rant or editorial, log in to the Contribution Center


Question of the Day

Today's Question:

What will the outcome be after running all the following statements as 1 batch?

-- Statement 1
Select
       1 As [RowId]
     , 'True or False: The HAVING clause is the 4th phase of logical query processing?' As [Question]
     , 'True: 1-FROM, 2-WHERE, 3-GROUP BY, 4-HAVING, 5-SELECT, 6-ORDER BY.' As [Answer]
     , '15 Jan 2013' As [PublishDate]
  Into
       #TempQoD;

-- Statement 2
Select * From #TempQoD;

-- Statement 3
Drop Table #TempQoD;
GO
Note: This was only tested with SQL Server 2008 SP3

Think you know the answer? Click here, and find out if you are right.

This question is worth 1 point in this category: T-SQL. We keep track of your score to give you bragging rights against your peers.

We'd love to give you credit for your own question and answer. To submit a QOD, simply log in to Contribution Center.

SQL Server 2012 Integration Services Design Patterns

SQL Server 2012 Integration Services Design Patterns is a book of recipes for SQL Server Integration Services (SSIS). Design patterns in the book show how to solve common problems encountered when developing data integration solutions. Because you do not have to build the code from scratch each time, using design patterns improves your efficiency as an SSIS developer. In SSIS Design Patterns, we take you through several of these snippets in detail, providing the technical details of the resolution.

Get your copy from Amazon today



Featured Script

Powershell - Query SQL Servers Operating system details

The script works through the CMS you have set up to manage your environment and gathers various server information. More »


Database Pros Who Need Your Help!

Here's a few of the new posts today on the forums. To see more, visit the forums.

SQL Server 2005 : Administering

Statistics - ' Auto Update Statistics ' - 'Auto Update Statistics Asynchronously' - I have option [b]' Auto Update Statistics ' set to true[/b] and option [b]''Auto Update Statistics Asynchronously' set to False [/b]....

Avoid DEADLOCK for concurrent DELETE - Hi ALL, I have a table called Products which has many columns. It is a temporary table used for reporting purpose. The...

updating service pack on sqlserver 2005 - Hi All One of our sql production server is running the below version -- i want to update the latest service pack/patch...

Problem with connecting 2 SQl 2005 Servers - Hi I am running SQL 2005 Standard edition under Windows Small Business Server 2003. Everything, that I need runs just fine from...

Replication and mirroring can be working for New VM server - With this new concept, is there any new approach regarding SQL database replication/mirroring in the virtual server concept? As today, we...

Named Pipes Provider: Could not open a connection to SQL Server [53] - I am running SQL Server 2005 - 9.00.3042.00 On a Windows 2003 server service pack 2. I have a VB application...

Best Practice for Database Owner? - I have a SQL 2005 server with a dozen databases in production use. I'd like to know what is recommended...

SQL Server 2005 : Backups

Restore failed for Server. (Microsoft.SqlServer.Smo) - I have been trying to restore a backup to my test server and keep getting the following error. I am...

SQL Server 2005 : Business Intelligence

Adding percentage on a tablix - Hello I've got a report which has this output below month Leads 2012 Leads 2013 Oppos 2012 Oppos 2013 Enquiries 2012...

How to Unzip the zipped file - Hi, I have a WinZip file with the .dat.gz extension and i need to unzip that zip file and extract the...

SQL Server 2005 : CLR Integration and Programming.

how to create user group logins in SQL server 2005 - I just want to create a group login then all the users i will create i'l just add them to...

SQL Server 2005 : Development

Partitioned Tables - i have one table it contains 30 million records, Now I have partitioned the Table, I could not find much...

The OLE DB provider "SQLNCLI" for linked server "X" reported a change in schema version between compile time - Hi , I encountered the following error mssg The OLE DB provider "SQLNCLI" for linked server "X" reported a change in schema...

SQL Server 2005 : SQL Server 2005 General Discussion

set index for this query in sqlserver - i'm starter in sqlserver indexing. i have one table with this Structure [quote] REATE TABLE [dbo].[Report3]( [Id] [int] IDENTITY(1,1) NOT NULL, [Mesc]...

SQL Server 2005 : SS2K5 Replication

merge replication - what data on the publisher refers to a specific subscriber? - Hi fellow DBAs, Talking about merge replication, sql server 2005 sp2 standard edition. I am doing some research on this, but does...

SQL Server 2005 : SQL Server Express

Joins on three tables - I have three tables namely, TBL_SRTAPPGROUPPOWER , TBL_SRTTICKETMASTER and TBL_MARVEL_STATUS which has status id 1to25 I wrote the following query to fetch the...

SQL Server 2005 : SQL Server 2005 Integration Services

Setting Connection in Execute Package task - I want to create a variable that sets the file path of the child SSIS package. In the Expression tab...

Difference between IsSorted and Sort transformation - Hi Everyone, I have 2 data sources that get merged using a merge join. I set the IsSort property and SortKey...

SQL Server 2005 : SQL Server Newbies

Moving Secondary Database in Transaction Log Configuration - I’ve been tasked with moving a production database server that is involved in log shipping. I am not a DBA...

SQL Server 7,2000 : General

List of Open DB sources - Hi Guys,:-) Need your help to suggest the list of open DB sources with advantages & limitation. Thanks & Advance. Gopal k

How to read a Data from Tally to SQL Server 2008 - Hi Guys, Need your inputs to proceed the ETL from Tally6.3 source to Sql server Database using ODBC method (with out TDL/XML...

SQL Server 2008 : SQL Server 2008 - General

Unable to make column NOTNULL in indexed view - I am trying to setup indexed view replication from A --> B So far we have applied ISNULL (as shown in...

LIKE Operator OR Regular Expressions? - If I have a table with a field in it called RECIPE_NAME and I want to see which recipes have...

Monitor CPU with Extended Events - Hello, We are undergoing a consolidation effort and desire to monitor CPU usage to help evaluate which workloads to consolidate and...

how to put my sql request within an application to disaply result? - Hi i have some request i would like to put them in one application so it's can display all the...

Does the query optimizer make use of transitive equality? - Does the query optimizer make use of transitive equality? By that I mean if A = B and B = C, then...

Can anyone know deployment of spotlight - Hi i need to deploy Spotlight ... So what are the things i should know and any easy way of doing...

How to Update SAP BO Objects - Hi All, Not sure it is the right forum, but can anyone suggest if it is possible to approve SAP Business...

How to get consolidated Data in Yearwise manner..? - [size="3"][font="Times New Roman"]Hi All, Below T-Sql Query collect consolidated data between two dates which is used as a parameters. Now My...

An easier way to implement this process? - Please consider the following process: I have a source tables in the database which contain contact information such as name and...

Sql server 2008 R2 , Database growth setting - Hi Friends, I am observing a around 100 GB growth in the database size due to database growth setting of around...

Storing DOC files in SQL Server - Is it advisable to store the entire .doc/.xml/.csv file of large size into the db, or should I only save...

Installing sql server 2008 in command line - I am using command line to install sql server 2008 automatically in silent mode.But if i select mixed authentication then...

automate database script in sql server 2008 - Hi All, Automate database script in sql server 2008 either in T-sql or SSIS Package. If any one knows Please share Regards, Saranya

Find the palindromic word: if you have any idea please share me - Hear to find the palindromic words from a sentence. Palindrome is a word reading the same backward as forward. Example: Input...

Current sql server servicepack on passivenode - Hi All, Is there any way to find out sql server service pack level on passivenode, on active node sp2 hasbeen...

ntile or something similar - Hi, Im trying to group the below sample data into 4 equal parts and cant quite get it right. Hoping someone can...

summing value for a time period - Hi, I got a number of transactions for a given day. I’m trying to calculate the sum of transactions for the...

strip out unmatched text with in a group - Hi Experts, I need to do is remove all the words that are not contained in every record of the...

Recent Interview Question ? please help - After loading data from SSIS package to target table is it possible to split data from target to dimension and...

Subquery error - Hi, I have the following query IF(SELECT 1 FROM VERSION WHERE PATINDEX ('7.0%', VERSION)> 0 OR PATINDEX ('7.1%', VERSION)> 0 OR PATINDEX ('7.2%', VERSION)>...

Need help with a select, insert - GOAL: insert into tblcompanyassignments from tbluserassignments. Only attempt the insert for userid that exist in both tbluserassignments and tblexistingusers. For...

Virtualization reviews - i have to Assess server landscape –Server reviews –Virtualization reviews –OS/patch level reviews can any one help me out regarding Virtualization reviews. what does it...

What, if any, is the best type of replication for implementing on hundreds of databases on one server? - Hi all, We have a 2 node (active/passive) SQL 2008 SP1 Enterprise Cluster that hosts about 500 databases. Now while the Cluster...

Data Not Getting Inserted Into DATABASE - Hi, Data is not getting inserted into my Database. The Size of the DB is 40 GB. Auto Growth has been set...

how to get date difference in years month and date - Hi all, how to get difference in year month and days from 2 date values? Ex:10/aug/2010,12/oct/2010 then result is Res:0...

SQL Server 2008 : T-SQL (SS2K8)

Complex SQL QUERY with DateDIFF - Hi all, I need to script a query to discard access logs that not exceeding a predetermined margin (eg. 2 seconds)....

PK Violation with same Case Sensitve values - How can I accomodate DUP keys where Case Sensitive values should distinguish the 2 rows. Example, I have a table...

Interesting Question in SQL - Hi Everyone.... I have a table (no Primary Key defined) with some value and I need to create a view on...

Using the While loop to create temp tables based on a list table - Hi, Say I have the following A list of codes in a temp table ‘A’ ‘B’ ‘P’ ‘V’ ‘X’ ‘Y’ ‘Z’ And I have to do for example SELECT * INTO #Example_Table_A...

How to shrink TempDb - I have read a few posts on how to shrink TempDb but I am not even sure if "Shrink" is...

Hierarchy example - Ken Henderson's book - not working - I’m working on the hierarchy lesson in Ken Henderson’s The Guru’s Guide to Transact-SQL. He wants to show two things....

Show all data from four tables joined or matched on a particular column - Hello all. I am trying to select computer names from a number of tables and display them ordered. I have been...

index is not working while using ROW_NUMBER - Hi, I have used Row_Number() to implement the paging in my stored procedure. Paging is working fine. But problem is, after...

Require serial access to table, Stored Procedure, TABLOCKX - Hi all. Database newbie. I have a one off requirement to rename all our computers on the domain. (hundreds) Part of the...

UDF Help - Hi Guys, I want to create UDF. Below is my logic. Please guide me where i am wrong. Alter Function [dbo].[udf_GPList](@EID int,@PID...

Looking to select last time tables were queried - I need a query to show all tables in a database sorted by last datetime queried ordered oldest first. Can...

In --> Group By with Multiple columns...> how it will responds - can any please help me...! Thanks & Regards Prasad Reddy

NEWID() - How does it work? - Okay, I have generalize SQL quesiton that I think belongs in this forum more than the General Quesitons. In my...

Grouping sets - Hi All, how to use the groupingsets to a query having more than 32 columns plz help out

SQL Server 2008 : SQL Server Newbies

Combine Results from two Queries - I have the following two queries: [code="sql"]SELECT ID, Color, Date1, Standing, Name, Date2 FROM VW_Tbl1 WHERE Date1 < '2012-01-01 00:00:00.000' AND (Standing='Good' OR...

stuck on trying to do a large import - Hi All I am trying to do a large import with the below code for many thousands of rows from an...

SQL Server 2008 : Security (SS2K8)

What is user account 'NT AUTHORITY\ANONYMOUS LOGON' ? - I have recently inherited a SQL Instance containing a number of databases. These databases contain a user account called 'NT AUTHORITY\ANONYMOUS...

Script Logins - Hi All Is there any way to script out all the Logins on a SQL Server instance, including server level privileges,...

SQL Server 2008 : SQL Server 2008 High Availability

SQL DTC Confusion - Hi All I am trying to figure out the ins and outs of DTC and how SQL uses it. Does SQL only...

Current SQL Server servicepack on passivenode - Hi All, Is there any way to find out sql server service pack level on passivenode, on active node sp2 hasbeen...

The credentials you provided for the SQL Server Agent service are invalid - Hi, I'm receiving the following error while running through the install [code="plain"] [Error Message] The credentials you provided for the SQL Server Agent service...

SQL Server 2008 : SQL Server 2008 Administration

SQL installatin SLIPStrem - I am the first time trying to use the FullslipStream download file to install SQL server 2012. the download is...

UCP and MDW Data Collectors / SQL Jobs - I have set up MDW and UCP - can someone clarify if the 'collection_set_5_noncached_collect_and_upload' SQL job is acually related to a...

bcp error - Dear Experts I exported data table by bcp succesfully in txt file, I want to import this file in different sql...

export to flat file is failed - Dear Experts I am trying to export data from table to a flat file but this error recured on several fields Error...

Is the sql seeing a network latency issue?? - Hi, Our SharePoint 2010 farm, with the SQL 2008(active/passive) on Windows is a 2 node cluster using the SAN storage. On the...

Programming : General

column selection on dynamic basis - Hi, How can i select columns of a table dynamically through a select statement if the column name need to be...

Programming : Powershell

Getting printers on a remote PC in a workgroup - I'm trying to learn PowerShell. So I did a [b]Get-Help Get-Printer -examples[/b] and saw that I can issue the command...

SQLServerCentral.com : Anything that is NOT about SQL!

advice on how to promote my skillset? - Hi everybody, I didn't really know where to post this question, but I guess this sub-forum could do. I apologise in...

Talking baseball - Okay, a topic that has NOTHING to do with SQL . . . Came across [url=http://www.sqlservercentral.com/Forums/Topic447796-4-1.aspx]this link[/url] describing the SSC point scoring descriptions,...

Today's Random Word! - HI When you woke up today, or logged-onto Opera Forums, you may have had a dream, a thought, a scene...

Are the posted questions getting worse? - Is it me, or are the posted questions getting worse these days? I just read a post by someone apparently in...

SQLServerCentral.com : SQLServerCentral.com Website Issues

Stairway Suggestion - SSAS - This is rather selfish, but I'm tasked to become my company's SSAS Guru. Is there an SSAS Stairway in the...

Data Warehousing : Integration Services

need to upload file daily cumulative - I've been tasked in creating an ssis solution which extracts data once a day, loads specific fields and exports them...

Import from .Excel .xls failis on 2012 - ( Origally posted in the 2012 forum, but I haven't had any replies. apologies!) Hi, I am seeking some assistance in troubleshooting a...

Data Warehousing : Analysis Services

MSSDSRV.EXE or MSSQLServerOLAPService won't take more 50% of CPU - The resource governor is not on, can't seem to figure out why it won't go beyond 50%. It's a hard...

Filtering cube from value on a fact table - Hi all, I'm posting here cause my research didn't help me at all :( I'm lookig to filter data via a role...

Timing dimension processin - Hi, Currently looking at two dimensions that seem to vary in processing time. Everything else is reasonably consistant in processing times....

How to handle historical data change in SSAS - I am a novice to SSAS and I was wondering if there is a way to process historical data change...

Creating dimension from Fact table. - Hi, I have 2 tables in my warehouse database one fact table and one dimension table. 1. TransFact 2. TimeDimension TransFact (Columns) ----------------------- Id (PK) TransDate...

Microsoft Access : Microsoft Access

About making select queries in Microsoft Access - Hello everyone, I have a project to make select queries from given database information but I was trying all day to...