User Tools

Site Tools


techprivate:powerschool:duplicateshortname

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

techprivate:powerschool:duplicateshortname [2012/08/29 12:44] (current)
afrink created
Line 1: Line 1:
 +====== Find duplicate short names ======
  
 +<code sql duplicateshortnames.sql>​
 +select * from (
 +select ps_customfields.getcf('​Students',​id,'​short_name'​) short_name,
 +count(*) as num
 +from students
 +where enroll_status = 0
 +and ps_customfields.getcf('​Students',​id,'​short_name'​) is not null
 +group by ps_customfields.getcf('​Students',​id,'​short_name'​)
 +) thelist
 +where num > 1
 +</​code>​
techprivate/powerschool/duplicateshortname.txt ยท Last modified: 2012/08/29 12:44 by afrink