Home
Analytics
commenting dynamic sql queries
johnsonDMG
Morning, just had to ask is there any easier ways of commenting large dynamic sql queries other than manually doing it? I try to format the code so its easy to read. ex. "select 1 as RecType, ur.user_name, ra.entity_id, ps.jp_id as DutyStatus, ps.lname, ps.fname, ps.mi, ps.emp_stat_id as EmpStatId,
"ps.stud_id, ra.dmn_restriction_id, rd.dmn_id, " +
"(select pu.user_value from pa_stud_user pu where stud_id = ps.stud_id AND col_num = 1 ) as Rank, " +
"(select pu.user_value from pa_stud_user pu where stud_id = ps.stud_id AND col_num = 14 ) as Office, " +
"(select pu.user_value from pa_stud_user pu where stud_id = ps.stud_id AND col_num = 41) as Experience," +
"(select pu.user_value from pa_stud_user pu where stud_id = ps.stud_id AND col_num = 43) as Instructor," +
"(select pu.user_value from pa_stud_user pu where stud_id = ps.stud_id AND col_num = 44) as Evaluator " +
"FROM pa_user_prfl_role ur " + ....
Find more posts tagged with
Comments
mwilliams
Hi johnsonDMG,
If I'm understanding you correctly, I would guess that manually commenting your SQL query as you build it will probably be the way to do it.