How to do? Need help for syntax - new syntax Oracle

create or replace
PROCEDURE "SP_SAMPLE_data" (AutoCAD in VARCHAR2) AS
where_criteria tank (100);
BEGIN


If prodName = 'A' then
I want to build the where criteria string as the 'product_name in ('iPod', 'iPad').
on the other
I want to build the where criteria string as the 'product_name = read directly from the variable (prodName) spent '.
end if;

Select *.
of 'monschema '. ""MyTable"
where concatenated where_criteria here - do not know how to concatenate.

END SP_SAMPLE_data;

New Oracle PL/SQL syntax.

Oracle 10 g 2

You can try something like this

create or replace procedure SP_SAMPLE_data (prodName in VARCHAR2) AS
   where_criteria char(100);
   sql_stmt varchar2(1000);
BEGIN
   if prodName = 'A' then
      -- I want to build the where criteria string as "product_name in ('iPod','iPad')"
      where_criteria := 'product_name in (''iPod'',''iPad'')';
   else
      -- I want to build the where criteria string as
      -- "product_name = directly read from the passed variable(prodName)"
      where_criteria := 'product_name = '''||prodName||'''';
  end if;

  sql_stmt := 'select * from MySchema.MyTable'||where_criteria;

END SP_SAMPLE_data;

I added the variable SQL_STMT as I'm not sure what you want to do with SQL statement once it is created. Do you intend to run it in the procedure or pass it on to the calling environment? If you need to pass this return, specify SQL_STMT as the out parameter.

Tags: Database

Similar Questions

  • NEED HELP for VERY new blackBerry for Blackberry Smartphones

    Hello to all the experts in BB,

    I'm new to BB and I have a few general questions - I have the Pearl 8900 w / T-Mobile - I'm sure someone can answer:

    -Where will the messages when I delete them? There is a deleted file?

    -When I sync, is anyway to do it faster? I checked under the configuration, the "Elements only future Sync" but synchronize them, every time he goes through my contacts and calendar all over - it takes way longer than what I'm use to - I had T Mobile Wing and would use Microsoft Active Sync and who took seconds to find and update the items.

    Thank you very much!!!

    vfranco78 wrote:

    Hello to all the experts in BB:

    -Where will the messages when I delete them? There is a deleted file?

    Nope, no file deleted on the device. There might be on your mail server, but once deleted, deleted the device is erased.

    vfranco78 wrote:

    -When I sync, is anyway to do it faster? I checked under the configuration, the "Elements only future Sync" but synchronize them, every time he goes through my contacts and calendar all over - it takes way longer than what I'm use to - I had T Mobile Wing and would use Microsoft Active Sync and who took seconds to find and update the items.

    You can disable the calendar or tasks you want to synchronize, for example if you never your tasks and memos, disable this feature in the configuration of the synchronization.

    I can tell you this, Desktop Manager version 5.0, which has not been released yet, it's MUCH faster. Zip, done.

    Be patient, I don't know when it comes out, but it will be someday.

  • I am a member creative cloud. I want to install the same applications from my laptop to my new desktop computer. I need to purchase another license? otherwise how do the same thing for my new desktop computer

    I am a member creative cloud. I want to install the same applications from my laptop to my new desktop computer. I need to purchase another license? otherwise how do the same thing for my new desktop computer

    I have it! Thank you

  • I need help for the upgrade of my current system.

    I need help for the upgrade of my current system.

    I have SBS 2008 with (Exch 2007, SQL 2005, Sharepoint, backupexec 2010 for sbs) licenses.

    I want to make the larger environment using the following:

    (1) apply Virtualization

    (2) apply to the failover process (clustering)

    "(3) the environment must support adding server terminal server, ERP server, exchange server, domain controller, backup manager.

    Storage 4) that supports Raid (1 and 5)

    UTM excellent 6) that supports (SSL VPN, VPN Global)

    suitable backup solution 7)

    (8) good antivirus for clients

    my questions:

    (1) can you provide me with a good design for this environment

    (2) should I choose what operating system:

    Microsoft datacenter or company

    I know datacenter provide us the unlimited VM but needs per processor license

    so if I have two Grouped servers I want to buy 4 licenses

    and just 4 VMs per company license... to say that we have two servers and maintain 8 vms so wat happened if 1 goes down... How can I migrate the 4 virtual machines on the server failed to another server group... ? should I buy enterprise license?

    (3) if I get the SAN storage for data... How can I save this storage... should I get another SAN?

    (4) how can I upgrade SBS stad single server (windows standrad) without losing the licenses as Exch 2007, SQL 2005, sharepoint.is it a must to buy an edition full std server or there is a way to upgrade (license wise, I mean)?

    (5) what about win2k8 license for VM:

    lets say we have physical that has windows license so that enough to have windows for VM or should I buy windows for VM licenses?

    (6) can I use backExec license for SBS with windows 2008 standard

    (7) who better to virtualization AMD or INTEL

    (8) hyper V or VMware?

    (9) what of Microsoft data protection Manager... is this good?

    (10) what virtual machine manager? What are the benefites keys

    Thanks in advance

    Hello AnasAI,

    You can find the Server forums on TechNet support, please create a new post at the following link:

    http://social.technet.Microsoft.com/forums/en/category/WindowsServer/

  • I need help to the new photo of my photos from iphoto on El Capitan. Any help would be appreciated.

    I need help to the new photo of my photos from iphoto on El Capitan. Any help would be appreciated.

    To migrate your iPhoto library to Photos for Mac, drag it in the Photos icon in the Dock.  Photos will read the iPhoto library and create a new library of pictures of him.

    Is your photo library in iPhoto on an external drive? The migration will work that if the external hard drive Mac OS extended (journaled) file system.  If the library is on a disk with a different file system, Ministry of the environment of the library of a correctly formatted disk.

  • Need help for optical safety circuit.

    I buy these parts and prototype with real components, but since I multisim, I thought it would be nice to create the circuit and maybe work through issues I can practically.

    I need a circuit that takes 120 VCA, generates 5 VDC and 1.5Vdc power of optical transmitter and receiver.  I actually use a data port because he has great range and is pretty cheap.  Rather than send the binary code well I just send a light stead that is broken or not broken through doors and windows in my house.  Then the receiver sees this as an entry and order a relay.

    I tried several voltage regulators that come with multisim, but I get an error of execution of my circuit.  Really I can't the 120 VAC to power levels necessary for the functioning of the optics.

    Otherwise I might want to run on a system 120Vdc with battery backup, so throw a 120Vdc up to 20 v DC switching power supply - but I have not found a SMP in the library which takes 120 as input and as output 20.

    Basic plan: 120VAC source-> transform to 24Vac-> Full bridge rectifier to ~ 20 v DC-> voltage capacitor filter on the input of two voltage regulators (1 to 5 VDC, 1 to 1.5Vdc) - then circuit since the two power supply of the transmitter and the receiver.

    I just need help for 5V and 1.5V, from there, I know that the real world circuit will work component tests already carried out.  Thanks for reading.

    I didn't Multism so I can't advise you on the compatible models. I ran the model on semiconductors with slight modifications of format on my SPICE simulator based on Berkeley Spice 3f5. I had to change the format of model resistance semiconductors appeal but has not changed any values.

    The output of your power supply circuit 3 (with 5 V, not the 1.5 V regulator regulator) was 4.99995 V.

    There are a few messages about changing templates published for compatibility Multisim woth. You can search those to see if there are any suggestions on what you'll need to fix in the model.

    Lynn

  • I need help for activation of the real administrator account.

    I have a problem with Adobe reader 9 standard, Adobe customer service asked the unhide real administrator account before you can continue to help me.

    I need help for that.

    http://www.Vistax64.com/tutorials/67567-administrator-account.html

    http://www.howtogeek.com/HOWTO/Windows-Vista/enable-the-hidden-administrator-account-on-Windows-Vista/

    Read the above info.

    See you soon. Mick Murphy - Microsoft partner

  • I need help for my reader to USB drive on my windows 10 ACER?

    I need help for my reader to USB stick on my chrome windows 10 plug ins acer. Can you help me?

    What Adobe application that you use?

    This is the Adobe Media Encoder forum, and you did not mention anything on this subject. If you can let us know what Adobe application, you need help, we can help you make the right forum.

    Thank you

    Regalo

  • Hello, I need help for cancel the payment on my adobe account.

    Hello, I need help for cancel the payment on my adobe account. I'm from Peru, Im paying a monthly fee as a student. Help, please...

    Cancel your membership creative cloud

  • Hello, need help for Adobe Reader DC playing animation files that are specified in the pdf output by script Latex Beamer. My Adobe Reader DC refuse to open any format that I gave him.  Thank you very much

    Hello, need help for Adobe Reader DC playing animation files that are specified in the pdf output by script Latex Beamer. My Adobe Reader DC refuse to open any format that I gave him.  Thank you very much

    Hey ihorl18351266,

    Please note that you can open PDF files using only the CD player. Any other format will not be supported by the software.

    Kind regards

    Ana Maria

  • I recently bought a PDF suit and I had a catasrophic from my hard drive failure. How can I download one for my new computer?

    I recently bought a PDF suit and I had a catasrophic from my hard drive failure. How can I download one for my new computer?

    Hi Phil,

    Download the last DC of Adobe Acrobat Reader Adobe Acrobat Reader DC install for all versions, Sign In to use the services of the Adobe PDF using your Adobe ID pack.

    You can also use these services online at https://cloud.acrobat.com/

    Kind regards

    Nicos

  • Need help understanding create new network / different subnets for 2nd VM NIC

    I am newer to Vmware and not quite sure that the best way to accomplish the task.  I have a couple of hosts of ESX 4.0 update 1, each host has several physical network connected to the LAN interface cards and iSCSI, vCenter with about 10 mV and each VM has only a single virtual NETWORK adapter for LAN.

    I need to install a new virtual machine with a special application that must be double virtual NICed.  1 NETWORK card must be on the private LAN (e.g. 192.168.10.x) and NIC2 must have a public IP (e.g. 4.2.2.x).  I was going to give NIC2 a private address and NAT through our Cisco PIX firewall, but I am told that causes problems with the application and it must have a public IP address on NIC2.  I now host a card physical NETWORK connected to public physical switch outside the firewall (so I can give him a pub addess).

    I have a physical NETWORK card I booked for this on the Vmware host.  How can I create virtual switch separate from the local LAN, associated with the physical NIC to the virtual switch, assign a range of IP addresses that are associated to the public IP address works (if that's what I do)?  From there on, I think that we would give the real public IP to vNIC2 during the installation of the OS.

    Thanks for any help you can offer.

    Steve

    Welcome to the forums.

    You can add an additional vSwitch and assign the 2nd physical NIC as the uplink. All the networks is done through the vSphere client configuration tab. In the virtual machine settings just add an extra vNIC and connetct for the new vSwitch.

    You should have a look through the information on http://www.vmware.com/technical-resources/virtual-networking/

  • Tecra R840 - need help for installing the SSD

    Hello

    Sorry, again, but I really need help with that?
    My new ssd (arriving in a few days) is a Plextor M5P which is 7 mm thick! My Tecra R840-16J have a thickness 9.5 mm HDD and what I've seen is no caddy!
    I would be grateful all the tricks for installing the ssd drive in my Tecra!

    Thanks for your time,

    Paulo

    Hello Paulo

    As far as I know that some models are available with drive HARD and some with SSD these models with SSD have small SSD support. SSD is fixed by 4 screws in this medium.

    I put t really know how to help you now. Maybe you should contact the nearest Toshiba service provider and ask for help. I think they can check the part number of this door - or maybe order one for you.

  • Need help for reading in parallel on the same interface and writing XNET

    Hello. I need help to configure CAN interface to write and read from the same interface.

    I use NI PXI-8513/2. I use CAN1 as interface.

    My had TO send status messages CAN every 100ms. I have to read in order to return akntoowlege to keep DUT CAN interface happy and not make mistakes.

    So, I want to open Strim Session and readall frames in the loop. At the same time, I need to be able to write in a frame HAD at the time...

    I only need to read one picture at a time too, but since I know the ID, I can pull it from the stream.

    What I'm confusing all is how to put in place the same CAN1 interface to be able to write and read in parallel.

    I think I would get errors that interface is already in use.

    Since I'm new to CAN, I was read and write only when necessary. But, sometimes I was getting errors on my messages. Sometimes I get message, sometimes miss me. But, when I run CAN test criminal as sniffer he sends and written every time. I was told it's because it recognizes all messages.

    I opened to suggestions of how best to implement the interface.

    I guess I can use CAN2 and separator to work around this problem, but I would use an interface if possible.

    Thank you

    Hi Rus,

    The XNET hadrware takes care of most of the low level of detials for you. The reading and writing of the circuits are both connected to the bus at any time. When you write to the hardware it will try to put a frame on the bus at the first opportunity he can. If the frame loses arbitration material re - will attempt to send the frame up is successful. Reception equipment monitor activity on the bus, regardless of what it conveys. The material received will usually throw a framework that was sent by communication equipment, but there is an Echo property pass to circumvent this behavior too.

    Take a look at the example of the expedition: MAY-> NI - XNET-> Sessions-> multiple Sessions Intro-> CAN even exit entry framework Port unique Point.vi. Keep in mind that this example you will need to use a second CAN interface to recognize frames, it transmits. I would recoment against the example CAN output Frame Single Point which would mimic your ECU if you choose a type of cyclic frame running this example.

  • I need help for Windows Vista black screen during the connection, even with the login screen removed

    Hey, I have a problem in Windows Vista:

    I've been updating / updated my graphics card and it is the graphics card, I'm updating, after a while, a black screen will appear (PITCH BLACK) and I there is no cursor and I tried Ctrl + Alt + Delete, but nothing seems to work, after I turned off my laptop, starts to load then it was the new dark night! (NO LOGIN SCREEN). Then I turned off my laptop then I constantly pressed f8, then I pressed "Computer repair" then it loads then my screen showed "Another user", then I clicked it then I had to type my ID but I have no details of connection, I pressed on enter with no connection details, but this still does not work because I had to type in my login information. I tried everything, then I went to safe mode and fact a password and changed my admin account type, then I rebooted my laptop, then I have constantly pressed f8 and pressed "Computer repair" then it loads and then my screen showed 'Another user' again... .

    PLEASE I NEED HELP! I WANT TO PLAY MY GAMES!

    Hello

    Follow the steps below:

     

    Method 1: Do the Startup Repair to fix the problem.

    See the following article for more information on the Startup Repair:

    Startup Repair: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/startup-repair-frequently-asked-questions

     

    Method 2: Use the Bootrec.exe tool in the Windows recovery environment to troubleshoot and repair startup issues in Windows

    For instructions, see the following article:

    How to use the Bootrec.exe tool in the Windows recovery environment to troubleshoot and repair startup issues in Windows

    http://support.Microsoft.com/kb/927392

    Let us know if that helps.

Maybe you are looking for