May 26, 2009 at 6:02 am
Good to know. Thanks for trying it out.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 26, 2009 at 6:35 am
...You could really mess with people's heads with this.
Well it obviously did with yours 😛
Far away is close at hand in the images of elsewhere.
Anon.
May 26, 2009 at 6:37 am
David Burrows (5/26/2009)
...You could really mess with people's heads with this.
Well it obviously did with yours 😛
Yeah, but I'm a head case on the best days. I'm talking about normal people.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 26, 2009 at 6:41 am
...I'm talking about normal people.
I thought it was a prerequisite that normal people were not allowed on this forum :crazy: :w00t:
Far away is close at hand in the images of elsewhere.
Anon.
May 26, 2009 at 6:41 am
SQL Server takes the numeric value up to the first Alpha character as a numeric value (SELECT 1.) and the alpha characters that follow are then the alias for the column.
Except for SELECT 1.eColumnName
Far away is close at hand in the images of elsewhere.
Anon.
May 26, 2009 at 7:04 am
David Burrows (5/26/2009)
SQL Server takes the numeric value up to the first Alpha character as a numeric value (SELECT 1.) and the alpha characters that follow are then the alias for the column.
Except for SELECT 1.eColumnName
Works for me. Returns a single row value of 1 with a column header of ColumnName.
May 26, 2009 at 9:01 am
I've actually seen this before. Don't remember where, but we came to the same conclusion that it's a whitespace parsing thing.
Would make a good QotD submission, Grant.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
May 26, 2009 at 9:37 am
GSquared (5/26/2009)
I've actually seen this before. Don't remember where, but we came to the same conclusion that it's a whitespace parsing thing.Would make a good QotD submission, Grant.
I submitted one last week. Look for it in September.
May 26, 2009 at 11:42 am
john.arnott (5/26/2009)
GSquared (5/26/2009)
I've actually seen this before. Don't remember where, but we came to the same conclusion that it's a whitespace parsing thing.Would make a good QotD submission, Grant.
I submitted one last week. Look for it in September.
Cool biz.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
May 27, 2009 at 1:17 am
Lynn Pettis (5/26/2009)
David Burrows (5/26/2009)
SQL Server takes the numeric value up to the first Alpha character as a numeric value (SELECT 1.) and the alpha characters that follow are then the alias for the column.
Except for SELECT 1.eColumnName
Works for me. Returns a single row value of 1 with a column header of ColumnName.
What I was referring to was SQL Server takes the numeric value up to the first Alpha character
SELECT 1.eColumnName
returns
ColumnName
1.0
My bad for not highlighting the right bit :blush:
Far away is close at hand in the images of elsewhere.
Anon.
May 28, 2009 at 2:26 am
I've just tried this on a SQL 6.5 DB and it produces the same result so this must go way back! How cool! 😀
May 28, 2009 at 8:14 am
I also noticed that the SSMS correctly colorizes it too.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 29, 2009 at 5:55 am
Try:
SELECT
30.AString
,50.E-3AnotherString
,10.E0SomethingElse
into dbo.TempTable;
select * from dbo.TempTable;
You can see that SQL try to parse the number till the not numeric character and then take the rest as alias to the column.
Izhar Azati
May 29, 2009 at 7:33 am
izhar (5/29/2009)
Try:
SELECT
30.AString
,50.E-3AnotherString
,10.E0SomethingElse
into dbo.TempTable;
select * from dbo.TempTable;
You can see that SQL try to parse the number till the not numeric character and then take the rest as alias to the column.
Izhar Azati
Same results also in SQL Server 2005!
Many things is going to be happened that we didn't know before ...:hehe:
Viewing 14 posts - 31 through 43 (of 43 total)
You must be logged in to reply to this topic. Login to reply