How to pass and work with a PL/SQL or Temp table in a Procedure?
My problem is that I have a query that involves about 10 tables or so, but everything starts from one base table. I am trying to split the base table so that the query actually finishes.
Problem Query:
with base_table as
select * from table_a
, t1 as
select * from table_b
-- There are some manipulation in the SQL, but not listing it here.
, t2 as
select * from table_c INNER JOIN t1 on t1.id = table_c.id
) What I want to do is limit base table and thus create a procedure such that it evalutes a temporary table and the temporary table will be limited by 1000 rows or so.
Thanks for your help.
Currently I am using:
DECLARE
l_start NUMBER;
l_increment NUMBER;
l_max NUMBER;
BEGIN
l_start := 1;
l_increment := 100;
SELECT COUNT(*) AS the_count
INTO l_max
FROM table_a;
LOOP
INSERT INTO new_table
WITH base_table AS
(SELECT p.*
FROM (SELECT DENSE_RANK () OVER (ORDER BY alpha_id) rnum, a.*
FROM table_a a) p
WHERE rnum BETWEEN l_start AND l_start + l_increment - 1)
, t1 AS
(SELECT *
FROM table_b
-- There are some manipulation in the SQL, but not listing it here.
, t2 AS
(SELECT *
FROM table_c INNER JOIN t1 ON t1.ID = table_c.ID
SELECT *
FROM t2, temp_base;
COMMIT;
l_start := l_start + l_increment;
EXIT WHEN l_start > l_max;
END LOOP;Is it better to create a Temporary table or pass the data as a cursor:
SELECT DENSE_RANK () OVER (ORDER BY alpha_id) rnum, a.*
FROM table_a a
Thanks.
Similar Messages
-
How to declare and work with select-option in screen painter?
hello there,
can anybody plz suggest me ,how to declare and work with select-option in screen painter?
neonHi Blue,
Please check these threads which will help you a lot..
module pool programming " to add selection-option on screen"
Re: Select option in Dialog program screen
Re: SELECT-OPTIONS in Screen
Good luck
Narin -
How to save and work with a Word document stored in the Oracle 8i Database?
Hi,
If you have any experience with saving and working with a Word document (stored in 8i) from Forms 6.0, then please let me know how.
Thanks ...
Peter Nielsenhi
i had worked storing word documents in oracle8i.tell me what exactly u want to know.
null -
How to install and work with oracle webcenter 11g
Hi
Will please guide how to install and work on oracle webcenter11g, i am fresher in oracle that's why. so please guide me
Regards
Rajesh PIn order to create and develop a webcenter portal application, you only need to install JDeveloper and download the WeBCenter extensions. That's true.
But this install does not include the WebCenter services like dicussions, document services, analytics,... If you want to use these and integrate them in your portal, then you would need to install the suite as described on my blog. -
How to define and work with bind-variables without the dialog-box ?
I want to select different tables with the same bind_variables,
but do want not fill the bind-variables-dialogbox
everytime I use the select statements
because I could simple edit and bind this bind-variables once
at the first select.
select col1, col2 into :bind1, :bind2 from mybasictable_10 where col3 = 'ABCD':
select * from mytable_b where b1 = :bind1 and b2 = :bind2 ;
select * from mytable_c where c1 = :bind1 and c2 = :bind2 ;
select * from mytable_d where d1 = :bind1 and d2 = :bind2 ;
select * from mytable_e where e1 = :bind1 and e2 = :bind2 ;
it doesn't work and I didn't find that in help,
how does it work in sql-developer ?
regardsdavid,
back to the root of my question:
I do use an 10 years old low-end sql / plsql-tool where I can simple and fast do sql-things like that:
select col1, col2 into :bind1, :bind2 from mybasictable_10 where col3 = 'for_example_ABCD':
select * from mytable_b where b1 = :bind1 and b2 = :bind2 ;
select * from mytable_c where c1 = :bind1 and c2 = :bind2 ;
select * from mytable_d where d1 = :bind1 and d2 = :bind2 ;
select * from mytable_e where e1 = :bind1 and e2 = :bind2 ;
I would like to use oracles SQL-Developer instead of this 'old' tool,
and want to use my 'old' sql / plsql scripts
but the SQL-Developer in this matter seems is to much complicate to use,
I can do complex and big things with sql-dev,
but not simple using bind-variables ;-)( . -
How to install and work with label templates?
I'm designing some product labels including text and graphics and want to print them on to Avery labels, 21 per A4 sheet. Is there a way I can design the label and then get it to print multiple copies on to the avery sheet without having to copy and paste the whole time?
Thank you, that's certainly helps - now I' guess I've just got to work out how to set up the grid so it exactly fits the labels and prints in the right place!
-
I imported about 300 RAW images yesterday and worked with them for about an hour. iPhoto locked up on me and I rebooted. After I did the event icon for that event is now gray and it says there are no photos. I know the photos are there. Any idea how I can recover them?
a best practice to is to never have any computer program (including iPhoto) delete the photos from the card but to import the photos and keep them and then after at least one successful backup cycle has completed and then reformat the card -- I use three very large (32 GB) cards in rotation so I do not reformat for typically a year or more giving me one more long term backup of my photos
Back up your iPhoto library, Depress and hold the option (alt) and command keys and launch iPhoto - rebuild your iPhoto library database
LN -
I am considering buying an iPad 3. I have an iMac with OSX 10.6.8. On the iMac I have many photos and work with iPhoto and Photoshop Elements on the computer. Can I interchange or transfer photos and other work from the iMac to the iPad? How?
velma Monreal wrote:
I am considering buying an iPad 3. I have an iMac with OSX 10.6.8. On the iMac I have many photos and work with iPhoto and Photoshop Elements on the computer. Can I interchange or transfer photos and other work from the iMac to the iPad? How?
Yes you can. In iPhoto create a Album with the photos you want in it. You can drag them from your Events folder. In iTunes with your iPad connected go to Photos by cliking on your iPad. You can then select the album or events you want. -
How create and work with Z output to meet the client requirment?
hi gurus,
I am SD functional consultant and need ur help
Please explain me how create and work with Z output .
How we arrange and change the fields in header and footer
where and how we do changes in Layouts setting and SAP scripts to meet the user requirments.
pls forward functional or Tech spec of Z output
points will be rewarded
thanx & regards
shabnumHi shabnum ,
I hope you can do it.
Goto SE71, enter form name--> click change
1) click in page window command button, Identify the header and footer window
2) single click on Header window and click change button(pencil symbol)
3) identify the fields and change order of the fields
I hope this will help to solve your issue
Regards,
SaiRam -
How create and work with Z output to meet user req
hi gurus,
I am SD functional consultant and need ur help
Please explain me how create and work with Z output .
How we arrange and change the fields in header and footer
where and how we do changes in Layouts setting and SAP scripts to meet the user requirments.
pls forward functional or Tech spec of Z output
points will be rewarded
thanx & regards
shabnumHi
From SPRO do the all steps.
Goto SD-> BASIC functions->Output control->Output determination->Output determination by condition technique->Maintain Output determination for sales documents
Here define all like access sequences, Output types, condition tables and assign them to Program and Forms.
From SE71 copy the script to a Zscript and to modify it to suit your requirements and the same Zscript has to be assigned to Output type, Program in NACE transaction.
Reward points if useful
Regards
Anji -
How to install,configure and work with omniportlets
Hi,
What are the steps i need follow to install and work with omniportlets.
What are the softwares in need install. Please give required steps.
I downloaded.
1.PDK-Java software, PortalTools (OmniPortlet & Web Clipping), and common libraries
2.Download the preconfigured OC4J.
Is there any additional softwares needed.
I should install Application Server 10g?
I have to create some demos using omnipotlets which are given in the page url:http://www.oracle.com/technology/products/ias/portal/omniportlet.html
Thanks.
NRHi,
working with omni portlets they given two installation methods.
1. the preconfigured standalone OC4J with OracleAS PDK.
2 Iinstall OracleAS Portal as part of the Oracle Application Server release, then most of the configurations are already done.
I have
OS: Redhat Linux 4
Browser:Mozilla firefox 1.5.0.3
database:Oracle10g.
I performed 1 method but while openig link http://172.16.122.249:8888/portalTools/omniPortlet/providers/omniPortlet
i am getting the error
Error occurred while rendering Provider Test Page - view the HTML source for more details
I have to create some demos using omnipotlets which are given in the page url:http://www.oracle.com/technology/products/ias/portal/omniportlet.html
what installations i need to done.
Please help me.Thanks
NR -
HP Simple Pass not working with Microsoft Edge in Windows 10
I up graded to windows 10 and now I find that HP Simple Pass does not work with Microsoft Edge, despite the fact that it continues to work with the windows 10 sign in.Would appreciate any thoughts on how to fix HP Simple Pass to work with Microsoft Edge. Thank you
I got an answer here:http://h30492.www3.hp.com/t5/Notebook-Betriebssysteme-und-Software/SimplePass-und-Edge/m-p/363610#M34997 Edge doesn't support that kind of plugins at the moment, MS is working on it.
-
My Mac is producing gray screen at startup and crashes. I'm afraid that everything explode and disappear, and can no longer connect and work with my Mac. Can anyone help ??
Thank you.
Problem description:
gray screen at startup and crashes
EtreCheck version: 2.1.1 (104)
Report generated 6 de dezembro de 2014 13:29:43 BRST
Hardware Information: ℹ️
MacBook Pro (15-inch, Early 2011) (Verified)
MacBook Pro - model: MacBookPro8,2
1 2.2 GHz Intel Core i7 CPU: 4-core
4 GB RAM
BANK 0/DIMM0
2 GB DDR3 1333 MHz ok
BANK 1/DIMM0
2 GB DDR3 1333 MHz ok
Bluetooth: Old - Handoff/Airdrop2 not supported
Wireless: en1: 802.11 a/b/g/n
Video Information: ℹ️
AMD Radeon HD 6750M - VRAM: 1024 MB
Color LCD 1440 x 900
Intel HD Graphics 3000 - VRAM: 384 MB
System Software: ℹ️
Mac OS X 10.6.8 (10K549) - Uptime: 0:31:56
Disk Information: ℹ️
TOSHIBA MK7559GSXF disk0 : (698,64 GB)
S.M.A.R.T. Status: Verified
- (disk0s1) <not mounted> : 210 MB
Macintosh HD (disk0s2) / : 749.81 GB (378.70 GB free)
MATSHITADVD-R UJ-898
USB Information: ℹ️
Apple Inc. FaceTime HD Camera (Built-in)
Apple Inc. Apple Internal Keyboard / Trackpad
Apple Inc. BRCM2070 Hub
Apple Inc. Bluetooth USB Host Controller
Apple Computer, Inc. IR Receiver
Thunderbolt Information: ℹ️
Apple, Inc. MacBook Pro
Problem System Launch Daemons: ℹ️
[not loaded] org.samba.winbindd.plist [Support]
Launch Agents: ℹ️
[running] com.babylon.activation.plist [Support]
[loaded] com.divx.dms.agent.plist [Support]
[loaded] com.divx.update.agent.plist [Support]
[loaded] com.hp.help.tocgenerator.plist [Support]
Launch Daemons: ℹ️
[loaded] com.adobe.fpsaud.plist [Support]
[loaded] com.microsoft.office.licensing.helper.plist [Support]
User Launch Agents: ℹ️
[loaded] com.adobe.ARM.[...].plist [Support]
[loaded] com.facebook.videochat.[redacted].plist [Support]
[loaded] com.google.keystone.agent.plist [Support]
[running] com.skype.c2c_service.plist [Support]
User Login Items: ℹ️
iTunesHelper UNKNOWNHidden (missing value)
FaceboxPro Aplicativo (/Applications/FaceboxPro.app)
Safari Aplicativo (/Applications/Safari.app)
Octoshape Aplicativo (/Users/[redacted]/Library/Octoshape/Octoshape.app)
uTorrent UNKNOWN (missing value)
Dropbox Aplicativo (/Applications/Dropbox.app)
Inkscape UNKNOWN (missing value)
RealPlayer Downloader Agent Aplicativo (/Users/[redacted]/Library/Application Support/RealNetworks/RealPlayer Downloader Agent.app)
HP Product Research Aplicativo (/Library/Application Support/Hewlett-Packard/Customer Participation/HP Product Research.app)
Internet Plug-ins: ℹ️
OVSHelper: Version: 1.1 [Support]
Google Earth Web Plug-in: Version: 7.1 [Support]
Flip4Mac WMV Plugin: Version: 2.4.4.2 [Support]
RealPlayer Plugin: Version: Unknown [Support]
AdobePDFViewerNPAPI: Version: 10.1.12 [Support]
FlashPlayer-10.6: Version: 15.0.0.239 - SDK 10.6 [Support]
DivX Web Player: Version: 3.1.1.9 - SDK 10.6 [Support]
Silverlight: Version: 5.1.30514.0 - SDK 10.6 [Support]
Flash Player: Version: 15.0.0.239 - SDK 10.6 [Support]
QuickTime Plugin: Version: 7.6.6
iPhotoPhotocast: Version: 7.0 - SDK 10.7
SharePointBrowserPlugin: Version: 14.1.2 [Support]
AdobePDFViewer: Version: 10.1.12 [Support]
JavaAppletPlugin: Version: 13.9.8 - SDK 10.6 Check version
User internet Plug-ins: ℹ️
npsf_uni: Version: sf 3.3.2.1 [Support]
OctoshapeWeb: Version: 1.0 - SDK 10.8 [Support]
Safari Extensions: ℹ️
Searchme Adware! [Remove]
Skype Click to Call
iSkyDeluxe
TED HTML5 video playe
Audio Plug-ins: ℹ️
iSightAudio: Version: 7.6.6
3rd Party Preference Panes: ℹ️
Flash Player [Support]
Flip4Mac WMV [Support]
Skype Click to Call [Support]
Tuxera NTFS [Support]
Time Machine: ℹ️
Time Machine information requires OS X 10.7 "Lion" or later.
Top Processes by CPU: ℹ️
5% WindowServer
4% DivXMediaServer
1% fontd
0% RealPlayer Downloader Agent
0% WebProcess
Top Processes by Memory: ℹ️
296 MB WebProcess
202 MB FaceboxPro
185 MB Microsoft PowerPoint
163 MB Safari
137 MB Microsoft Word
Virtual Memory Information: ℹ️
843 MB Free RAM
1.76 GB Active RAM
706 MB Inactive RAM
978 MB Wired RAM
577 MB Page-ins
0 B Page-outs
Diagnostics Information: ℹ️
Dec 6, 2014, 12:58:24 PM Self test - passed
Dec 6, 2014, 12:23:11 PM Kernel_2014-12-06-122311_MacBook-Pro-de-...panic [Details]
Dec 6, 2014, 07:08:28 AM PluginProcess_2014-12-06-070828_MacBook-...crash
Dec 5, 2014, 05:24:39 PM WebProcess_2014-12-05-172439_MacBook-Pro...crash
Dec 5, 2014, 10:45:59 AM Kernel_2014-12-05-104559_MacBook-Pro-de-...panic [Details]
Dec 5, 2014, 10:18:14 AM Kernel_2014-12-05-101814_MacBook-Pro-de-...panic [Details]
Dec 3, 2014, 08:28:35 PM locationd_2014-12-03-202835_localhost.crash
Dec 5, 2014, 10:25:44 AM Kernel_2014-12-05-102544_MacBook-Pro-de-...panic [Details]Startup - Gray, Blue or White screen at boot, w/spinner/progress bar
Startup Issues - Resolve
Startup Issues - Resolve (2) -
How to make this work with Firefox, HELP!
Downloading for Real-player, after watching the full movie, I click download and it has to reread the movie from the internet. When using explorer, after downloading the movie, it reads it from memory, which makes it a fast download. How to make this work with Firefox, I like not to use Microsoft products, and I really like Firefox 7.0.1!!!! HELP!
-> click '''Firefox''' button and click '''Options''' (OR File Menu -> Options)
* Advanced panel -> Network tab
* place Checkmark on '''Override Automatic Cache Management''' -> under '''Limit Cache''' specify a large size of space
* Remove Checkmark from '''Tell me when websites asks to store data for offline use'''
* click OK on Options window
* Restart Firefox
Check and tell if ts working. -
How to make Macbook work with closed display?
I need to make MacBook to be closed (display) most of the time and work with external monitor, keyboard and mouse (actually trackball as I have been hating any type of mice since 1998 and not using it even at work).
Now I do not like mediocre resolution of small MacBook display and I prefer my 20 inch wide monitor. Also the keyboard is rather for quick work in small areas like restroom rather than comfortable work on big desk (I hate notebook keyboards either as they make me feel claustrophobic and crunching my fingers).
Considering recent buzz on Mac Mini not living for too long into future I would love to find alternative solution (meaning I do not want computer with display and keyboard in one and I do not have needs of spending few thousand of dollars for big metal case good for feeding and breeding birds I have ergonomics demands, but not higg performnce processing needs.
So can you tell me how I make Apple notebook being closed (and perhaps squashed by monitor stand) behave like a CPU box?
Thanks,
MaciekThnaks, but I am not interested in bluethooth/wireless solution. That minimum of cable to reach CPU does not bother me and I do not buy big monitor to work on my computer from adjacent room. I just need space for more windows and I think Apple did great job having USB Hub on keyboard that allows stringing mouse and keayoboard with one cable to CPU.
Also I haven't heard of wireless KVM and I use such solution. This is not my only computer as I run home network and two of them in my room are supposed to share keyboard, mouse and monitor. So far I was successful to run this setup, but I need inexpensive plain CPU from Apple to be able to find comfortable solution to work.
Well I could drop the other computer if Apple managed to provide everything that I need (how about Safari properly working with Citrix client and Remote Desktop to Windows as I do not want Firefox on Apple computer? Only Firefox fixes the problems with this software).
Maybe you are looking for
-
In our enterprise MPLS network we are using 192.168.20.0/24 subnet, in this subnet we have not assigned the IP 192.168.20.200/30 & 204/30, But still these subnets are reachable . Are these NNI IP ...Please explain.
-
Transfer app from one Microsoft account to another?
Hello there! I'm looking for a way to transfer an app from one Microsoft account to another, and couldn't find any documentation about it. Is this possible, and if so, can you point me into the right direction? Thanks!
-
Is it possible to host WebBrowser control in Java
hi, all, is it possible to invoke APIs of WebBrowser control (COM) in Java, i.e. host WebBrowser control in Java, and how to do that? cheers daiyue
-
need to figure out how to remove an unknown admin password on a mac. used the install disc with not luck. tried some commands in single user mode, no luck.
-
Please help me - I can't drag song to playlist to burn a CD - what's wrong?
I'm a new I-Tunes user and need a song burned onto a CD. I purchased the song but can't drag it onto a playlist in order to burn the CD. I can hear the song in the library but it won't drag over. Also the burn icon isn't highlighted. Can you help me