Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12345»»»

Old Dog, New Tricks Expand / Collapse
Author
Message
Posted Wednesday, February 1, 2012 10:26 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 4:39 PM
Points: 33,155, Visits: 15,291
Comments posted to this topic are about the item Old Dog, New Tricks






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1245461
Posted Wednesday, February 1, 2012 10:40 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, August 12, 2014 10:57 PM
Points: 458, Visits: 857
You can teach an old dog new tricks! Mythbusters proved that one :)

Coming from an Oracle background, I always use semi-colons, but strangely SSRS (using BIDS 2008) removes them automatically when you use them (in the rare event that I don't used a stored proc)

If you use Openquery from SQL Server to Oracle with the OraOLEDB.Oracle provider it returns an error "invalid character" if you use a semicolon in the passed-through query.

It might be ANSI but it's not consistently applied.

Post #1245463
Posted Thursday, February 2, 2012 12:29 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, June 3, 2014 8:16 AM
Points: 295, Visits: 1,011
Fun topic.

About alias, I do not agree. I think "as" is the way to go. It's standard and everyone understands it and you don't risk confusion, it also does not take any more time to write "as" than "=", if anything "as" goes faster.

About aging, it's been proven recently that people over 45 solves equations a bit more slowly than younger ones.

With that said, I feel some people now must raise their voices to redeem themselves and point to that experience and knowledge holds a high value as well and I do of course agree.
Also, it's common that engineers has an iq around 125, thus giving an advantage still over the general population, not that it matters except you have the ability to claim a more interesting job and complete it.

Then about learning new things, I do not think that has to do with age. I firmly believe some people are more interested and might also be better at grasping new concepts than others. It might just stand out more when someone who is old is not interested to learn. Then there is one more thing I'd like to point out, science has proven that our brain actually hurts a little when we learn new things and this might be a cause for pointing us towards old habits. Then of course some people are just plane lazy.
Post #1245500
Posted Thursday, February 2, 2012 1:21 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:38 PM
Points: 5,305, Visits: 2,985
I am a developer and am here to improve my knowledge of SQL Server especially my T-SQL

As a bit of a pedant when it comes to coding, I read the article and initially thought that I had learnt nothing. I currently use AS due to its explicit declaration of my intention (as covered by the article), however, as I know that even halfway decent articles always have a point, whether you agree with it or not, and the author said that he favoured = over AS I reread it.

It was when I looked at the side-by-side stored procedures example that it became clear. Literally!!!

I shall be using the = syntax moving forward. My reasoning? The intention is clearer to the reader. Not only of the alias but of the structure being returned. Removing ambiguity from code is the key to delivering a maintainable system.

As for standards? Well, SQL standards should be looking at issues and opportunities such as this but lets not hold our collective breath as it is a necessarily a slow process. Also I have yet to see a RDBMS migration project where they don't treat existing SQL statements as specifications for a rewrite. Anyone compared the various XML syntax?


Gaz

-- Stop your grinnin' and drop your linen...they're everywhere!!!
Post #1245519
Posted Thursday, February 2, 2012 1:42 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, June 10, 2014 11:31 PM
Points: 550, Visits: 48
Actually SQL Server is being changed iteratively, it is not evolving. It is being directed to a goal by intelligence.
Post #1245522
Posted Thursday, February 2, 2012 1:47 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, June 3, 2014 8:16 AM
Points: 295, Visits: 1,011
vmit02 (2/2/2012)
Actually SQL Server is being changed iteratively, it is not evolving. It is being directed to a goal by intelligence.


That also falls under the category of evolving.
Post #1245526
Posted Thursday, February 2, 2012 1:50 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:38 PM
Points: 5,305, Visits: 2,985
Sheesh...and I thought I was a pedant. Really guys, is this not straying off topic?

Gaz

-- Stop your grinnin' and drop your linen...they're everywhere!!!
Post #1245529
Posted Thursday, February 2, 2012 1:56 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, July 4, 2014 9:03 AM
Points: 1,415, Visits: 796
I've used the SELECT 1 x; format for years. (Oracle background).

I've never found it confusing - I don't now discard that format just because somebody else finds it confusing.

Matter of taste really.
Post #1245532
Posted Thursday, February 2, 2012 2:17 AM


Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: 2 days ago @ 10:23 AM
Points: 9, Visits: 401
I've used the = syntax for many years because it's so much easier for me to read. When there's a long case statement and I'm looking at someone else's T-SQL, I feel that it wastes my time if I have to sift through the lines to find out what the column name is.

BTW, I switched to using the JOIN ... ON syntax a few years ago, as well, for readability reasons.
Post #1245551
Posted Thursday, February 2, 2012 3:00 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 24, 2013 9:59 PM
Points: 1,354, Visits: 1,299
IceDread (2/2/2012)

About aging, it's been proven recently that people over 45 solves equations a bit more slowly than younger ones.

Really? I'd like to see that documentation. I'm over 45 and believe I solve problems and equations much faster than my younger peers. That's because I have more experience doing it. Maybe once they are my age, they can do it faster too.
Post #1245585
« Prev Topic | Next Topic »

Add to briefcase 12345»»»

Permissions Expand / Collapse