Hi Guys
I need help very agent, I just started learning PL/SQL for oracle and I have a task that I need to fix. I'm required to create a report system using report filter to pass parameters e.g Dates, listbox, textboxex etc. I have the following SQL: -
SELECT DISTINCT CC.iid,
-
CC.Shortcode || '.' || CC.NAME Occupation,
-
G.Shortcode || '.' || G.NAME || '<br>' || F.Shortcode || '.' || F.NAME || '<br>' || E.Shortcode || '.' || E.NAME || '<br>' || D.Shortcode || '.' || D.NAME OFOAll,
-
CC.iID ofoOccupationID,
-
( SELECT COUNT(V.iID)
-
FROM inveloper.conOrganisationVacancies V
-
WHERE V.ofoOccupationID = CC.iid ) Opportunities
-
FROM inveloper.ofoOccupation CC
-
JOIN inveloper.conOrganisationVacancies V ON CC.iid = V.ofoOccupationID
-
LEFT JOIN inveloper.conOrganisation O ON V.conOrganisationID = O.iid
-
LEFT JOIN inveloper.ofoUnit D ON D.iID = CC.ofoUNitID
-
LEFT JOIN inveloper.ofoMinor E ON E.iID = D.ofoMinorID
-
LEFT JOIN inveloper.ofoSubMajor F ON F.iID = E.ofoSubMajorID
-
LEFT JOIN inveloper.ofoMajor G ON G.iID = F.ofoMajorID
-
LEFT JOIN inveloper.globState H ON V.globStateID = F.iID
-
LEFT JOIN inveloper.conSetaIndustry SI ON V.ConSetaIndustryID = SI.iid
-
LEFT JOIN inveloper.conSETA S ON SI.conSETAID = S.iid
-
WHERE (1=1)
-
I need filter the report using date, Listboxes containing data from oracle database. I don't know if i'm making sence to u guys. Pls help!
3 1664
You have posted in the wrong forum. Your thread will be moved.
Hi Cryzo,
Welcome to TSDN!!
Please make sure you follow POSTING GUIDELINES every time you post in this forum.
Thanks
MODERATOR
Hi Guys
I need help very agent, I just started learning PL/SQL for oracle and I have a task that I need to fix. I'm required to create a report system using report filter to pass parameters e.g Dates, listbox, textboxex etc. I have the following SQL: -
SELECT DISTINCT CC.iid,
-
CC.Shortcode || '.' || CC.NAME Occupation,
-
G.Shortcode || '.' || G.NAME || '<br>' || F.Shortcode || '.' || F.NAME || '<br>' || E.Shortcode || '.' || E.NAME || '<br>' || D.Shortcode || '.' || D.NAME OFOAll,
-
CC.iID ofoOccupationID,
-
( SELECT COUNT(V.iID)
-
FROM inveloper.conOrganisationVacancies V
-
WHERE V.ofoOccupationID = CC.iid ) Opportunities
-
FROM inveloper.ofoOccupation CC
-
JOIN inveloper.conOrganisationVacancies V ON CC.iid = V.ofoOccupationID
-
LEFT JOIN inveloper.conOrganisation O ON V.conOrganisationID = O.iid
-
LEFT JOIN inveloper.ofoUnit D ON D.iID = CC.ofoUNitID
-
LEFT JOIN inveloper.ofoMinor E ON E.iID = D.ofoMinorID
-
LEFT JOIN inveloper.ofoSubMajor F ON F.iID = E.ofoSubMajorID
-
LEFT JOIN inveloper.ofoMajor G ON G.iID = F.ofoMajorID
-
LEFT JOIN inveloper.globState H ON V.globStateID = F.iID
-
LEFT JOIN inveloper.conSetaIndustry SI ON V.ConSetaIndustryID = SI.iid
-
LEFT JOIN inveloper.conSETA S ON SI.conSETAID = S.iid
-
WHERE (1=1)
-
I need filter the report using date, Listboxes containing data from oracle database. I don't know if i'm making sence to u guys. Pls help!
In your query, add the filter conditions:
Something like this: -
-
hdate DATE;
-
emp_no NUMBER;
-
-
hdate:= (Your date value)
-
emp_no:= (your list box value)
-
-
SELECT * from table_name WHERE
-
hiredate = hdate AND empno = emp_no;
-
-
Use above logic for your query and I hope you an achieve what you are looking for!!
Sign in to post your reply or Sign up for a free account.
Similar topics
by: CSDunn |
last post by:
Hello,
I have a problem with field filtering between an Access 2000 Project form
(the application is called CELDT), and the report that shows the results of
the filter. Both the form and the...
|
by: Richard |
last post by:
Hi,
I have a form based on a table. When I filter the form I want to run a
report based on the same table with the same filter as the form. No problem
until I want to filter a combo box where...
|
by: Jonathan LaRosa |
last post by:
I am trying to open a recordset and I am getting an error and I can't
figure out why.
See code below. sqlString2 does not work. sqlString does. Clearly
the problem is with the nested SELECT...
|
by: LP |
last post by:
I am using (trying to) CR version XI, cascading parameters feature works it
asks user to enter params. But if page is resubmitted. It prompts for params
again. I did set...
|
by: Matt MacDonald |
last post by:
I'm trying to run a report using a form containing a crystal report viewer, but I keep getting an error saying tha
"The specified value type is different to the current value type
I'm trying to use...
|
by: jim4u |
last post by:
Hi gurus,
I have an automation add-in created using C# for Excel, in which I am
exposing a number of functions. Is there any way I can add help-text
the way excel does for other categories like...
|
by: gabylever |
last post by:
Hello,
I have the following problem. I want to export a Crystalreports report
to pdf from our c# web application. It works fine. The pdf is created
but the parmeters set in the code are not used...
|
by: archeykun |
last post by:
Hi all,
I have created the ad-hoc report via Report Builder. I would like to define some parameters to my report, so I go to Report then select filter and double click at "Year" field which i...
|
by: franc sutherland |
last post by:
Hello,
I have a report which I filter using the me.filter command in the
OnOpen event.
Me.Filter = "OrderID=" & Forms!variable_form_name!
Me.FilterOn = True
I want to be able to open that...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |