Jim Denny
  • Posts: 1
  • Joined: 7/26/2018
If there a way to get the commas to format so they are next to columns in queries. The formatting for this comment strips out the spaces, what it is doing is putting the comma in the first column of the line and the column names under the end of the word "SELECT". So to give a good example I replaced the spaces with underscores. This is how it is now:
SELECT DISTINCT 'TSC - Project'
,______________'Configuration Lists'
,_______________CASE p_acct_grp_cd WHEN 'OTR' THEN 'DIR'+'-'+LEFT(a_acct_id,2)
________________________WHEN 'MRK' THEN 'PRM'+'-'+LEFT(a_acct_id,2)
__________________________________ELSE p_acct_grp_cd+'-'+LEFT(a_acct_id,2) END
,_______________''
,_______________''

and I have never seen commas formatted that way_ This would be preferred:
SELECT DISTINCT 'TSC - Project'
__________,'Configuration Lists'
__________,CASE p_acct_grp_cd WHEN 'OTR' THEN 'DIR'+'-'+LEFT(a_acct_id,2)
________________________WHEN 'MRK' THEN 'PRM'+'-'+LEFT(a_acct_id,2)
__________________________________ELSE p_acct_grp_cd+'-'+LEFT(a_acct_id,2) END
__________,''
__________,''
Another example, Not liking this:
DECLARE cursorX CURSOR FOR SELECT fy_cd
,_______________________________pd_no
,_______________________________sub_pd_no
,_______________________________sub_pd_end_dt

This is easier on the eyes:
DECLARE cursorX CURSOR FOR SELECT fy_cd
_______________________________,pd_no
_______________________________,sub_pd_no
_______________________________,sub_pd_end_dt
Similar Topics
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.