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.
| Author |
Topic |
|
dnf999
Constraint Violating Yak Guru
253 Posts |
Posted - 2007-05-10 : 12:31:15
|
HiI was just wondering what is the standard formatting when it comes to writing queries. Can anybody point me to a website.i.e. how best would it be to format the below query (spaces and tabs etc)select * from Supplierswhere MATCHKEY_Address1_Postcode in(select MATCHKEY_Address1_Postcodefrom Supplierswhere len(MATCHKEY_Address1_Postcode) > 0group by MATCHKEY_Address1_Postcodehaving count(*) > 1)order by MATCHKEY_Address1_Postcode Thanks! |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-05-10 : 12:34:57
|
| everyone has their own way of writing it. Sometimes people are picky and want all keywords in caps etc. In one of my previous jobs, a guy got fired for improper formatting in SQL code.Dinakar NethiSQL Server MVP************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
dnf999
Constraint Violating Yak Guru
253 Posts |
Posted - 2007-05-10 : 12:41:14
|
| lol that is harsh!! |
 |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-05-10 : 12:53:49
|
| Yes, you cannot afford to be picky when you are beginning to learn but once you become the boss you can so.. check out the SQLRefactor tool from red-gate software. I used their trial version and have liked "most" of their formatting. At least you can have something to start with.Dinakar NethiSQL Server MVP************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
|
|
|