Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Add a column to existing sql
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 01/06/2014 :  10:31:09  Show Profile  Reply with Quote
Using Banner and Oracle DB. I have to add pay id to an existing script. One of the table names that pay id exists on is phrhist. I want to add phrhist_pict_code, phrhist_payno to the existing sql below:

select distinct spriden_id as GWID, spriden_last_name as LAST_NAME, spriden_first_name as FIRST_NAME, x.pdrdedn_amount1 as Amount,
x.pdrdedn_bdca_code as BDCA_CODE, x.pdrdedn_ref_no as REF_NO, x.pdrdedn_status as STATUS, x.pdrdedn_effective_date as Eff_Date, pebempl_ecls_code as ECLS
from spriden, pebempl, pdrdedn x, pdrbded, spbpers
where spriden_pidm = pebempl_pidm
and spriden_pidm = spbpers_pidm
and spriden_pidm = x.pdrdedn_pidm
and spriden_pidm = pdrbded_pidm
and x.pdrdedn_bdca_code = pdrbded_bdca_code
and pebempl.pebempl_empl_status = 'A'
and x.pdrdedn_effective_date =
(select max(pdrdedn_effective_date)
from pdrdedn
where pdrdedn_pidm = x.pdrdedn_pidm
and pdrdedn_bdca_code = x.pdrdedn_bdca_code
and pdrdedn_effective_date <= sysdate)
and (pdrbded_end_date > sysdate or pdrbded_end_date is null)
and x.pdrdedn_bdca_code IN ('SMT','SMP','FST','FMP','PK2')
and x.pdrdedn_status in ('A','T')
and spriden_change_ind is null

Almighty SQL Goddess

38200 Posts

Posted - 01/06/2014 :  12:19:18  Show Profile  Visit tkizer's Homepage  Reply with Quote is for Microsoft SQL Server, so you'll want to post your question on a site that specializes in Oracle or Banner.

Tara Kizer
SQL Server MVP since 2007
Go to Top of Page

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 01/07/2014 :  01:00:35  Show Profile  Reply with Quote
try your luck at or

SQL Server MVP
Go to Top of Page

Premature Yak Congratulator

22864 Posts

Posted - 01/07/2014 :  07:35:12  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
Join with the table phrhist and add required columns in the SELECT statement


Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000