Below is the details of two queries and sql behind it and i'm doing this in Peoplesoft.Using Psquery.
Any help or procedure greatly appreciated.
IIGL_DEPT_AP_BVA_DETAIL:
SQL: - SELECT A.BUSINESS_UNIT, A.ACCOUNT, E.DESCR, A.LINE_DESCR, D.NAME1, F.INVOICE_ID, TO_CHAR(F.INVOICE_DT,'YYYY-MM-DD'), C.MONETARY_AMOUNT, A.DEPTID, B.DESCR, A.JRNL_LINE_SOURCE, A.CURRENCY_CD, TO_CHAR(A.JOURNAL_DATE,'YYYY-MM-DD'), A.JOURNAL_ID,E.SETID,E.ACCOUNT,TO_CHAR(E.EFFDT,'YYYY-MM-DD')
-
FROM PS_JRNL_LN A, PS_SP_BU_GL_OPRVW A1, PS_JRNL_HEADER B, PS_VCHR_ACCTG_LINE C, PS_SP_BU_AP_OPRVW C1, PS_PYMNT_XREF_VW F, PS_PAYMENT_TBL D, PS_GL_ACCOUNT_TBL E
-
WHERE A.BUSINESS_UNIT = A1.BUSINESS_UNIT
-
AND A1.OPRID = 'CHAYNES'
-
AND B.BUSINESS_UNIT = A1.BUSINESS_UNIT
-
AND C.BUSINESS_UNIT = C1.BUSINESS_UNIT
-
AND C1.OPRID = 'CHAYNES'
-
AND ( A.LEDGER = 'ACTUALS'
-
AND A.DEPTID = :1
-
AND A.JOURNAL_DATE BETWEEN TO_DATE(:2,'YYYY-MM-DD') AND TO_DATE(:3,'YYYY-MM-DD')
-
AND A.BUSINESS_UNIT = B.BUSINESS_UNIT
-
AND A.JOURNAL_ID = B.JOURNAL_ID
-
AND A.JOURNAL_DATE = B.JOURNAL_DATE
-
AND ( A.JRNL_LINE_SOURCE = 'GAP'
-
AND A.BUSINESS_UNIT = C.BUSINESS_UNIT_GL(+)
-
AND A.JOURNAL_ID = C.JOURNAL_ID(+)
-
AND A.JOURNAL_DATE = C.JOURNAL_DATE(+)
-
AND A.JOURNAL_LINE = C.JOURNAL_LINE(+)
-
AND A.LEDGER = C.LEDGER(+)
-
AND B.JRNL_HDR_STATUS = 'P'
-
AND C.BUSINESS_UNIT = F.BUSINESS_UNIT
-
AND C.VOUCHER_ID = F.VOUCHER_ID
-
AND D.REMIT_VENDOR = F.VENDOR_ID)
-
AND F.REMIT_SETID = D.REMIT_SETID
-
AND F.REMIT_VENDOR = D.REMIT_VENDOR
-
AND F.BANK_SETID = D.BANK_SETID
-
AND F.BANK_CD = D.BANK_CD
-
AND F.BANK_ACCT_KEY = D.BANK_ACCT_KEY
-
AND F.PYMNT_ID_REF = D.PYMNT_ID_REF
-
AND F.PYMNT_ID = D.PYMNT_ID
-
AND D.PYMNT_STATUS IN ('N','P')
-
AND A.BUSINESS_UNIT = '21000'
-
AND E.ACCOUNT = A.ACCOUNT
-
AND E.EFFDT =
-
(SELECT MAX(E_ED.EFFDT) FROM PS_GL_ACCOUNT_TBL E_ED
-
WHERE E.SETID = E_ED.SETID
-
AND E.ACCOUNT = E_ED.ACCOUNT
-
AND E_ED.EFFDT <= SYSDATE)
-
AND A.CURRENCY_CD = 'USD' )
-
ORDER BY 11, 14, 2
RECORDS: - AJRNL_LN - Journal Line Data
-
-
BJRNL_HEADER - Journal Header Data
-
-
C VCHR_ACCTG_LINE - AP Accounting Entries
-
-
F PYMNT_XREF_VW - AP Payment Voucher Information
-
-
D PAYMENT_TBL - AP Disbursements
-
-
E GL_ACCOUNT_TBL - Accounts
IIGL_DEPT_BVA_DETAILS:
SQL: - SELECT A.BUSINESS_UNIT, A.JOURNAL_ID, TO_CHAR(A.JOURNAL_DATE,'YYYY-MM-DD'), A.ACCOUNT, A.CURRENCY_CD, A.MONETARY_AMOUNT, A.LINE_DESCR, A.JRNL_LINE_SOURCE, A.DEPTID, B.DESCR
-
FROM PS_JRNL_LN A, PS_SP_BU_GL_OPRVW A1, PS_JRNL_HEADER B
-
WHERE A.BUSINESS_UNIT = A1.BUSINESS_UNIT
-
AND A1.OPRID = 'CHAYNES'
-
AND B.BUSINESS_UNIT = A1.BUSINESS_UNIT
-
AND ( A.LEDGER = 'ACTUALS'
-
AND A.DEPTID = :1
-
AND A.JOURNAL_DATE BETWEEN TO_DATE(:2,'YYYY-MM-DD') AND TO_DATE(:3,'YYYY-MM-DD')
-
AND A.BUSINESS_UNIT = B.BUSINESS_UNIT
-
AND A.JOURNAL_ID = B.JOURNAL_ID
-
AND A.JOURNAL_DATE = B.JOURNAL_DATE
-
AND A.JRNL_LINE_SOURCE NOT IN ('TWL')
-
AND B.JRNL_HDR_STATUS = 'P'
-
AND A.BUSINESS_UNIT = '21000'
-
AND A.ACCOUNT > '499999'
-
AND B.SOURCE <> 'CLO' )
-
ORDER BY 4, 8, 3
RECORDS: - A JRNL_LN - Journal Line Data
-
-
B JRNL_HEADER - Journal Header Data
Thanks
5 2921
Aside from AND A.DEPTID = :1 , everything seems to be just an INNER join. I don't know what those date functions are, though. And that (+) after the column. Other than that, most of those syntax will work in MS SQL, unless I miss something.
Happy Coding!!!
~~ CK
Thanks CK.... for your response
I tried inner and outer joint but didn't get it may be missing some expression,don't know
Can you post what your MS SQL query looks like?
~~ CK
Hi Ck,
I have sql query only since i,m a functional consultant idon't have access to database.
Above mentioned are Sql queries.
Thanks for your response and contribution.
What does those colon means?
~~ CK
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Tropos |
last post by:
Query: Will a MutexGuard object release before a function return value
is copied?
Consider the C++ code:
class MutexGuard //A familiar sort of class for making mutexes
exception-safe
{
. ....
|
by: terence.parker |
last post by:
I am often faced with the dilemma of whether to use a JOIN query across
three tables in order to grab a bunch of results - or whether to create
another table to represent what I want. The latter is...
|
by: Simon Pleasants |
last post by:
Am something of a newbie at this, so please bear with any stupid
questions.
I have created a database to track shipments that we import. The
information is stored in a table and I have created...
|
by: deko |
last post by:
I need to create a Recordset of all records that appear in one table but do
NOT appear in another.
To get the records that appear in BOTH tables, I can do this:
SELECT tblEntity.Entity_ID...
|
by: mael.iosa |
last post by:
Hi, I'm new to this group and fairly new to Access. I have a bunch of
data, and after several other queries, I generate the following query
which has two fields:
Bin, Time
20 3.5
20 3.9
20...
|
by: iworldsatellite |
last post by:
hi
i m developing an accounting system, i m creating separate database for each company's account so want to implement user-level security wizard from vb code, so i need to create new workgroup...
|
by: Jim |
last post by:
How do I program visual basic to create a "Find Unmatched Query"?
I have two tables:
- TodaysImport
- YesterdaysImport
Both tables have the same 6 fields:
- User
|
by: WyvsEyeView |
last post by:
I have a form that has four unbound combo boxes: cboType, cboVersion, cboStatus, cboReview. I want to write a query that basically lets users make selections in as many combo boxes as apply...only...
|
by: muhammad |
last post by:
i want join to this group
|
by: Joel Heenan |
last post by:
Python List,
We have a setup where we have implemented NIS Netgroups through LDAP.
I'm looking to query this information through python. We don't have a
nis domain or nis server so I don't think...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |