Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7755595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:36:22+00:00 2026-06-01T12:36:22+00:00

Query’s throwing an ORA-00907 Error when I try to paste a list of values

  • 0

Query’s throwing an ORA-00907 Error when I try to paste a list of values into a criteria.

Background: I’m not a developer, I’m just an end user that’s studied enough to where I can write queries using PS/Query within Peoplesoft,
for my company’s implementation. I work with Peoplesoft’s FSCM module
(Financials and Supply Chain Management), currently on Version FSCM
8.90.08.024, using I think Oracle 11g as the base database.

I’m mostly self-taught, and the technical experts we have are busy
with database/application stuff, or they aren’t familiar with my
section’s specific data needs.

I should point out that I’m unable to directly write SQL statements to
Query the database. I have to use a built-in program called “PS/Query”
(also known as Query Manager) with a GUI that writes the SQL for you
and saves it as a Query that you can run to the database to extract
data. This is relevant to my question only in that:

1. I cannot create or alter views/tables
2. I cannot perform any type of SQL Statement except "SELECT"
3. I can embed PL/SQL, MetaSQL and plain SQL into Expressions
4. At this point, Query Manager is the only option I have.

PS/Query is my only experience with SQL so far, aside from Oracle’s
documentation and sites like this. From my research, it’s considered
extremely confining by “actual” SQL programmers.The restrictions on it
require you to do things in a manner that violates what seem to be
best practices of SQL coding.

Query Request: I have a query I’ve been requested to write that pulls out spend (on Vouchers and POs) against certain system-defined
Category Codes. What I’m trying to do is pull in Voucher IDs, sum the
merchandise amounts on them by Vendor and Category Code, and display
the results. Or in other words, for every unique combination of
Vendor/Category, add up all the Voucher Amounts that have that
Vendor/Category combination.

Using the SUM (Fieldname) OVER (PARTITION BY fieldname, fieldname)
syntax.

So the end result should look something like…

Code     Vendor    Amount
123-45   Acme     $5000.00
123-45   Apple    $4200.00
123-46   Acme     $750.00

With that said, here’s the SQL that Query Manager is displaying to get the result set I showed above:

SELECT DISTINCT D.CATEGORY_CD, D.TN_DESCR1000, C.VENDOR_ID, E.NAME1, SUM ( A.MERCH_AMT_VCHR) OVER (PARTITION BY  D.CATEGORY_CD,  C.VENDOR_ID),E.SETID,E.VENDOR_ID 
  FROM PS_PO_LINE_MATCHED A, PS_PO_LINE B, PS_PO_HDR C, PS_ITM_CAT_TBL D, PS_VENDOR E, PS_PYMNT_VCHR_XREF F 
  WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT 
     AND A.PO_ID = B.PO_ID 
     AND A.LINE_NBR = B.LINE_NBR 
     AND B.BUSINESS_UNIT = C.BUSINESS_UNIT 
     AND B.PO_ID = C.PO_ID 
     AND D.CATEGORY_ID = B.CATEGORY_ID 
     AND D.EFFDT = 
        (SELECT MAX(D_ED.EFFDT) FROM PS_ITM_CAT_TBL D_ED 
        WHERE D.SETID = D_ED.SETID 
          AND D.CATEGORY_TYPE = D_ED.CATEGORY_TYPE 
          AND D.CATEGORY_CD = D_ED.CATEGORY_CD 
          AND D.CATEGORY_ID = D_ED.CATEGORY_ID 
          AND D_ED.EFFDT <= SYSDATE) 
     AND ( F.SCHEDULED_PAY_DT >= TO_DATE('2010-07-01','YYYY-MM-DD') 
     AND F.SCHEDULED_PAY_DT <= TO_DATE('2011-06-30','YYYY-MM-DD')) 
     AND D.CATEGORY_CD LIKE :1 
     AND E.VENDOR_ID = C.VENDOR_ID 
     AND A.BUSINESS_UNIT = F.BUSINESS_UNIT 
     AND A.VOUCHER_ID = F.VOUCHER_ID 
  ORDER BY 1

Underlying Issue: This works fine, but it can only prompt on one
Category Code at a time. Category Codes are 5 digits, a 3-digit
“Class” followed by a dash and then a 2-digit “subclass. I have a list
of 375 Category Codes I need to get this Query result for.

I’ve set up a prompt on this version that allows entry of a Wildcard
(So 123-%%), but that’s still about a hundred separate runs of the
Query. Query Manager allows use of an “In List” expression type in
Criteria, but it requires you to manually enter each entry in the
list.

I’m trying to set it up to where I can paste a plaintext copy of the
Code list into an Expression, with proper quotes/commas, and have it
evaluate that to give me a combined list of all the NIGP codes
specified. The Prompt field created by Query Manager doesn’t allow
pasting of lists (as far as I know).

Attempted Solution: I viewed the page at http://peoplesoft.ittoolbox.com/groups/technical-functional/peoplesoft-other-l/create-an-expression-in-psoft-90-query-to-paste-a-list-of-emplids-2808427 and I’ve tried some of the answers given there, but none of them worked. That page led to me trying this modified SQL (obviously the list of codes is truncated a bit for display here):

SELECT DISTINCT D.CATEGORY_CD, D.TN_DESCR1000, C.VENDOR_ID, E.NAME1, SUM (  A.MERCH_AMT_VCHR) OVER (PARTITION BY  D.CATEGORY_CD,  C.VENDOR_ID),E.SETID,E.VENDOR_ID 
  FROM PS_PO_LINE_MATCHED A, PS_PO_LINE B, PS_PO_HDR C, PS_ITM_CAT_TBL D, PS_VENDOR E,  PS_PYMNT_VCHR_XREF F 
  WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT 
     AND A.PO_ID = B.PO_ID 
     AND A.LINE_NBR = B.LINE_NBR 
     AND B.BUSINESS_UNIT = C.BUSINESS_UNIT 
     AND B.PO_ID = C.PO_ID 
     AND D.CATEGORY_ID = B.CATEGORY_ID 
     AND D.EFFDT = 
        (SELECT MAX(D_ED.EFFDT) FROM PS_ITM_CAT_TBL D_ED 
        WHERE D.SETID = D_ED.SETID 
          AND D.CATEGORY_TYPE = D_ED.CATEGORY_TYPE 
          AND D.CATEGORY_CD = D_ED.CATEGORY_CD 
          AND D.CATEGORY_ID = D_ED.CATEGORY_ID 
          AND D_ED.EFFDT <= SYSDATE) 
     AND ( F.SCHEDULED_PAY_DT >= TO_DATE('2010-07-01','YYYY-MM-DD') 
     AND F.SCHEDULED_PAY_DT <= TO_DATE('2011-06-30','YYYY-MM-DD')) 
     AND D.CATEGORY_CD = '005-00' OR  D.CATEGORY_CD IN ('015-00,'' '015-06,'' '015-10,'' '615-07'') 
     AND E.VENDOR_ID = C.VENDOR_ID 
     AND A.BUSINESS_UNIT = F.BUSINESS_UNIT 
     AND A.VOUCHER_ID = F.VOUCHER_ID 
  ORDER BY 1

And the SQL above is what’s giving me the ORA-00907 error. Has anyone ran into this problem before? Massive wall of text, I know. My apologies. This is my first post here and I’m trying not to leave anything relevant out.

I’ve got the immediate problem that spurred this question fixed,but that request is just the tip of a very large iceberg, and at some point I need to figure out a way to be able to paste plaintext lists in as criteria using Query Manager, preferably in a way that plays nice with Analytic Grouping.

TL;DR version:

Using Peoplesoft Query Manager to do an Analytic SUM with grouping using OVER, PARTITION BY. When I try to paste a list into the criteria, it throws an ORA-00907 Error.

Any help would be greatly appreciated. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:36:23+00:00Added an answer on June 1, 2026 at 12:36 pm

    Following the link you posted, I see 2 methods for doing what you are trying to accomplish.
    I also notice that you tried a 3rd method.

    • Method 1

      • Criteria > Add Criteria
      • Expression Type: Character
      • Length: 255
      • Expression Text: D.CATEGORY_CD IN (‘015-00′,’015-06′,’015-10′,’615-07’) AND 1
      • Condition Type: equal to
      • Constant: 1
    • Method 2

      • Criteria > Add Criteria
      • Field: D.CATEGORY_CD
      • Condition Type: in list
      • Value: 015-00′,’015-06′,’015-10′,’615-07
    • Method 3 (Your Method)

      • Criteria > Add Criteria
      • Field: D.CATEGORY_CD
      • Condition Type: equal to
      • Define Expression: ‘015-00’ OR D.CATEGORY_CD IN (‘015-00′,’015-06′,’015-10′,’615-07’)

    Question) Does the below exactly match the text you are putting the Expression box?

    ‘015-00’ OR D.CATEGORY_CD IN (‘015-00′,’015-06′,’015-10′,’615-07’)

    If not, what are you putting in that box?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Query: INSERT INTO Customer2 VALUES (1, 'Mrs','Jill','Hill','2 Step St','Hillington','Uxbridge', 'Middx''UB10 8XY','020 8999 684') ;
Query gives me some error: Msg 156, Level 15, State 1, Line 4 Incorrect
Query: SELECT DISTINCT ([Equipment List].ID) AS Expr1, [Job Assignments].Job FROM [Equipment List] LEFT JOIN
Query was this: CREATE TABLE `query` ( `id` int(11) NOT NULL auto_increment, `searchquery` varchar(255)
This query gives me syntax error in when-between line. how can i solve them?
Query : List the film title and the leading actor for all of 'Julie
Query 1: SET @sql2 = 'insert into TempReport select ID, max(TransactionTime),0 from ClubTransaction with
Query: Given a cuisineID (type of cuisine), return the list of restaurants that offer
Query: public List<Pontos> selectSpecific(String id) { List<Pontos> list = new ArrayList<Pontos>(); Cursor cursor =
Query 1 CREATE TABLE [dbo].[VarArray[]](column int) Go begin tran insert into VarArray(i) select 1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.