Viewing 15 posts - 7,006 through 7,020 (of 10,144 total)
a_ud (11/23/2010)
Thanks to all, but I'm still struggling to see what the problem is (and that would really help). Structures like this:
set @sql=<whatever>
exec(@sql)
usually work in dynamic SQL (I learnt...
November 23, 2010 at 7:36 am
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 '...
November 23, 2010 at 6:59 am
For ages up to 100, try
SELECT RandomAge = 1 + abs(checksum(newid()))%100
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...
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?
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...
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...
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 😉
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.
November 23, 2010 at 2:17 am
crookj (11/22/2010)
WOTD - turduckenJoe
Is this what they're calling the "Russian doll" roast?
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...
November 22, 2010 at 9:33 am
Wishing Jack C a speedy recovery and some quality time for recuperation.
Get well soon, mate.
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...
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...
November 22, 2010 at 6:33 am
Viewing 15 posts - 7,006 through 7,020 (of 10,144 total)