Viewing 15 posts - 211 through 225 (of 902 total)
Is this a test that you are setting up?
_________________________________________________________________________
SSC Guide to Posting and Best Practices
July 3, 2013 at 8:50 am
You need to look at using a recursive CTE to traverse the Hierachy with a bit tweaking of the example in BoL (http://msdn.microsoft.com/en-us/library/ms186243(v=sql.105).aspx)
This should give you a good starting...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
July 3, 2013 at 7:51 am
I would suggest you read this article by Gail https://www.simple-talk.com/sql/database-administration/gail-shaws-sql-server-howlers/
Also this white paper http://msdn.microsoft.com/en-us/library/dd578580(SQL.100).aspx on Partitioning and indexing strategy.
_________________________________________________________________________
SSC Guide to Posting and Best Practices
July 2, 2013 at 4:07 am
You might want to look at the GROUPING SETS functionality or ROLLUP/CUBE grouping for this.
http://msdn.microsoft.com/en-us/library/bb522495(v=sql.105).aspx
SELECT
OrderDate
AVG(CAST((ProductPrice * OrderQuantity) AS MONEY)) AS AverageSale
FROM TEST3
WHERE DATENAME(WEEKDAY, OrderDate) = 'Saturday' AND
Year(orderdate) =...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
June 21, 2013 at 7:43 am
ashwinboinala (6/20/2013)
i am getting this value from sysjobhistroy table from msdb there its in int format if u can give me solution where i can filter that table thats fine
Wouldnt...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
June 20, 2013 at 8:41 am
Another option may be to use a Recusive CTE's to replace the Hierarchy Joins that you are using.
_________________________________________________________________________
SSC Guide to Posting and Best Practices
June 19, 2013 at 2:32 am
Suresh Kumar Maganti
I agree the bulk insert method is the better way, especially with the One off lock on the destination table, rather than the 700 million lock...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
June 19, 2013 at 2:17 am
I think you missed the point that chris was making, if you look at his example he uses an Inline CTE to act as a Tally table.
As you have a...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
June 18, 2013 at 10:41 am
GilaMonster (6/18/2013)
Jason-299789 (6/17/2013)
Once paritioned you shouldnt need to run any DBCC commands unless you are moving data and want to check the integrity afterwards.???
Sorry Gail,
If you are adding a...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
June 18, 2013 at 5:38 am
I've seen this behaviour before, and tracked it down to when the outer reference was either coming from a JOIN or from a derived table.
In the end I inserted...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
June 17, 2013 at 9:55 am
Partitioning table in SQL server is generally considered a maintenance process.
As for the column, most people I can think of use a Time based solution (Period, Year, Day) depending on...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
June 17, 2013 at 8:38 am
m.rajesh.uk (6/14/2013)
Gail you are talking about SQL 2014 .. does it released or what...
http://www.microsoft.com/en-us/sqlserver/sql-server-2014.aspx
_________________________________________________________________________
SSC Guide to Posting and Best Practices
June 14, 2013 at 7:37 am
PaulB-TheOneAndOnly (6/14/2013)
No SQL Server 4.2? 6.0? 6.5? 7? on the poll? that's discrimination! 😛
What about 7.5?
_________________________________________________________________________
SSC Guide to Posting and Best Practices
June 14, 2013 at 7:28 am
+1. Definately easier to read Chris, Formatting FTW.
_________________________________________________________________________
SSC Guide to Posting and Best Practices
June 14, 2013 at 4:30 am
This is the problem
(SELECT SUM([VALPAYPLAN])
FROM ABC
WHERE DATE <= Getdate() AND ([TYPE] = 'PAYMENT') GROUP BY ID )
You need to add an additional filter to this sub query
SELECT...
_________________________________________________________________________
SSC Guide to Posting and Best Practices
June 14, 2013 at 4:10 am
Viewing 15 posts - 211 through 225 (of 902 total)