How to get this working procedure to analyze the value of the list?
I have the following data in the table t1
ID DRUG_ID
DB00523 564; DB00926; DB03873
DB00893 566; DB01294; DB05260
the desired output is as the following table t2
ID DRUGID
DB00926 564
DB03873 564
566 DB01294
566 DB05260
I am trying to write a stored procedure to achieve the goal, since the actual list is very long. but it returns the error on the select part of the lower.
Any suggestion will be appreciated.
CREATE OR REPLACE PROCEDURE checklist IS
number of Oneid;
TYPE BBType IS REF CURSOR;
BBType BB;
onerecord Q1% ROWTYPE;
BEGIN
For oneid in (select id from t1) LOOP
FOR I IN 1.2 LOOP
Open BB for ' select id, substr (drug_id, instr(drug_id,';',1,i) + 1, instr(drug_id,';',1,i+1)-instr(drug_id,';',1,i)-1) from t1
loop
Retrieves BB in onerecord;
INSERT INTO t2 (ID, drugID) VALUES (onerecord.id, onerecord.drugid);
end loop;
close the BB;
ENDLOOP;
ENDLOOP;
END;
Frank,
Thank you very much for your help. It works very well!
Jane.
Tags: Database
Similar Questions
-
My Norton Security prevents the use of the magic. How to get this working
install a new update Norton security, which don't allow my magic Jack to connect to the land line.
Hey Neville,
Your problem is with Norton Security, and you need to contact them for assistance with this problem. I suggest you start here: http://us.norton.com/support/index.jsp.
Good luck and best wishes!
-
When I go to get the modules (7.0.1), there is no evidence, except the info bubble "which are the modules. How to make this work? The rest of the functions in this section seems to work. And I can get MY addons, but not the available modules.
On the left side, click Extensions.
-
Hi there is a balance of $20 showing on my Itunes account, however I don't seem to be able to use it to download a movie to rent.
Can someone tell me please how to get this balance...
What happens when you try to rent the movie? If you use a family sharing and that you are the family Organizer so you won't be able to use your balance.
-
CODE - 641 Windows update has encountered an error of unkonwn. How to get this right
CODE - 641 Windows update has encountered an error of unkonwn. How to get this right
Try to run the tool:
-
Do I need to eliminate one of the creative clouds? How to make this work-2 accounts on one computer?
Hi Kim,
Two creative cloud subscriptions registered under 2 different unusable i.d. together on a single computer.
Must disconnect and connect each time as the creative cloud desktop application, in order to be able to use another subscription.
-
I am installing CC on an iMac late 2015. I get the following error message: Firefox doesn't know how to open this address, because one of the following protocols (aam) is not associated with any program or is not allowed in this context. You may need to install additional software to open this address. "Someone knows what's going on?
Please try to download from: https://helpx.adobe.com/creative-cloud/help/install-apps.html. You can also try to download using the different browser.
-
After getting a new mac mini, all of my adobe products worked except photoshop. I get this message. Check with the developer to ensure that Adobe Photoshop CS5.1 works with this version of Mac OS X. You may need to reinstall the application. Don't forget to install the updates that are available for the application and OS X. I bought it originally, but do not know were my installers are. Can I get a new installer?
1st, CS5 is 4 + years old so you MAY have problems with the latest Apple operating system
Yosemite sometimes has problems, often related to the 'default' permissions that need to be changed
-solution https://forums.adobe.com/thread/1689788 of a person
- and a Java update https://forums.adobe.com/thread/1507936
-Update may break things https://forums.adobe.com/thread/1772260
2nd, try previous versions http://www.adobe.com/downloads/other-downloads.html
-
I reinstalled adobe CS6. my other macs, I had a printer named 'Adobe PDF', that I could choose that as my printer and a dialogue box came up, I named the file and the location. I can't figure out how to get this done on my new mac. Help
There are two ways to create a PDF on a Mac:
(1) you can use the default method, which is to choose file > print. Click on the PDF menu below on the left, then click on save as PDF. This lets you name and save the PDF file using the mechanism of OS X to create PDF files.
(2) in the same menu, you can save in Adobe PDF format. It runs a script (a little slow) that lets choose you what PDF settings file you want to use. This is the Adobe-developed mechanism that replaces the old Virtual PDF printer.
-
Facebook like button does not work, I used the widget of muse and created the facebook code. Anyone know how to make this work?
Hi connally25,
Here is a link to a video tutorial on how to add a Facebook button, please check if you have followed the same steps to add the video.
http://TV.Adobe.com/watch/learn-Adobe-Muse-CC/adding-a-Facebook-like-button/
If you followed the steps correctly and the button still does not; Here is a link to a forum thread which may help to solve the problem:
Facebook follow Widget does not
Concerning
Sonam
-
tried for three days trying to get this working and I've already tried some of the suggestions forum and it's just to try... so happy I don't have pais nothing yet. I get out the signed loop no matter what I try
While in have you really tried? It's the standard solution, and it works in all cases that I have heard (including mine). Just rename the file, and a new one is created on the next launch.
-
We have a new computer and I can't get my watch running from garmin for synchronization with mozilla. The error message I get is "address not was heard.
Firefox doesn't know how to open this address, because one of the following protocols (connectagent) is not associated with any program or is not allowed in this context.
You might need to install other software to open this address."
Help please
Hi grranchgirl, if you have an "Always enable" and "never activate?
I don't know if the terms 'modern' and 'classic' mean anything to you, but there is a thread on the Garmin forums that might be useful - it is very long and I didn't read it all.
-
"original title: NTA0104.dll.
whenever I re - start the computer I get this error: could not load the file nta0104.dll. How can I fix?
HM
Hello
Google who provides virtually no information that suggests it might be the malicious program or a start remains for her entry search
Download update and scan with the free version of malwarebytes anti-malware
http://www.Malwarebytes.org/MBAM.php
You can also download and run rkill to stop the process of problem before you download and scan with malwarebytes
http://www.bleepingcomputer.com/download/anti-virus/rkill
If it does not remove the problem and or work correctly in normal mode do work above in safe mode with networking
Windows Vista
Using the F8 method:
- Restart your computer.
- When the computer starts, you will see your computer hardware are listed. When you see this information begins to tap theF8 key repeatedly until you are presented with theBoot Options Advanced Windows Vista.
- Select the Safe Mode with networking with the arrow keys.
- Then press enter on your keyboard to start mode without failure of Vista.
- To start Windows, you'll be a typical logon screen. Connect to your computer and Vista goes into safe mode.
- Do whatever tasks you need and when you are done, reboot to return to normal mode.
If the error persists after scanning use this program to out startup
This utility, which has a knowledge of auto-starting locations of any startup monitor, shows you what programs configured to run at system startup or login and that the entries in the order of processing windows. These programs include those in your startup folder, Run, RunOnce, and other registry keys. You can configure Autoruns to show other locations, including Explorer shell, toolbar extensions, helper objects to the browser, Winlogon notifications, auto and many start-up services even more.
-
I get this error while turning on the firewall manually
Here are a few steps to try troubleshooting:
http://Windows.Microsoft.com/en-us/Windows7/using-the-network-troubleshooter-in-Windows-7
http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-network-connection-problemshttp://Windows.Microsoft.com/en-us/Windows7/cant-connect-to-a-network
If those who do not work, let us know exactly what is happening and when.
B Eddie -
Mr President.
My servlet code does two things
1 see the report in JasperViewer
2. it download it in pdf in chrome.
How to modify this code it gives only the view in JasperViewr?
My code is
package esh.view; import esh.model.AppModuleImpl; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.HashMap; import java.util.Locale; import java.util.Map; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.sf.jasperreports.engine.JasperCompileManager; import net.sf.jasperreports.engine.JasperExportManager; import net.sf.jasperreports.engine.JasperFillManager; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.JasperReport; import net.sf.jasperreports.engine.design.JasperDesign; import net.sf.jasperreports.engine.xml.JRXmlLoader; import net.sf.jasperreports.view.JasperViewer; import oracle.jbo.client.Configuration; @WebServlet(name = "MultiReportServletJasper", urlPatterns = { "/multireportservletjasper" }) public class MultiReportServletJasper extends HttpServlet { private static final String CONTENT_TYPE = "text/html; charset=UTF-8"; public void init(ServletConfig config) throws ServletException { super.init(config); } protected Connection getConnection() { PreparedStatement st = null; String amDef = "esh.model.AppModule"; String config = "AppModuleLocal"; AppModuleImpl am = (AppModuleImpl ) Configuration.createRootApplicationModule(amDef, config); st = am.getDBTransaction().createPreparedStatement("select 1 from dual", 0); Connection conn = null; try { conn = st.getConnection(); return conn; } catch (SQLException e) { } return null; } public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String var0 = ""; String reportName = ""; try { reportName = request.getParameter("reportName"); } catch (Exception e) { e.printStackTrace(); } response.setContentType(CONTENT_TYPE); Map parameters = new HashMap(); parameters.put("format", "pdf"); parameters.put("WEBDIR", getServletContext().getRealPath("/")); parameters.put("REPORT_LOCALE", new Locale("ar")); Connection conn = null; InputStream is = null; try { conn = getConnection(); is = getServletContext().getResourceAsStream("/WEB-INF/reports/"+reportName+".jrxml"); response.setContentType("application/pdf"); response.addHeader("Content-Disposition", "attachment; filename="+reportName+".pdf"); JasperDesign jasperDesign = JRXmlLoader.load(is); JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn); JasperExportManager.exportReportToPdfStream(jasperPrint, response.getOutputStream()); JasperViewer.viewReport(jasperPrint,false); conn.close(); } catch (Exception e) { e.printStackTrace(); } finally { closeConnection(conn); try { if(is !=null){ is.close(); } } catch (Exception localException1) { } } } protected static void closeConnection(Connection conn) { try { if(conn !=null){ conn.close(); } } catch (Exception ex) { // System.out.println("Developer Msg : Exception in printReport1Servlet.closeConnection()"); } } }
Concerning
Change: response.addHeader ("Content-Disposition", "attachment; filename = "reportName +".pdf");"
To: response.addHeader ("Content-Disposition", "inline; filename = "reportName +".pdf");"
Browser first tries to show the PDF, and if no pdf reader is available, you will get the download dialog box.
(and remove JasperViewer.viewReport (jasperPrint, false); )
Dario
Maybe you are looking for
-
I had these extensions installed since February 2015, when I bought my new computer. They always worked very well, but this morning I noticed that each say, «McAfee WebAdvisor/Skype Click-to-Call/Yahoo Toolbar could not be verified for use in Firefox
-
Can you connect a Bluetooth headset to MacBook Pro?
I'm getting a MacBook Pro for College and that the helmet I have Bluetooth. Are they connect to the computer?
-
Can I use ram newest and fastest of the new iMac in 2009 Mac Mini?
I just got a new iMac 27 "2015 5K. I upgraded the RAM to 8 GB to 32 GB of ram. I have now 2 4 GB SODIMM to spare. Does anyone know if the ram works in a Mini of Man 2009 (although the speed of the mini bus)? New ram specifications: PC3-12800 1600 M
-
Satellite Pro A300 PSAG9E - Win 8 upgrade questions
I decided to update my old Toshiba Satellite Pro A300 PSAG9E-00700TTE Vista to Windows 8. After two tries he has been successful. Vista made me mad, and when I decided to give my son, I wanted to work better. Toshiba doesn't seem to be willing to sup
-
Reinstall XP on Satellite A100 without CD
Hello I bought a Satellite A100 just now, and it came with XP is already installed. Over the years, I've collected (unintentionally) and other virus and now I want to reformat the drive. Problem is when I try to access the partition as described in t