SQL Help

jeffceccola
Rookie

SQL Help

Spoiler
 

Hi, I'm new to PowerSchool and haven't written any sql in 12 years so I need help. 

 

I have existing code that I need to add a field to.  Here is the code:

 

select s.student_number,
s.first_name,
s.last_name,
Decode (sd.HandEnteredByBuilding, '1', 'Yes', '0', 'No', '', 'No'),
Decode (sd.stu_AUPAgree, '1', 'Yes', '0', 'No', '', 'No'),
Decode (sd.stu_PhotoAgree, '1', 'Yes', '0', 'No', '', 'No'),
Decode (sd.stu_InternetRefusal, '1', 'Yes', '0', 'No', '', 'No'),
Decode (sd.stu_TextMessages, '1', 'Yes', '0', 'No', '', 'No'),
Decode (sd.stu_GoogleAppAgree, '1', 'Yes', '0', 'No', '', 'No'),
Decode (sd.STU_HANDBOOK, '1', 'Yes', '0', 'No', '', 'No'),
Decode (sd.stu_KINESTHETICLEARNING, '1', 'Yes', '0', 'No', '', 'No'),
Decode (sd.stu_EXTRACURRICULAR, '1', 'Yes', '0', 'No', '', 'No'),
sd.p_SigAgree,
sd.p_SigName,
to_char(sd.p_SigDate,'MM/DD/YYYY'),
s.home_room
FROM students s, U_DEF_EXT_STUDENTS sd
Where sd.studentsdcid = s.DCID
AND s.Enroll_Status = 0
AND s.schoolid IN %param1%
ORDER BY s.last_name

 

I just need to add the field - U_Students_Extension.PREFERRED_NAME that is in the students table.  I've tried several things but could not get it to run.

 

Thanks in advance for any help

1 Reply
KritiS
Community Support Expert
Community Support Expert

Hi @jeffceccola 

 

Since no member in the Community has provided insight on adding the field by an SQL query.  We recommend trying to creating the TextObjects where you can include text fields which would include HTML tags, PowerSchool fields, and PowerSchool data codes.

 

You can find more information on object-reports by reviewing the document on the same.



KritiS
Community Moderator

Remember to give Kudos to suggestions that help you!
If a suggestion helps solve your issue, please select Accept As Solution on the post so others can see the solution, too!