Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 concat in 2000

Author  Topic 

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-09-28 : 05:09:46
Any idea why it behave like this in 2000 ?


declare @str varchar(8000)

print @@version
select @str = ''
select @str = @str + ''
from F_TABLE_NUMBER_RANGE(1,3)
print 'F_TABLE : ' + @str

select @str = ''
select @str = @str + ''
from (
select n = 1 union all select n = 2 union all select n = 3
) a
print 'TABLE : ' + @str

/*
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005 23:18:38
Copyright (c) 1988-2003 Microsoft Corporation
Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

F_TABLE :
TABLE :
*/




declare @str varchar(8000)

print @@version
select @str = ''
select @str = @str + ''
from F_TABLE_NUMBER_RANGE(1,3)
print 'F_TABLE : ' + @str

select @str = ''
select @str = @str + ''
from (
select n = 1 union all select n = 2 union all select n = 3
) a
print 'TABLE : ' + @str

/*
Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86)
Mar 23 2007 16:28:52
Copyright (c) 1988-2005 Microsoft Corporation
Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

F_TABLE :
TABLE :
*/



KH
[spoiler]Time is always against us[/spoiler]

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-09-28 : 05:12:52
quote:
Originally posted by khtan

Any idea why it behave like this in 2000 ?


declare @str varchar(8000)

print @@version
select @str = ''
select @str = @str + ''
from F_TABLE_NUMBER_RANGE(1,3)
print 'F_TABLE : ' + @str

select @str = ''
select @str = @str + ''
from (
select n = 1 union all select n = 2 union all select n = 3
) a
print 'TABLE : ' + @str

/*
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005 23:18:38
Copyright (c) 1988-2003 Microsoft Corporation
Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

F_TABLE :
TABLE :
*/




declare @str varchar(8000)

print @@version
select @str = ''
select @str = @str + ''
from F_TABLE_NUMBER_RANGE(1,3)
print 'F_TABLE : ' + @str

select @str = ''
select @str = @str + ''
from (
select n = 1 union all select n = 2 union all select n = 3
) a
print 'TABLE : ' + @str

/*
Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86)
Mar 23 2007 16:28:52
Copyright (c) 1988-2005 Microsoft Corporation
Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

F_TABLE :
TABLE :
*/



KH
[spoiler]Time is always against us[/spoiler]





Concatenating Beer?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-09-28 : 05:20:32
I have no idea why, but it has been documented many times here at sqlteam
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=72694
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=79083



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-09-28 : 05:22:04
This works though:

declare @str varchar(8000)

print @@version
select @str = ''
select @str = @str + ''
from
(
Select * from F_TABLE_NUMBER_RANGE(1,3)
) tmp
print 'F_TABLE : ' + @str


Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-09-28 : 05:40:02
quote:
Originally posted by Peso

I have no idea why, but it has been documented many times here at sqlteam
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=72694
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=79083



E 12°55'05.25"
N 56°04'39.16"




Oh, I must have missed these thread


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-09-28 : 05:47:53
quote:
Concatenating Beer?

Yeah, it is end of the day for me, feel like having a cold one right now


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -