Viewing 15 posts - 286 through 300 (of 708 total)
...the impact on the log file, possible fragmentation, etc. The tables themselves are small (typically 2-5 columns and anywhere from 5 - 100 records each) and we would be...
July 23, 2015 at 11:47 am
drew.allen (7/22/2015)
;
WITH table_ranked AS (
SELECT iINDEX, PARENTID, DOCUMENTID, QTY, REVNR, XREFID
,DENSE_RANK() OVER(PARTITION BY PARENTID ORDER BY REVNR DESC) AS dr
FROM #TableA0
)
SELECT...
July 22, 2015 at 10:00 pm
Are you using T-SQL commands that were new in SQL 2005, such as PIVOT, CTEs, ROW_NUMBER(), RANK_(), TILE()?
Later versions of SQL Server allow you to use new T-SQL even though...
June 25, 2015 at 9:33 pm
PIVOT will produce your results, provided that you are willing to specify the type names when you write the query:
SELECT [Supplier Name], Onions, Potatos, Chocolate
FROM
(SELECT s.nam AS [Supplier...
June 5, 2015 at 11:32 am
You can use literal values and variables much the same way you reference columns in a SELECT statement, and you may mix them.
This shows adding a literal Domain value to...
December 5, 2014 at 1:43 pm
Try this instead:
SELECT DISTINCT SalesAccountNumber
FROM Sales.SalesOrderHeader
WHERE SalesEndDate!='30/12/3049'
It's the same query with a lot less work.
December 5, 2014 at 11:06 am
How are you licensing SQL Server?
If you want to (legally) download anything but freeware/trialware, then you'll need access an account with Microsoft that includes download rights, such as an...
November 18, 2014 at 7:29 pm
Yeah, those are SQL Server 2000 temp table habits. There were some improvements in SQL 2000 SP4, but SQL2005 and SQL2008 introduced a variety of tempdb improvements:
- Deferred compilation...
October 8, 2014 at 4:14 pm
In Windows clustering, any given instance (and the databases in it) are only live on one of the servers in the cluster at a time. No built-in load-balancing is possible.
Clustering...
June 15, 2014 at 8:35 pm
Try this next time:
COUNT(*) OVER ()
June 9, 2014 at 8:36 pm
The first order of business would be to add more space to tempdb, unless you truly know that this is a one-time or rare event. Given that you can't readily...
June 2, 2014 at 12:19 am
Hooray for attribute-centric XML! Makes stuff way easier.
The main trick here is to turn all of the <TargetModel> nodes into a table so we can go after each of the...
January 5, 2014 at 11:54 pm
Are you attempting to connect using your Windows domain credentials (user Domain\UserName)? If so, you don't specify user name or password. You just have to set it to use Windows...
November 7, 2013 at 5:30 pm
The code below works (substitute table column name for @x in the code below), but only if each element contains one or less of each child element. As in, there...
November 7, 2013 at 5:21 pm
I've never seen anything like that. But it was nice of the company to show you that working there would suck before you waste time on an interview.
September 10, 2013 at 10:29 am
Viewing 15 posts - 286 through 300 (of 708 total)