Viewing 15 posts - 3,091 through 3,105 (of 5,588 total)
SSMS 2008 - Multiple Server query question.
When I open up a normal query window connected to just one server, I can drag a file onto it, and a new window...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 28, 2010 at 3:20 pm
erdem1973 (9/28/2010)
Thank you very much for your great comment.Is it really such a complex query issue to get running totals of a table?
Regards
You're welcome.
Until Microsoft decides to fully implement the...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 28, 2010 at 2:19 pm
Check out this article: Select * from XML[/url] - it seems like it would do what you're asking for.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 28, 2010 at 2:15 pm
Please read this article[/url] - just be sure to follow all the rules in using this form of the update statement - they must be followed or you can get...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 28, 2010 at 12:52 pm
With all this talk about the clustered index, and churn on the date field, don't forget that all of those numerous non-clustered indexes will be converted to carrying the clustered...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 28, 2010 at 12:43 pm
This query will produce the table name, and a comma-separated list of columns in that table.
SELECT DISTINCT
t.name,
...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 28, 2010 at 11:18 am
This code will show you which tables are missing from each environment. Note that it will require a linked server from one server to another (or if running from your...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 28, 2010 at 11:07 am
I'm not sure that this would fall into the "wide range" that you're looking for Steve, but here's my take on these:
Ordering for aggregates (used to allow subsequent framing options)
Framing...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 28, 2010 at 10:12 am
How's this?
;
WITH CTE AS
(
-- First, get the Row # for each customer, and the row # for each customer/esn_num
SELECT *,
CustRowID = ROW_NUMBER()...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 28, 2010 at 10:03 am
I'd like to suggest that you read the first (or first two) links in my signature. Then, instead of those images, please post some CREATE TABLE and INSERT statements to...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 28, 2010 at 9:36 am
Doctork11 (9/28/2010)
Let me lay...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 28, 2010 at 9:33 am
I think that this says it all for me:
Most professionals will stay late, pull the all-nighter, really help out when it's needed in a crisis. Just don't ask them...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 28, 2010 at 8:27 am
How's this?
DECLARE @test-2 TABLE (
RowID INT IDENTITY PRIMARY KEY CLUSTERED,
MyXML XML);
INSERT INTO @test-2
VALUES ('<Root>
<Data>
<Test attr = "http://">
<Node1>testname</Node1>
<Node2>retrieve this</Node2>
</Test>
</Data>
<Data>
<Test attr = "http://">
<Node1>testname</Node1>
</Test>
</Data>
<Data>
<Test attr = "http://">
<Node1>testname2</Node1>
<Node2>also retrieve this</Node2>
</Test>
</Data>
</Root>');
/*
--...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 28, 2010 at 6:57 am
byrdmom2 (9/28/2010)
I get the following error message:The isnull function requires 2 argument(s).
CC didn't count the parenthesis correctly. This should work:
--***get the information from both tables and concatenate date and city
select...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 28, 2010 at 6:43 am
How about:
WHERE Column1 LIKE '%' + Column2 + '%'
Note that starting off with a '%' will mean that you won't effectively be able to use an index.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 27, 2010 at 6:50 pm
Viewing 15 posts - 3,091 through 3,105 (of 5,588 total)