Viewing 15 posts - 7,006 through 7,020 (of 10,143 total)
Watch the scope of your @Events table variable:
DECLARE @Events TABLE ([Name] varchar(120))
DECLARE @Id INT, @sql VARCHAR(2000)
SET @Id = 3
SET @sql = 'SELECT TOP 10 [Name] ' + 'FROM dbo.syscolumns '...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 23, 2010 at 6:59 am
For ages up to 100, try
SELECT RandomAge = 1 + abs(checksum(newid()))%100
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 23, 2010 at 6:30 am
wagner-670519 (11/23/2010)
I need the information about the biggest hit rate.
When I search for 99911 both rows matches, 999 and 99911. But the hit rate of 99911...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 23, 2010 at 6:25 am
MonsterRocks (11/23/2010)
but i have 20 columns in table1...Should i add 20 columns in table2 too?
Surely just the keys (primary keys) would be sufficient?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 23, 2010 at 5:12 am
if object_id('tempdb..#table1') IS NOT NULL DROP TABLE #table1;
if object_id('tempdb..#table2') IS NOT NULL DROP TABLE #table2;
if object_id('tempdb..#table3') IS NOT NULL DROP TABLE #table3;
create table #table1 (col1 int,col2 varchar(30), col3 varchar(30));
insert into...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 23, 2010 at 4:51 am
MonsterRocks (11/23/2010)
any idea ?... cursor inevitable?....
Don't think so. Try this, it's the same as yours with the little errors removed, mostly column types:
if object_id('tempdb..#table1') IS NOT NULL DROP TABLE #table1;
if...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 23, 2010 at 3:59 am
All of us began our SQL Server lives knowing nothing at all about it and we didn't learn what we now know overnight 😉
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 23, 2010 at 3:49 am
CirquedeSQLeil (11/22/2010)
crookj (11/22/2010)
WOTD - turduckenJoe
Have a duchikey myself.
This looks mouthwateringly good but has an eyewatering price.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 23, 2010 at 2:17 am
Ventilation
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 22, 2010 at 10:16 am
crookj (11/22/2010)
WOTD - turduckenJoe
Is this what they're calling the "Russian doll" roast?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 22, 2010 at 9:48 am
CirquedeSQLeil (11/22/2010)
Chris Morris-439714 (11/22/2010)
Wishing Jack C a speedy recovery and some quality time for recuperation.Get well soon, mate.
Did I miss something more than the burnout?
Our DBA caught some news on...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 22, 2010 at 9:33 am
Wishing Jack C a speedy recovery and some quality time for recuperation.
Get well soon, mate.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 22, 2010 at 8:43 am
MonsterRocks (11/22/2010)
create table #table1 (col1 int,col2 varchar(30))insert into #table1 values (1,'martin')
insert into #table1 values (2,'tom')
insert into #table1 values (3,'schrof')
create table #table2(t_col1 int identity(1,1),t_col2 int)
create table #table3 (f_col1 int identity(1,1),f_col2 varchar(30),f_col3...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 22, 2010 at 8:06 am
MonsterRocks (11/22/2010)
create table #table1 (col1 int,col2 varchar(30))
insert into #table1 values (1,'martin')
insert into #table1 values (2,'tom')
insert into #table1 values (3,'schrof')
create table #table2(t_col1 int identity(1,1),t_col2 int)
create table...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 22, 2010 at 6:33 am
Hi Dom
I did a lot of Crystal reports from 3 to 2 years ago. Stored procedures were far away the best data source then, but I can't even remember the...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 18, 2010 at 7:54 am
Viewing 15 posts - 7,006 through 7,020 (of 10,143 total)