Viewing 15 posts - 2,656 through 2,670 (of 5,588 total)
The solution to this is in recognizing that you need to identify the "islands" - the start/end positions of each contiguous range of values.
The first thing that I'm going to...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 30, 2010 at 9:40 am
First of all, I'd recommend these two indexes (your code benefits from these also!):
CREATE INDEX [Cover1] ON [dbo].[aa_BillBillingAgreement](BaiOffice) INCLUDE (BaiPKey, AgrPKey);
CREATE INDEX [Cover1] ON [dbo].[aa_BillBillingAdjustments](BiaBillingDate, BiaInvoiceApproved, BiaStartDate) INCLUDE (BaiPKey, BiaEndDate,...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 29, 2010 at 7:08 pm
mbender (10/29/2010)
Ya i guess i really don't know the difference between a temp table and a variable table.
I'd suggest this article that I wrote: Comparing Table Variables to Temporary Tables[/url]
BTW,...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 29, 2010 at 7:02 pm
SELECT Field1, Field2 = count(*)
FROM YourTable
GROUP BY Field1
ORDER BY Field1
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 29, 2010 at 9:48 am
Peter Rijs (10/29/2010)
Nicely worked out solution, I liked some comments in your code a lot :w00t:
Thanks. Just realize that the function is coded by Jeff Moden, not me.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 29, 2010 at 9:38 am
If you look on the download page at Microsoft, you will see that this is version 10.00.2531.00. Since R2 RTM is 10.50.1600.1, it's not applicable.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 29, 2010 at 9:19 am
Lynn Pettis (10/29/2010)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 29, 2010 at 8:53 am
What you would need to do is to load these files into a staging table with one large column.
Determine which rows have the extra delimiter, and delete the extra delimiter.
Here's...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 29, 2010 at 8:39 am
Craig Farrell (10/28/2010)
CREATE TRIGGER trg_Celko ON vw_SSC_PostList FOR AFTER INSERT
AS
-- Go read the documents, inline comments are for sissies.
IF EXISTS (SELECT...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 29, 2010 at 7:40 am
So you've got two SQL Spackle articles already done? You really are quite the hot-shot.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 28, 2010 at 10:41 pm
Lynn Pettis (10/28/2010)
jcrawf02 (10/28/2010)
1 - we're all talking too much about Celko, and frankly, you're...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 28, 2010 at 10:34 pm
Lynn Pettis (10/28/2010)
Jeff Moden (10/28/2010)
nshah6 (10/28/2010)
Thank you !You guys are Great. I really appreciate this ! ๐
I consider this problem RESOLVED !
Maybe so but you should consider it to...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 28, 2010 at 10:08 pm
Stefan Krzywicki (10/28/2010)
Roy Ernest (10/28/2010)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 28, 2010 at 7:46 pm
You know, the people that help out here are all un-paid volunteers, so please HELP US HELP YOU. Providing the DDL scripts (CREATE TABLE, CREATE INDEX, etc.) for the tables...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 28, 2010 at 7:43 pm
Jeff Moden (10/28/2010)
Brandie Tarvin (10/28/2010)
Now I'm obsessing about...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 28, 2010 at 7:40 pm
Viewing 15 posts - 2,656 through 2,670 (of 5,588 total)