PS Query & SQL

 View Only
Expand all | Collapse all

Are you using AI at all with your query/SQL?

  • 1.  Are you using AI at all with your query/SQL?

    Posted 09-23-2025 09:33 AM

    I used chatgpt for the first time today to fix my PS Query expression and was just wondering if you guys have done this at all?  I had a LISTAGG expression and it was throwing a "string concatenation too long" error so I went into chatgpt and said, this is my expression and this is the error I'm getting, can you fix it?

    And it did.  It added "ON OVERFLOW TRUNCATE WITHOUT COUNT" which I can honestly say I've never used before.

    This query is a bit of a beast and runs long so I might run it in batch, but I am now getting this data back without an error message so I'm happy with the results.

    So, have you used AI/chatGPT (something else?) in your SQL world?  



    ------------------------------
    Dana Pawlowicz
    Business Systems Analyst Sr - ERP
    University of Cincinnati
    ------------------------------

    Message from the HEUG Marketplace:
    ------------------------------
    Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
    ------------------------------
    Alliance 2026 Registration is Open!


  • 2.  RE: Are you using AI at all with your query/SQL?

    Posted 09-23-2025 09:47 AM
    Dana,

    Thank you for sharing! I do confess, though I have been tempted, but I haven't come across the challenge yet like yours to use it ��.

    Mital Naik

    UT Arlington

     




    Alliance 2026 Registration is Open!


  • 3.  RE: Are you using AI at all with your query/SQL?

    Posted 09-23-2025 09:59 AM

    I have to admit that I use an AI to help me create XSLT style sheets to accommodate varying formats (ie – tab or pipe delimited..etc).

     

    I have also asked it to help me when stuck with a complicated problem with SQL.  I've found it to be helpful (sometimes after a few iterations/questions).

     

    Natalie

     

     

     

     

    Natalie Maines
    Senior Business Systems Analyst, Data Analytics and Reporting

    Student Information Services and Systems (SISS)

    Duke University

    1121 West Main St., Suite 2200

    Durham, NC 27701

    natalie.maines@duke.edu

    Tel +1.919.684.1263

     

     

     




    Alliance 2026 Registration is Open!


  • 4.  RE: Are you using AI at all with your query/SQL?

    Posted 09-23-2025 10:08 AM

    I need to create an XSLT in the next month or so, so that's good to know.  😊

     




    Alliance 2026 Registration is Open!


  • 5.  RE: Are you using AI at all with your query/SQL?

    Posted 09-23-2025 10:25 AM

    I haven't yet (I've still be just using Google with mostly successful results), but I am definitely going to try AI today now!

     

    Rachael Daniel

    Director, Systems & Data Analysis

    Division of Strategic Enrollment Management & Student Success

    University of Wisconsin-Milwaukee

    414-229-4277

    rdaniel@uwm.edu

    My pronouns are she/her/hers

     

     




    Alliance 2026 Registration is Open!


  • 6.  RE: Are you using AI at all with your query/SQL?

    Posted 09-23-2025 11:04 AM
    I have definitely used "my creepy friend" AI to help with SQL! At first I was hesitant to give it too much information. I don't know maybe I thought it was going to hack PeopleSoft or something. Haha. But now, I will just flat-out copy/paste my SQL into there and let it help me.

    As others mentioned, if your request is complicated, you may need to iterate. It'll give me code, I'll try to run it, but then I'll just go back to the conversation to say "now I get xxx error" and let it try again. Sometimes it isn't about a command that I don't know, but just another approach that just worked a little better. 

    I've also used it to build an HTML table that is accessible. Yes, I could've used Google to look up commands and worked through it. But, giving it the data (not student data!) and saying "give me the HTML" worked well. I verified the result (I don't trust it that far), but it was still faster than me slogging through the code.

    -- Sarah

    --
    Sarah Hoegger
    Business Analyst | ASR-IT, Student Financials
    Academic Support Resources | asr.umn.edu
    Office of Undergraduate Education | University of Minnesota
    hoegg001@umn.edu | 612-625-2956



    Alliance 2026 Registration is Open!


  • 7.  RE: Are you using AI at all with your query/SQL?

    Posted 09-23-2025 11:30 AM

    I have used ChatGPT (I call it Chet, although I do like the "creepy friend" term, Sarah) to help figure out issues with my queries.  It has helped me detect issues with my expressions too. I generally use it as a last resort when I can't figure something out or if I'm pressed for time. It has been helpful. 



    ------------------------------
    Raven Sumner
    FA/AA Business Systems Analyst/Functional Architect
    University of Nevada-Las Vegas
    ------------------------------

    Alliance 2026 Registration is Open!


  • 8.  RE: Are you using AI at all with your query/SQL?

    Posted 09-23-2025 12:13 PM

    I have used ChatGPT for when I get into problems with writing queries that are very complex.  I always have to make sure to tell it that this is for PSQuery and has constraints.  It does try to work around those, most of the time (not always).  I also use it to help me write or increased the efficiency of SQL that I am writing for Oracle Analytics that is used for reports in SFA. Sometimes I will provide the table and fields and just write what I am looking for in plain English and it can create something from which I can work with.

    I have learned quite a bit.  It's not always 100%, but it is pretty damn good. 



    ------------------------------
    Daniel Labrecque
    Senior 2 Business Systems Analyst/Functional Architect
    University of Nevada-Las Vegas
    ------------------------------

    Message from the HEUG Marketplace:
    ------------------------------
    Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
    ------------------------------

    Alliance 2026 Registration is Open!


  • 9.  RE: Are you using AI at all with your query/SQL?

    Posted 09-23-2025 01:15 PM

    I have used ChatGPT to help with expressions within my queries.  I have also put in an existing sql and then tell it what I functionally want it to do and ask it to add to the sql within PeopleSoft.  It doesn't always get you there the first time due to some of the limitations in PSQUERY, but it does get you to a jumping off point.



    ------------------------------
    Michelle Jackson
    Director of Operations for Financial Aid
    University of Pittsburgh
    ------------------------------

    Message from the HEUG Marketplace:
    ------------------------------
    Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
    ------------------------------

    Alliance 2026 Registration is Open!


  • 10.  RE: Are you using AI at all with your query/SQL?

    Posted 09-24-2025 06:12 AM

    Like Michelle, I use AI (usually Gemini) to help tweak expressions. 

    I have also used it to created comma delimited lists, which is always a pain. My prompt is "Make this a comma separated value list, with each valued enclosed in single quote marks."  This produces output like: ('red', 'green', 'blue', 'orange').  I have other ways to create a list like this, but AI is by far the fastest. 



    ------------------------------
    Tom Johnson
    Sr Business Systems Analyst
    Duke University
    tom.johnson@duke.edu
    "None of us is as smart as all of us"
    ------------------------------

    Alliance 2026 Registration is Open!


  • 11.  RE: Are you using AI at all with your query/SQL?

    Posted 09-24-2025 06:54 AM

    I saw you post that before and I did it once and it was nice!

     




    Alliance 2026 Registration is Open!


  • 12.  RE: Are you using AI at all with your query/SQL?

    Posted 09-23-2025 01:51 PM

    Once in a great while, but I'd rather research my issue and test using something like https://dbfiddle.uk/k26Sg7fD or in times past SQLfiddle.com (not sure if the site is under maintenance) and mimic the tables/data I'm attempting to work with. (Or use temp tables, etc.).  I've used it for more complicated personal projects outside of work, some of it useful, others I'm spending more time on debugging than anything.

    I could go on a whole rant about these models, their limitations and economics, but I'll refrain.  A good critic of the current state of AI is Ed Zitron, https://linktr.ee/betteroffline. 



    ------------------------------
    Michael Williams
    Systems Analyst
    University of Connecticut
    ------------------------------

    Message from the HEUG Marketplace:
    ------------------------------
    Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
    ------------------------------

    Alliance 2026 Registration is Open!


  • 13.  RE: Are you using AI at all with your query/SQL?

    Posted 09-24-2025 09:13 AM

    I have used AI numerous times to help me write expressions. Like others have mentioned it sometimes still throws and error. I just copy/paste the error and the SQL and it helps to get me closer to what I'm trying to achieve. It doesn't always get it right on the first try, but it certainly is better than the alternative of combing google for the answer you are looking for. 



    ------------------------------
    Caprice Arabia
    Student Financials Systems Analyst
    University At Buffalo
    ------------------------------

    Message from the HEUG Marketplace:
    ------------------------------
    Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
    ------------------------------

    Alliance 2026 Registration is Open!


  • 14.  RE: Are you using AI at all with your query/SQL?

    Posted 09-24-2025 12:14 PM

    I haven't used AI for this (or much honestly).  I think for me, it's mostly the fact that I am a kinesthetic learner, and really need to do a thing for myself to learn/understand it.   It will almost certainly take me longer the first time, but (I hope) would save me time in subsequent needs for similar expressions/SQL.



    ------------------------------
    Scott Nishizaki
    Connected Campus Community of Practice
    Developer/Analyst
    Azusa Pacific University
    ------------------------------

    Message from the HEUG Marketplace:
    ------------------------------
    Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
    ------------------------------

    Alliance 2026 Registration is Open!


  • 15.  RE: Are you using AI at all with your query/SQL?

    Posted 09-24-2025 12:18 PM

    Same, Scott.  I'd rather do it myself.  At least until I get stuck.   And then I'll ask.  I've only done it twice now, but both times it successfully told me how to fix it, so that's promising.

     




    Alliance 2026 Registration is Open!


  • 16.  RE: Are you using AI at all with your query/SQL?

    Posted 09-24-2025 02:15 PM

    I have used MS Copilot to correct SQL for use in Snowflake and Tableau, which has worked well! 



    ------------------------------
    Alex White CBAP
    Senior Business Analyst
    University of Wisconsin - Madison
    ------------------------------

    Message from the HEUG Marketplace:
    ------------------------------
    Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
    ------------------------------

    Alliance 2026 Registration is Open!


  • 17.  RE: Are you using AI at all with your query/SQL?

    Posted 09-25-2025 01:33 PM
    Edited by Ross Nolan 09-25-2025 01:33 PM

    I have mostly used different models to help with brainstorming different solutions that I then test to see how they work in PS query.  By far the most common task I have done is SQL tuning suggestions. This has been particularly helpful due to the changes introduced by the most recent updates to CS/PT (CS 9.2.034, PT 8.61.13), which appear to alter the query execution plans significantly.  I have noticed that sometimes an in list runs faster than an exists subquery until a PT update, and then it is the opposite.  Anything to help come up with different ideas on how to change the code has been useful.  

    I have leaned towards Anthropic's Claude and Google's Gemini due to their suggestions have generally worked better.  So far, no tool has be much better than another, and with SQL tuning, I can get contradicting answers depending on the model.  No matter what model or agent I use, I usually need to build in the limitations of PS query, like not being able to use Common Table Expressions (CTEs), which would be very helpful, but I doubt PS query will ever have that.  

    Thanks @Dana Pawlowicz for bringing up this topic. It has been interesting to see the range of answers, as well as remembering to use "ON OVERFLOW TRUNCATE."



    ------------------------------
    Ross Nolan
    Data and Reporting Analysis
    University of California-Berkeley
    rvnolan@berkeley.edu
    ------------------------------

    Alliance 2026 Registration is Open!


  • 18.  RE: Are you using AI at all with your query/SQL?

    Posted 09-25-2025 03:09 PM

    I've never used this for tuning, but that is really great suggestion.  I have 2  that started to perform poorly and the query turner our DBA uses to add profiles to ones performing badly isn't getting any thing to add. I'm going to try this.  Thanks!!!

     




    Alliance 2026 Registration is Open!


  • 19.  RE: Are you using AI at all with your query/SQL?

    Posted 09-25-2025 04:50 PM

    Yes, I will ask Microsoft Copilot for help with SQL. I'll copy a complex SQL I don't understand and ask it to break it down for me. Sometimes I ask it to modify a SQL for me. I know what I want to do, but maybe I don't know the syntax for it. I am not limited to PS Query. It is helpful.



    ------------------------------
    Enrique Pizana
    PeopleSoft Developer and Support Engineer
    Washington State Board for Community and Technical Colleges
    ------------------------------

    Message from the HEUG Marketplace:
    ------------------------------
    Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
    ------------------------------

    Alliance 2026 Registration is Open!


  • 20.  RE: Are you using AI at all with your query/SQL?

    Posted 09-25-2025 04:53 PM
    You raise a great point, Enrique! AI tools are also great for explaining something that gets handed to you. In my experience, Gemini particularly doesn't want to just revise the SQL but explain why it's doing what it's doing. I've definitely learned some things!

    -- Sarah

    --
    Sarah Hoegger
    Business Analyst | ASR-IT, Student Financials
    Academic Support Resources | asr.umn.edu
    Office of Undergraduate Education | University of Minnesota
    hoegg001@umn.edu | 612-625-2956



    Alliance 2026 Registration is Open!


  • 21.  RE: Are you using AI at all with your query/SQL?

    Posted 10-10-2025 03:24 PM

    We've had this expression that we thought was necessary to get the Fund Code for our SF item types in a query, probably since implementation in 2002:

    regexp_replace(LISTAGG(G.FUND_CODE , ',') WITHIN GROUP (ORDER BY G.FUND_CODE ),'([^,]+)(,\1)*(,|$)', '\1\3')
    Hats off to all of you who know what that means just by looking at it!
    When ChatGPT put that into English for me, it was obvious that the expression isn't useful for how we are using the query now.
    This expression concatenates all FUND_CODE values in sorted order for each group, then removes any duplicate codes, producing a clean, comma-separated list of unique FUND_CODEs.


    ------------------------------
    Susan Gutierrez
    FA and SF Functional Analyst
    Sonoma State University
    ------------------------------

    Message from the HEUG Marketplace:
    ------------------------------
    Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
    ------------------------------

    Alliance 2026 Registration is Open!