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

Strings and Defaults Expand / Collapse
Author
Message
Posted Wednesday, February 1, 2012 8:16 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:11 AM
Points: 7,687, Visits: 9,406
Brigadur (2/1/2012)
Maybe, a warning message would be the most elegant and a good compromise.

Cheers
Istvan

I'd prefer to have a configuration option that determines whether it's a warning message or an error (default being error).


Tom
Post #1245093
Posted Wednesday, February 1, 2012 8:24 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Monday, September 15, 2014 11:54 AM
Points: 4,107, Visits: 3,423
L' Eomot Inversé (1/26/2012)
nice question.

Evey time I recall that default varchar length is 1 for declare but 30 for cast I feel sick and resolve never to use varchar without specifying the length.

Nice new avatar, Tom.
Post #1245098
Posted Wednesday, February 1, 2012 8:27 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: Monday, March 10, 2014 9:39 AM
Points: 579, Visits: 27,690
L' Eomot Inversé (2/1/2012)
Brigadur (2/1/2012)
Maybe, a warning message would be the most elegant and a good compromise.

Cheers
Istvan

I'd prefer to have a configuration option that determines whether it's a warning message or an error (default being error).


That's a good idea! With the warning option, i was thinking of all existing code out there (not mine of course ) that relies on defaults.
Post #1245100
Posted Wednesday, February 1, 2012 8:55 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: 2 days ago @ 10:57 AM
Points: 3,323, Visits: 1,988
+1
Post #1245123
Posted Wednesday, February 1, 2012 4:06 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, September 12, 2014 5:33 AM
Points: 900, Visits: 1,489
Brigadur (2/1/2012)
[quote]L' Eomot Inversé (2/1/2012)
That's a good idea! With the warning option, i was thinking of all existing code out there (not mine of course ) that relies on defaults.


+1.

Error messages could break existing code but there could be a session SET option that could possibly show warnings to most common coding mistakes perhaps. Like some recommended guidelines. But with advices from people here, not only the SQL Server team (who love procedural coding sometimes).

And profiler has two events for catching deprecated code. Maybe a few more events there?


Best regards,

Andre Guerreiro Neto

Database Analyst
http://www.softplan.com.br
MCITPx1/MCTSx2
Post #1245382
Posted Wednesday, February 1, 2012 10:56 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, February 6, 2014 4:15 AM
Points: 1,242, Visits: 1,546
Very nice question and pointing very important note. Thx



Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
www.GrowWithSql.com

Post #1245465
Posted Tuesday, February 7, 2012 8:15 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: Friday, June 13, 2014 3:03 PM
Points: 594, Visits: 655
Great question!

Peter Trast
Microsoft Certified ...(insert many literal strings here)
Microsoft Design Architect with Alexander Open Systems
Post #1248151
Posted Thursday, February 9, 2012 2:10 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, November 5, 2013 6:08 AM
Points: 1,079, Visits: 591
Yahh neehhhh... At least I know now.

What you don't know won't hurt you but what you know will make you plan to know better
Post #1249543
« Prev Topic | Next Topic »

Add to briefcase «««12345

Permissions Expand / Collapse