help needed regarding a funcation
Hi all
I am trying to create a function where one of the name of the table will be dynamic. as below:
FUNCTION get_prtt (p_input_tab IN VARCHAR2)
RETURN VARCHAR2
IS
l_prtt_cde VARCHAR2 (100);
BEGIN
-Take the active partition for previous input table
Select prtt_cde
IN l_prtt_cde
OF P_INPUT_TAB A, CD_VAL_DYN B
WHERE A.prtt_cde = B.cd_val_txt
AND B.CD_SUBCAT_TYP ('DYN METADATA VIEW', ' DISPLAY METADATA STAT")
AND B.CD_TYP = P_INPUT_TAB
AND ROWNUM = 1;
RETURN l_prtt_cde;
EXCEPTION
WHILE OTHERS THEN
DS_CONTROL_UTILITY. EXP_LOG_ENTRY (SYSDATE, SQLCODE, SQLERRM, 'GET_PRTT', P_INPUT_TAB, NULL, NULL, NULL, NULL, NULL);
END get_prtt;
I get the error message when compiling this code as "table or view does not exist", it seems that the name of the table is not being properly referenced in the Begin section, could someone please help me in this regard.
Mahir,
EXECUTE IMMEDIATE 'SELECT PRTT_CDE INTO :L_PRTT_CDE FROM '||P_INPUT_TAB ||' A, CD_VAL_DYN B WHERE A.PRTT_CDE = B.CD_VAL_TXT AND B.CD_SUBCAT_TYP IN (''VIEW DYN METADATA'', ''VIEW STAT METADATA'') AND B.CD_TYP = P_INPUT_TAB AND ROWNUM= 1' USING OUT L_PRTT_CDE;
It does not work.
P_INPUT_TAB seems to be used as a variable to link too: B.CD_TYP = P_INPUT_TAB).
And anyway we didn't EXECUTE IMMEDIATE a 'SELECT INTO' but a 'SELECT' IN something.
This should be better, with some attention to code SQL injection as well:
function get_prtt(p_input_tab in varchar2) return varchar2 is l_prtt_cde varchar2(100); l_query varchar2(4000) := q'{ SELECT prtt_cde FROM $$INPUT_TAB a, cd_val_dyn b WHERE a.prtt_cde = b.cd_val_txt AND b.cd_subcat_typ IN ('VIEW DYN METADATA', 'VIEW STAT METADATA') AND b.cd_typ = :1 AND rownum = 1 }'; begin execute immediate replace(l_query, '$$INPUT_TAB', dbms_assert.sql_object_name(p_input_tab)) into l_prtt_cde using p_input_tab; return l_prtt_cde; exception when others then ... end get_prtt ;
Tags: Database
Similar Questions
-
Please can someone help, need password CNU9497P2C
I have the same problem and its driving me crazy... I need the BIOS password because I can't access to this
[number of Series edited by Moderator]
Please can someone help, need password
HP MINI CQ10
Sweb try.
e9lovox27e
3rd letter tiny L.
4th and 6th letter lowercase o.
Use this code to go into the BIOS.
Disable all passwords that are enabled.
If demand for CURRENT password using this code.
Request NEW password just press ENTER.
If asked to hit just to CHECK password to enter.
Save and exit.
REO
I must inform you that these services are not endorsed by HP, and that HP is not responsible for any damages that may occur to your system using these services. Please be aware that you do so at your own risk.
-
Need help with regard to the audit
Hi all
Im trying to audit the actions of users who access the database.i.e I get requests from users. In the column sqltext from sys.aud$ table im get entries. But the problem is im not getting queries like
Select employee_id in system.employee; (IE queries containing specific attributes to select)
but it is audit queries like
Select * from system.employee;
Select count (*) in the system.employee;
Select count (*) in the system.employee, system.department;
Please help me with this...
ThanxHello
As Justin says: maybe you first want to work on the correct schema.
SYS and SYSTEM schema is not "playgrounds".
It is strongly deprecated by Oracle to create or modify objects in the schema these.Published by: hoek on November 4, 2009 16:34 typo
-
Help needed recovery for Equium A300D - 13 X
Hi all
Having experienced too many problems for the list with my satellite a 300 d 13 X, hardware and software, I decided to go ahead with a restore to the factory settings.
My first step was to create 2 discs recovery DVDs, using the Toshiba Recovery Disk Creator.
As far as I know, two recovery disks were created with success, insofar as the recovery disc creator has stated as such.Not knowing what step to take next, I started the laptop with the fist of the disc in the disc drive, two thinking recovery that it would reset the laptop to its factory settings, but it does not.
Now, when I start the laptop, I get the following message;
BOOTMGR is missing
Press Ctrl + Alt + Delete to restartwho restarts the laptop showing the above message again.
By pressing F8 at start up does nothing.
By pressing F12, multi boot selection, reveals a start with 3 options Menu;
HDD1: TOSHIBA MK2046GSX-(S1)
CD/DVD: MAST * ADVD-RAM UJ - 850 S-(PM)
LAN: Marvell Yukon 88E8040TIf I select the CD/DVD option, a black screen with the text;
Windows is loading files
is shown. I am guessing it is the correct path to recovery.
However, after the screens following recovery about the language selection utility etc., a text filled with the dialog boxX:\windows\systems32\cmd.exe
Cross, but eventually reached a static state line:
Copy of F:\06948XSP.swm to V:\HDDRecovery\SWImg 1/6
without to successfully complete the recovery process.
Any help to fix this would be greatly appreciated.
Kind regards
KeV.> My first step was to create 2 discs recovery DVDs, using the Toshiba Recovery Disk Creator.
> As as far as I know, the two recovery disks have been successfully created, insofar as the recovery disc creator has stated as such.What to tell buddy you've done everything right.
The recovery disk was created successfully (you saw a message saying this?).
Boot from recovery disk should start the collection procedure and you must follow the installation on the screen.
Usually, this should work.The error; BOOTMGR is missing says that boot manager on the HARD disk has been removed and it of not possible to boot from the HARD drive.
You must boot from the CD you have done; by pressing F12 choose CD/DVD driveTry to format the HARD drive using another CD of Windows.
In this case, you need to set SATA compatibility mode in the BIOS, then you could boot from the WinXP CD.After that try the recovery disk again
-
help needed please HP officiate 7500E on iMac
Hi can someone please help, I have an officejet 7500 large format (all-in-one printer scanner fax) it works ok on my imac for some time now.
Today I updated my software to Yosemite, I got the computer connected by usb directly to the printer and also a wireless to my network, so my imac, iPad and iphone can link to it.
Now, whenever I try to scan print from the HP utility it does not find the printer or when he finds it nothing happens. What software can I download to run spring ter, I think the HP utility that I have is for windows, not the Imac. Regards Allan
Hi @AllanPar ,
I see that you experience printing problems, since the upgrade to Yosemite. I can help you with this.
What is the name and the product number of your printer? How can I find my model number or product number?
There are 4 models Officejet 7500.
Unplug the printer from the Mac.
Remove the printer in printers and Scanners. (old drivers) Click on the Apple menu and then click on System Preferences.
Click on Printers & Scanners, highlight the printer on the left column and click on the sign - to remove this driver.Then connect the printer to the Mac again and to automatically add the printer in printers and Scanners.
If it doesn't, run the Apple updates. Go to Apple, about this Mac, click on the "View" tab at the top of the window and click on software updates.
Then, check the name of the installed driver, highlight the name of the printer on the left side of printers and Scanners window and on the right side of the screen, it should show the name of the printer. (Officejet 7500)
If it is not properly, remove and add it again. (you may need to click the drop down to select the name of the printer)
Test the printer.
If you're still having problems, try the following:
Fix permissions of the drive on the Mac:
Close all applications.
In the Apple menu, click OK, click Applications, and then click utilities.
Double-click disk utility.
Highlight your hard drive / partition on the left.
Click on check and then repair disk permissions.
Restart the computer...
Reset the printing system:
Note: This will remove all printers in the print and Fax/Scan, any printer deleted can be re-added later by clicking the sign plus (+) symbol.
Click the Apple icon, and then click System Preferences.
Click on Printers & Scanners.
Make a right click (or Ctrl + click) in the left white side panel, and then click Reset printing system.
Click OK to confirm the reset.
Type the name and the correct password.
Click OK to reset the printing system.
Then click the + to add the driver, you may need to click the drop-down menu to select the name of the printer, and then click the Add button. (it could automatically default to a different name of the driver)
Try to print.
If you need help, let me know.
Have a wonderful day!
Thank you. -
Please help - need Urgent read MCC.
First of all Hello.
I developing a dialer application for the telecommunications company, that I work for, to easilly allow our users to call through our network (we sell cards call and the phone through a number of carrier selection which must be dialled before the destination). The problem is that I am in need to read the MCC code from the telephone network, the user is saved so that I can detect if the topic is on homelessness, and what country the user is currently in order to call the correct number to reach our switch and router properly, but also to load correctly.
I tried to use getNetworkOperator() of TelephonyManager, but it returns an empty string. I also tried other methods to get the country (all TelephonyManager), nothing works.
If anyone can help, I would be VERY grateful.
Kind regards
SK
Hello
Welcome to the forum!
At the moment I can not test, but on Android devices, there is another method for the mcc and mnc news.
Of your business, you can try the following calls:
getResources () .getConfiguration () .mcc
getResources () .getConfiguration () .mnc
-
Error driver Power State failure in my 64it win8 - help needed
Hello
Please help me get rid of this error on blue screen now.Here is the mini dump placed on SkyDrive.http://sdrv.Ms/11mujThPlease let me know fix this error.Kind regardsRajendra PrasadRP
A DMP was related to your video driver nvlddmkm.sys takes too long to respond. In order to make sure you need run driver verifier
Driver Verifier
Using Driver Verifier is a dubious proposition. Most of the time it will crash and it will tell you what is the driver.But sometimes it will crash and will not tell you the driver.
Sometimes it will crash until you can connect to Windows. If you can't mode without failure, then you will have to resort to editing the registry offline to disable driver verifier.
I suggest that you first back up your data and make sure you have access to another computer so you can contact us in case of problems.
Then do a system restore point (so you can restore the system using the functionality of Vista/Win7 Startup Repair).
Here is the procedure:
Click Start and type "auditor" (without the quotes) and press enter
Select 'Create a custom settings (for code developers)' and click 'Next' (or Type "check/standard/all" (without the quotes) If you want to check each of them (this will slow down your computer))Choose "Select custom settings from a full list" and click "Next".
Select the entire document except for "Low resource Simulation" to win 8 do not check concurrency stress test and the verification of the conformity of DDI, click "next".
Select "Select driver names from a list", then click "next".
Select all drivers that are NOT provided by Microsoft, and then click "Next".
On the next page, select "Finish".
Restart the system and wait as he crashed to blue screen.
Continue to use your system normally and if you know what are the causes of the crash, do it several times. The objective here is to get the system crash because Driver Verifier is stressing out the drivers. If it is not planted for you, then let it run for at least 36 hours of continuous operation.
If you are unable to Windows because it crashes too early, try safe mode.
If you can't mode without fail, try to use the system from the installation DVD restore to bring the system back to the previous point of restoration that you created.Further reading
http://support.Microsoft.com/kb/244617Words of driver verifier
Information check driver driver Windows Vista - Microsoft Search Verifier
Questions of Verifier within Vista / Windows 7 http://support.microsoft.com..default.aspx?+verifier1&res=20
Pilot feature pool http://support.microsoft.com/kb/188831 -
Software Download Help Needed!
I bought Adobe Creative Suite (DVD package). I now have a new MAC that doesn't have a CD player. How can I get my software loaded on my new computer? I paid a large sum of money on this software so I need help!
Please download it again Internet Setup and keep a copy of it for future use.
http://helpx.Adobe.com/x-productkb/policy-pricing/CS6-product-downloads.html
- Follow the instructions on the screen to install
- When you are prompted for a serial number, enter your serial number and complete the installation.
Kind regards
Ashutosh
-
Stuck with - update-help needed
Hello everyone and thanks for reading!
I have the following problem with the update statement. Tables and data in them are as follows:
Table 1: XML_TRANSFER
Table 2: FIR_SETcreate table XML_TRANSFER as select 111111 TAX_NR, 1 TYPE, 3000 PRIJ, 3000 POBOT from dual union all select 222222 TAX_NR, 1 TYPE, 720.7 PRIJ, 350.70 POBOT from dual union all select 333333 TAX_NR, 1 TYPE, 2600 PRIJ, 2100 POBOT from dual;
OK, the tables and data are now set to the logic of "update".create table FIR_SET as select 2011 LET, 7 KROG, 111111 TAX_NR, 10 STEV_FAK, 2000 VALUE_ODPR, 0 VALUE_POBOT from dual union all select 2011 LET, 7 KROG, 111111 TAX_NR, 11 STEV_FAK, 400 VALUE_ODPR, 0 VALUE_POBOT from dual union all select 2011 LET, 7 KROG, 111111 TAX_NR, 12 STEV_FAK, 400 VALUE_ODPR, 0 VALUE_POBOT from dual union all select 2011 LET, 7 KROG, 111111 TAX_NR, 13 STEV_FAK, 200 VALUE_ODPR, 0 VALUE_POBOT from dual union all select 2011 LET, 7 KROG, 222222 TAX_NR, 1 STEV_FAK, 200 VALUE_ODPR, 0 VALUE_POBOT from dual union all select 2011 LET, 7 KROG, 222222 TAX_NR, 2 STEV_FAK, 20.7 VALUE_ODPR, 0 VALUE_POBOT from dual union all select 2011 LET, 7 KROG, 222222 TAX_NR, 3 STEV_FAK, 100 VALUE_ODPR, 0 VALUE_POBOT from dual union all select 2011 LET, 7 KROG, 222222 TAX_NR, 4 STEV_FAK, 400 VALUE_ODPR, 0 VALUE_POBOT from dual union all select 2011 LET, 7 KROG, 333333 TAX_NR, 81 STEV_FAK, 2600 VALUE_ODPR, 0 VALUE_POBOT from dual;
Look at the data in the XML_TRANSFER table.
1st row (with TAX_NR = 111111):
UPDATE statement in this case should work as: the VALUE_ODPR must be the same as VALUE_POBOT in the FIR_SET table.
This part, I managed to do with this SQL:
Resoult is like:PROCEDURE xml_update is BEGIN update fir_set an set an.value_pobot = an.value_odpr where let = (select distinct max(let) from fir_set) and krog = (select max(krog) from fir_set) and (select sum(a.VALUE_ODPR)-b.POBOT from fir_SET a, xml_transfer b WHERE a.tax_nr = b.tax_nr and an.tax_nr = a.tax_nr group by a.tax_nr,b.POBOT) = 0; commit; end;
OK the following example is a little more complicated and I can't understand it. I don't know how to explain it properly... I'llLET KROG TAX_NR STEV_FAK VALUE_ODPR VALUE_POBOT ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- 2011 7 111111 10 2000 2000 2011 7 111111 11 400 400 2011 7 111111 12 100 100 2011 7 111111 13 200 200
Post the resoult and try to explain it:
So what we need to do, it's that we check is XML_TRANSFER. POBOT - VALUE_ODPR > 0, if it is, then we are updating VALUE_POBOT with VALUE_ODPR.LET KROG TAX_NR STEV_FAK VALUE_ODPR VALUE_POBOT ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- 2011 7 222222 1 200 200 2011 7 222222 2 20.7 20.7 2011 7 222222 3 100 100 2011 7 222222 4 400 30
In the next line check us again if the above statement is correct, and if we do the same thing. The process will continue as long as the statement
will be correct.
If the statement is no longer correct to do this operation: XML_TRANSFER. POBOT - SUM (VALUE_ODPR) (ON THE INSIDE OF THE SAME TAX_NR! Then group by tax_nr!)
and last update row with resoult. In any case, we can get negative numbers.
I really do help I explained my problem so that you can understand what I want to achieve. If you have any questions do not hesitate to ask.
Thank you very much for your help!
Best regards, Cain!Hello
OK, I think I knew this time:
update fir_SET an set value_pobot =( select case when calc_VALUE_POBOT> 0 then calc_VALUE_POBOT else 0 end from ( select a.rowid row_id, case when b.pobot - sum(a.value_odpr) over (partition by a.tax_nr order by a.stev_fak) >=0 then value_odpr else value_odpr + b.pobot - sum(a.value_odpr) over (partition by a.tax_nr order by a.stev_fak) end as calc_VALUE_POBOT from fir_SET a, xml_transfer b WHERE a.tax_nr = b.tax_nr ) tmp where an.rowid = tmp.row_id ) where let = (select distinct max(let) from fir_set) and krog = (select max(krog) from fir_set) ;
Is this ok for you?
Kind regards
Sylvie -
Help needed - "cannot download the folio on your local drive.
Hello
(WARNING: for the first time post :-))
I have trouble downloading my folio published. During the last 24 hours I repeatedly get the following error (after a long wait with the status 'Preparation content by downloading... ") on different computers (Mac/PC) and browsers:
An error occurred during the export of the folio
Could not download the folio on your local drive
My first version is delivered to an Android app (created using the viewer Builder) and has been incorporated into an iOS app (also created using View Designer). All this worked without any problems and I can export this now.
In order to optimize the folio for the new iPad, I decided to use the PDF option that required me to rebuild the folio. The content is identical to the bar a few dates changed from 2011 to 2012. I just need to export the folio so I can incorporate into an update iOS application. The folio is not (at this stage) given to the Android app.
I hope someone can help :-)
Andrew
Edit: Using the new Adobe Content Viewer I see TWO versions of the folio - one with the lightning bolt blue - but maybe that's normal?
Hi Philippe,.
Thanks for the reply. After a lot of testing, I discovered that my preview of the cover images were the problem. I've been using PNG files and when I used the versions JPG export worked.
Maybe that's a one-time problem, but I thought I'd share the solution in any case.
Kind regards
Andrew
-
Help needed to add the hyphen in REGEXP_REPLACE
Hi all
I need a help to add the hyphen in my selection criteria so that it does not filter the hyphen.
I use below REGEXP_REPLACE get my result, everything's fine now except the hyphen (-) character is not recognized.
Select REGEXP_REPLACE ('abcd - efgh123 {} $ (), ',' [^ [a - z, A - Z, 0-9, (,), {,}, _, $,., ", [: space:]]] *',") twice;
Can you please help?
Thank youIf you want to keep the hyphen in your string, you can use sth. as
select REGEXP_REPLACE('abcd-efgh123{}$(),', '[^a-zA-Z0-9(){}_$.,''[:space:]-]*','') from dual
Best regards
Maxim
-
Hi all
I m using oracle 9i and oracle developer suite for building reports 6i
I've written a procedure that will do the math
This code fetch the timeallowed and the timetaken prtempincent table, did the math, and then I want to insert it to another table and show them in reportPROCEDURE calc IS TALLOW NUMBER; TTAKEN NUMBER; TPROFIT NUMBER; TLOSS NUMBER; BEGIN SELECT TIMEALLOWED,TIMETAKEN INTO TALLOW,TTAKEN FROM PRTEMPINCENT; TPROFIT:=ROUND((GREATEST((ROUND(TALLOW,2) - ROUND(TTAKEN,2)),0)/ROUND(TTAKEN,2)) * 100,2); TLOSS:=ROUND((ABS(LEAST((ROUND(TALLOW,2) - ROUND(TTAKEN,2)),0))/ROUND(TTAKEN,2)) * 100,2); INSERT INTO PRTEMPINCPL(CARDCODE,JOBCARDNO,SHOP,TIMEALLOWEDHRS,TIMETAKENHRS, TIMESAVED,TIMELOST,PROFIT,LOSS,REMARKS) SELECT '5',JOBCARDNO,SHOP,TIMEALLOWED,TIMETAKEN,TIMESAVED,TIMELOST,TPROFIT,TLOSS , DECODE(SIGN(TIMEALLOWED - TIMETAKEN),1,'ABN.PRFT',-1,'LOSS') FROM PRTEMPINCENT WHERE ((PAYPERIOD= :P_1 AND (TIMETAKEN )>( TIMEALLOWED )) OR((TIMEALLOWED )>(TIMETAKEN )AND(((TIMEALLOWED ) - (TIMETAKEN ) ) /(TIMETAKEN)*100)>50)); END;
I call this procedure after the function of the report parameter
but I gives me error ora-1422 fetch retrieves more then need to number of lines
Change WHT should I do in the following procedure I have search for the record on by one and then insert into another table
Concerning
AertsAerts,
You'll get hours of minutes in GROUND (
/ 60) and other minutes in MOD (, 60) .I hope this helps.
Kind regards
Manu.
If my answer or the answer to another person has been useful or appropriate, please mark accordingly
-
For some reason I can't find a specific for this laptop network driver. Miss me the network controller and I tried so many drivers but can't find. Please if anyone can help that would be great! It is a win 7 64-bit, network controller driver, the hp 15-af159nr. It is the tactile energy star hp laptop.
Hello:
According to the list of parts for your laptop below, it comes with an adapter Broadcom BCM43142 802.11 b/g/n 1 x 1 Wi - Fi and BlueTooth 4.0 m2 combination WLAN.
http://PartSurfer.HP.com/search.aspx?SearchText=P1A98UA
These would be wireless and bluetooth, drivers that you need for this model of the wlan card.
The package contains the Broadcom wireless LAN drivers and utility which are required to enable the LAN adapter wireless Broadcom integrated into laptops supported that run an operating system supported.
File name: sp70888.exe
This package contains the Broadcom Bluetooth driver and software for models supported that are running a supported operating system. Broadcom Bluetooth 4.0 driver is required to enable the Broadcom Bluetooth 4.0 devices and is compatible with Broadcom Bluetooth 3.0 and earlier versions.
File name: sp71440.exe
-
HP Pavilion Notebook - 17-f207: Please help-need driver
I need driver for
HP Pavilion Notebook - 17-f207
hardver id is:
ACPI\VEN_ASD & DEV_0001
ACPI\ASD0001
* ASD0001Thanks for the help
S
Hello:
I zipped and attached to the driver that you are interested in below...
Download and uncompress the file in its folder.
Don't do anything with the files in the folder.
Go to Device Manager and click on the device ACPI\VEN_ASD & DEV_0001 who need the pilot.
Click the driver tab. Click on set to update driver.
Select her browse my computer for driver software option and navigate to the driver folder, that you unzipped.
Make sure that the include subfolders is selected and the driver should install.
Restart the PC.
-
Help needed interview about a series of Satellite Pro S500-C11
Hello to all readers,
Computer problem laptop Satellite Pro S500-C11 series.
My wife, age 82, died last month. I have his cell phone in front of me with an apparent hardware failure. If I touch the bottom left of the laptop open, while entering text, the cursor jumps all over the screen and the text becomes garbled. I think my left hand wrist needs rest momentarily on the space to the left of the cursor buttons.
I have some details on the purchase of the guarantee in the form of a contract number: FF5D900C with what I think is the registration number: 1 048 * H.
The age related hearing problems I have trouble using the phone in an effective way. Is there anything I can communicate with the Service Center Online, please?
Any help will be greatly appreciated.
Hello
Respect! Yet in sufficient form to use computers
In General if your equipment begins to malfunction, the authorized Toshiba maintainer would be able to solve this problem.I don't know if you can contact the ASP mail, but first you must find the ASP in your country of m.
Here you can find all of the ASP based all over the world:
http://EU.computers.Toshiba-Europe.com/innovation/generic/ASP_SUPPORT/By the way: try to disable the touchpad while typing... you can turn off this Fn + F9 help
In my case, the cursor jumped because I accidentally touched the touchpad while typing...
Maybe it helps...
Maybe you are looking for
-
won't let me change the username to the Web site
Firefox will not connect on the site that I use. It will automatically change my username Allie to allie, who is wrong. I am able to connect this site using another search engine, however, I prefer people on the site Web of firefox could not help me
-
menu bar is missing
-
Hello. I just logged into my account and nothing in my balance. The last time I had over $ 7.50 and is now 0.00. Checked the story - nothing. I am the only user of this account. I am deeply disappointed with Skype. You need once and he's not here. I
-
Some otherwise identical digital controls have white behind the numbers, other gray
On the attached screenshot, there are two Express Digital controls in the lower right corner. I did the replace operation to make sure that both are the same type of control, still it white behind the numbers and the other is grey behind the numbers
-
Page counter reset after firmware update
Hello I have a problem with our hp laserjet P2055dn printer and I hope someone can help - HP support didn't! After the last Firmwareupdate (20090430 20120615) complete counters are set to 0 - I just couldn't believed, until I checked the other witch