Viewing 15 posts - 3,901 through 3,915 (of 5,588 total)
Man, I sure hope so. This is what I'm basing my future on!
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 24, 2010 at 10:05 pm
Returning 2.75 million rows in 14 seconds to the screen is pretty good.
That being said, I see one area where it might be improved upon.
When a column in a table...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 24, 2010 at 7:29 pm
I think this is what you're looking for. If so, you were pretty close.
;WITH CTE AS
(
SELECT EmpID,SuperID,
-- provide a unique ParentNumber (PN)...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 24, 2010 at 7:16 pm
rahulsony111 (6/24/2010)
Hi Wayne thanks a lot the code is working gudbut i am really new to CTE`s can you please explain the code wat is doing
Thankyou
Sigh.
Rahul, up above Falgunoza...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 24, 2010 at 6:49 pm
CirquedeSQLeil (6/24/2010)
GilaMonster (6/24/2010)
Another thousand posts for the thread. Anyone keeping track of how many days between the thousands? Might be interesting (or useless) statistics.
Wow that one sneaked right up on...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 24, 2010 at 5:57 pm
GilaMonster (6/24/2010)
Another thousand posts for the thread. Anyone keeping track of how many days between the thousands? Might be interesting (or useless) statistics.
It seems like on the days that Steve...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 24, 2010 at 5:56 pm
rahulsony111 (6/24/2010)
insert into @test-2
SELECT '1150b', '1150/' UNION ALL
SELECT '1150c', '1150a' UNION ALL
SELECT '1150d', '1150b' UNION ALL
SELECT '1150c',...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 24, 2010 at 2:17 pm
I'm not going to reformat your data into usable code again. I you want me to look at it, then you will need to at least put the new data...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 24, 2010 at 1:41 pm
if object_id('tempdb..#temp') IS NOT NULL DROP TABLE #temp
CREATE TABLE #temp (DBName sysname, UserName sysname, UserSID varbinary(85))
if object_id('tempdb..#temp2') IS NOT NULL DROP TABLE #temp2
CREATE TABLE #temp2 (UserName sysname, UserSID varbinary(85))
execute master..sp_msforeachdb...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 24, 2010 at 1:08 pm
george.greiner (6/24/2010)
I did not know what DDL script meant and was researching it =0. Thank you for your help.
George, please see the first link in my signature. If you...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 24, 2010 at 12:54 pm
In the first link you referenced is this
Note This information also applies to SQL Server 2008.
So, just use the sp_help_revlogin procedure to script them out, and then run the...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 24, 2010 at 12:33 pm
Taking the idea of a staging table to the next level, how does this work out for you?
declare @test-2 table (data varchar(100), cust_id int null)
insert into @test-2 (data)
select 'A, 1,...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 24, 2010 at 10:20 am
GabyYYZ (6/24/2010)
CirquedeSQLeil (6/23/2010)
WayneS (6/23/2010)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 24, 2010 at 9:34 am
How's this?
select *
from #tt
left join #tt1
on #tt.theDate = #tt1.theDate
...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 23, 2010 at 9:49 pm
Rem-487422 (6/23/2010)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 23, 2010 at 8:31 pm
Viewing 15 posts - 3,901 through 3,915 (of 5,588 total)