Question: Is there some kind of plug in you can get for Microsoft SQL management studio that will:  

1) help you format your sql (configuration, so we can get it to match our codeing guidelines)  

2) highlight syntax that does not match our coding guidelines

For example if a tool could format the sql so that all selects look like:

```
SELECT
    tbl1.[ColumnX]
    tbl2.[ColumnY]
FROM
    tbl1 
JOIN
    tbl2 ON tbl1.[tbl2ID] = tbl2.[ID]
WHERE
    tbl2.[ColumnZ] = 'XYZ'

```

Also if the tool could highlight situations were there are ON ERROR statements and suggest we use TRY CATCH for example.

Hopefully there are plugins that integrate right into the management studio.

Answer: 
Have you looked at SQL Prompt Pro from Red Gate ? It has layout functionality allowing you to layout your SQL to a shared style. 

<http://www.red-gate.com/products/SQL_Prompt/index.htm>
You might want to check out [Toad SQL Server beta](http://www.toadworld.com/Products/ToadforSQLServer/tabid/217/Default.aspx)

Andy