Operator IN and variable string

Hello,
I have this sentence sql (it is a example):
select p.pa_cod_proyecto, p.pa_tit_proyecto
from spa_pa.pa_proyecto p, spa_pa.pa_rel_proyecto_persona rel
and rel.pa_cod_proyecto (+)= p.pa_cod_proyecto
and (rel.pa_prlogin in (:p21_participantes))
when I execute it, I put in variable :p21_participante for example:
amrodrig,dagarcia
but not operate.
Can you help me?
Thank you. Reggards,
Amparo

SQL> VAR str VARCHAR2(200)
SQL> EXECUTE :str:='20,30'
PL/SQL procedure successfully completed.
SQL> SELECT ename,deptno FROM emp
  2  WHERE deptno IN
  3                (SELECT REGEXP_SUBSTR (:str, '[^,]+', 1, rownum)
  4                 FROM dual
  5                 CONNECT BY level <= LENGTH (REGEXP_REPLACE (:str, '[^,]+'))  + 1
  6                 );
ENAME          DEPTNO
BLAKE              30
JONES              20
SCOTT              20
FORD               20
SMITH              20
ALLEN              30
WARD               30
MARTIN             30
TURNER             30
ADAMS              20
JAMES              30
11 rows selected.
SQL> EXECUTE :str:='10,40,50';
PL/SQL procedure successfully completed.
SQL> SELECT ename,deptno FROM emp
  2  WHERE deptno IN
  3                (SELECT REGEXP_SUBSTR (:str, '[^,]+', 1, rownum)
  4                 FROM dual
  5                 CONNECT BY level <= LENGTH (REGEXP_REPLACE (:str, '[^,]+'))  + 1
  6                 );
ENAME          DEPTNO
KING               10
CLARK              10
MILLER             10
SQL>

Similar Messages

  • UCCX 8.5.1 - Expression editor and a variable string value error

    I receive the followng error when trying to create a varialbe string value using the expression editor. The string value that I am trying to create is used with the Create URL Document Object. The popup error states 'Unable to parse expression: Couldn't repair and continue the parsing on token #ID 'FindCaseByCaseNumber' (line 1, col:24)'  The string value is "<Message MessageType="FindCaseByCaseNumber" Source="APIMessage" ReferenceNumber="1" NodeID="1" UserID="1"><CaseNumber>"05-CP-001842"</CaseNumber></Message>". The editor will not let me save the string value with quotation marks being used in the string value, exampe "FindCaseByCaseNumber". When I remove the quotation marks from the string value the editor will save the value but then the variable will not work.
    Has anyone encountered this same problem or know what to replace the "" to terminate the string value? I have tried brackets, but this does not work. Any suggestions are greatly appreciated!

    I found my answer. It appears that ${}, #{}, and ' will let you add a sub-variable to a variable string value.

  • DSC alarm set and cleared without operator ack - the variable should be not alarmed and not acked

    We are deeply involved in porting our application from 7.1.1 to 8.6.1 under Windows XP.
    Our application  heavily depends on DSC and moving from 7.1.1 to 8.6.1 is actually much more than a simple porting....
    here is our last problem:
    it seems that there is no discrimination between 'active' alarms and 'acknowledged' alarms on a shared Variable  in case the 'ack Type' is set to 'USER'.
    Here is what happens:
    1) a Boolean shared variable is defined to be alarmed when 'high' (TRUE) and its ack type is set to 'USER' (the operator at our application must ack alarms).
    2) the Boolean var is set to TRUE -> it is declared alarmed (OK)  and not ack'ed (OK)
    3) the operator ack the variable -> it is declared alarmed (OK)  and ack'ed (OK)
    4) the Boolean var is set to FALSE -> it is declared not alarmed (OK)  and ack'ed (OK)
    5) the Boolean var is set to TRUE -> it is declared alarmed (OK)  and not ack'ed (OK)
    6) the Boolean var is set to FALSE -> it is declared alarmed (NOT OK!!!)  and not ack'ed (OK)
    7) the operator ack the variable -> it is declared not alarmed (OK)  and ack'ed (OK)
    This last case is the wrong situation: an alarm has been set and cleared without operator ack the variable should be not  alarmed  and not acked 
    Actually the variable returns OK only when ack'ed.
    see the attached project in which a small vi and a small shared variable lvlib allows to repeat the above steps.
    Note:
    A) same situation applies to 'double' shared variable
    B) under DSC version 7.1.1 everithing was OK 
    can anyone Help?
    Thank You Guglielmo Rozera
    Attachments:
    AlmAckTest.zip ‏18 KB

    Thank for your replay!
    I have tried to undeploy and deploy the library with ack type set to 'User' by default, and then run the vi but the behavior is always the same.
    The modification you suggest does not set 'User' ack type because data socket needs '2'  as 'User ' setting while property node needs '1' or (better) its own enumerated type.
    Anyway I've corrected the vi according to your suggestion and tried again but nothing changed...
    Here I attach the project modified with property node and an indicator to show what is the actual ack type
    I hope in your further investigations!
    Thank You
    Guglielmo 
    Attachments:
    AlmAckTest_2.zip ‏20 KB

  • Can formula node take string input and output string?

    I am wondering if the formula node can take string input variable and output string variable after calculation. otherwise I have to output integers and then use case structure to select different output strings, that is kind of redundant in coding.
    ping

    If you are just trying to read lines that have mixed formatting, you don't need any script nodes.
    Can you attach a tpyical flne and a description of the desired read operation so we have a better idea what you are trying to do? Do all lines have the same overall format?
    LabVIEW Champion . Do more with less code and in less time .

  • VARCHAR2:: How to differnciate between NULL and empty string '' ?

    Hello to all,
    I'm looking for a possibility to differnciate between NULL and empty string '' in column of type VARCHAR2.
    I have an application relying on that there is a difference between NULL and ''.
    Is it possible to configure ORACLE in some way ?
    Thanx in advance,
    Thomas

    try check if a varchar variable has an empty string
    by checking its lengthAnd that would accomplish what? But see for yourself:
    DECLARE
      v_test VARCHAR2(10);
    BEGIN
      v_test := '';
      DBMS_OUTPUT.put_line(LENGTH(v_test));
      v_test := NULL;
      DBMS_OUTPUT.put_line(LENGTH(v_test));
    END; C.

  • I would like to do a program that have one string control and one string indicator, any character that I type in the string control in the same time it will be appear in another string (indicator). How can help me?

    I would like to do a program that have one string control and one string indicator, any character that I type in the string control in the same time it will be appear in another string (indicator). How can help me?

    Why not use an event
    Add a While Loop, inside the loop add the Event Sructure.
    Now in the event structure selecd the String Controls.value change event to
    react
    and the new value inside the event that you get,( connect to the String
    indicator box.
    On Sun, 10 Aug 2003 15:58:47 -0500 (CDT), WiltonFilho wrote:
    > I would like to do a program that have one string control and one
    > string indicator, any character that I type in the string control in
    > the same time it will be appear in another string (indicator). How can
    > help me?
    >
    > I would like to do a program that have one string control and one
    > string indicator, any character that I type in the string control in
    > the same time it will be appear in another string (indicator). How can
    > help me?
    >
    Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

  • Using SKPTSMTPMessage how to send a variable String?

    I am using SKPTSMTPMessage to send an email in the background but I need to send a variable string. I have tried putting a %@ in the text but it just sends the %@ and not a variable. Please Help?
    Hopefully, iCrazy23

    Did you ever figure out how to do this?  Because actually I'm trying to do pretty much exactly the same thing.  I'm actually having trouble even outputting the digital signal at all with my USB-6501.  I was initially trying to use DAQ Assistant, but then found out I probably shouldn't be using this and instead should be using the DAQmx individual functions.  I was directed by NI Support to look at the example "Gen Dig Pulse Train-Continuous.vi," but I haven't been able to figure out how to use this for my application.   For my project I  want to send a TTL signal to vavles that release fluids as well.  I have 3 2-way liquid releasing valves that I want to be synced so that only one is open at a time (for a user specified amount of time), and they open in a regular repeating sequence.  I also have another 3-way valve controlling a vacuum that I would like to be continuously pulsing, but for specified amounts of time (e.g., 3 seconds open, 3 seconds closed, and so on).
    I believe I can figure out the logic and the programming involved with figuring out the exact sequencing and timing manipulation, however, I'm having trouble just being able to output any digital signal with a varying time.  If you could offer any help on this, it would be greatly appreciated.  Thanks!

  • How do you make Robot type out a variable String?

    I don't know why I'm having an issue with this. I want the Robot class to type out a string one character at a time as if I were sitting at the keyboard and doing it myself. There will be many, variable strings to type. Here is what I tried to do and it fails miserably:
    private String myString = "example";
    // Loop for each character in the string
    for(int i=0; i<numChars; i++)
         // Get the current character
         myChar = myString.charAt(i);
         // Convert the character to a keycode
         myKC = (int)myChar;
         // Press the key, release the key
         myRobot.keyPress(myKC);
         myRobot.delay(10);
         myRobot.keyRelease(myKC);
    }When I run it, I get some unexpected output in the Notepad window I have open. Instead of it spelling out "example", it gives me something entirely different:
    e - instead of 'e', it gives me a '5'
    x - instead of 'x', it gives me nothing at all
    a - instead of 'a', it gives me a '1'
    m - instead of 'm', it gives me a '-'
    p - instead of 'p', 'F1' is triggered and the Notepad help window pops open
    l - instead of 'l', it gives me nothing at all
    e - instead of 'e', it gives me another '5'
    What am I doing wrong here? This was supposed to be easy...
    Edited by: ConQuesimo on Jan 19, 2010 12:06 AM

    ConQuesimo wrote:
         // Convert the character to a keycode
         myKC = (int)myChar;
    I don't see a keycode conversion here, keycodes for a to z are the same as ASCII, what I do see is an int conversion of what ever character set you have running on your computer. If I take your approach to conversion, then I get different codes on different keyboards/systems also. What I finally ended up doing is making a map for my keys and everything started working fine.
    For me, the problem expressed itself when I went from my Windows with MS-Keyboad to my Ubuntu with an earlier style MS-Keyboad. Character values and single character strings come out fine, but when I would try converting char to KeyCode as you have done, the results were not always what was desired. I've not looked into it to see what was actually causing the problem, ti was faster and easier just to make the map.

  • SQL Extract Variable String in Variable Position with Variable length from ntext field

    i want to extract a variable string from an ntext field. 
    Sample Data in Background_text (ntext)
    function changeFocus()  {         document.getElementById('skipContent').style.visibility = 'visible';         document.getElementById('flashContent').blur();        
    document.getElementById('skip').focus();  }  </script>    </head>  <body onload='hideDiv()'>    <div id="flashContent" align="center">     <object
    classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="700" height="440" id="Animation" align="middle">      <param name="movie"
    value="/assets/abc/images/abcdef.swf" />      <param name="quality" value="high" />
    I want to extract this data:      "/assets/abc/images/abcdef.swf"
    The string will always be preceded by value="     AND end in
    .swf"
    As a first attempt, I tried
    SELECT SUBSTRING([Background_text], CHARINDEX('value="/assets/', [background_text]) + 15, LEN(convert(varchar(max), background_text) -
    CHARINDEX('value="/assets/', [Background_text]) + 15) - 1)
    but I received this error
    Msg 245, Level 16, State 1, Line 1
    Conversion failed when converting the varchar value .......  to data type int
    This query won't completely accomplish what I want. Do you have a suggestion?
    Thanks.

    I'd add an extra bit of logic into the expression to only look for 'swf' AFTER the start of the string - it might be that you can guarantee that no occurrence of 'swf' will ever appear in the ntext, but who knows what might change in the future, and it's
    good practice to code defensively.
    SELECT
    SUBSTRING(
    Background_text,
    CHARINDEX('value="/assets/', background_text) + 6,
    CHARINDEX('.swf', SUBSTRING(
    Background_text,
    CHARINDEX('value="/assets/', background_text) + 6,
    LEN(cast(background_text as varchar(max)))
    ) + 4

  • Powershell Coding - Path and Variable Issues

    Hello, I am working with a powershell program to copy a file off of my flash drive and into the startup file of what ever user is logged onto that computer. 
    My code is
    powershell -command { }; $a=[Environment]::UserName ; $c='E:\Other\Programs\program2.bat' ; $b='C:/Users/$a/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup' ; copy $c $b ; start-sleep 30
     It just uses the $a instead of the variable name...  if I change it to " " it says that the path cannot be found a cmd or operable program. and it stops at Windows/Start 
    can anyone help me out with this?
    For anyone wondering why I am using powershell -command  instead of ISE is because I am running it from a .bat file because the execution policy is set to restricted AND CANNOT BE CHANGED.

    Try
    $b="\"C:/Users/$a/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup\"";
    You must use double quotes for Powershell to use the value of $a - See:
    https://technet.microsoft.com/en-us/library/hh847740.aspx
    and you need an extra set of quotes escaped with a backslash to cope with the space in "Start Menu" - See:
    http://www.tinyint.com/index.php/2011/04/20/escaping-quotes-in-powershell-exe-command-via-command-prompt/
    In future (or if this is not working for you) please direct questions about Powershell to this forum
    https://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG

  • Fixed and Variable set up times CIFing

    Hi All,
    We would like to CIF both Fixed Set up time (say 30min independent of the previous phase / operation) and Variable Set up time
    ( which comes through the assigning of Set up group in R/3 recipe and set up matrix maintenance in APO).
    When I try to CIF, only the set up phase which has got the set up group assignment (ie., the variable set up phase) gets
    transferred. How to transfer both the fixed and variable set up simultaneously.
    Master Data used - Master Recipe in R/3 / PDS in APO
    TIA
    Regards

    Hello
    You can get the report by using the  report painter, no development will be required.
    Regards
    Madhav

  • Log the local variables (string type) to the database (SQL Server)

    i have a customized PreUUT callback so that my own VI gets the information from barcode. it contains serial number as well as other information. i am collecting the information into local variables of the PreUUT callback.
    Now i want to log the local variables (string type) to the database (SQL Server).
    i have a successful connection to the database and i am using a generic recordset schema.
    can anyone help me how to do it?
    also shall i have to create the corrosponding fields (columns) in the database? or is there any option in TestStand4.0 to do it?

    Hello i like original,
    After re-reading your original message, I think I might have a better understanding of what you would like to do.  I have included a few links to Knowledge Base and Developer Zone articles that should be very useful for you.  I have included these links below:
    Logging a New UUT Property to a Database in TestStand
    Logging a New Step Property to a Database in TestStand
    Creating a TestStand Database Schema from Scratch
    Thanks,
    Jonathan C
    Staff Application Engineering Specialist | CTD | CLA
    National Instruments

  • TextField and variables

    I am trying to figure out how to assign a variable to a textField to hold the value of user input. I would like the user to type in a string during runtime and the string be placed into the variable. This variable is for holding the user name for a login name and a password.

    Cast this Object :
    String s = (String) textField1.getValue();And do not put this code in constructor, but in the textField1_action() method. Specifiy this method as handler for your textField (in the properties window, events>processValueChange), and check "Submit on change" by rigth-clicking on the textField.
    Regards

  • Left side of assignment operator must be variable or property

    I Need Help!!!
    How do I prevent getting the message "Left side of assignment
    operator must be variable or property."
    Im trying to use 'onRelease' on the instance named "Item1"
    I have a variable named "sRange"
    sRange+Item1.onRelease=function(){

    Sry I didnt mean to send it through
    I meant to have it like this
    var sRange:String = "Zodiac";
    this.attachMovie("mcProducts","Zodiac",1);
    this.attachMovie("mcProducts","GTop",2);
    this.attachMovie("mcProducts","Triple",3);
    this.attachMovie("mcProducts","Custom",4);
    this.attachMovie("mcProducts","Special",5);
    sRange+ ".Item1".onRelease=function(){
    trace(sRange + "Item1 Selected");
    // I get this error:
    //**Error** Scene=Scene 1, layer=Item12, frame=1:Line 23:
    Left side of assignment operator must be variable or property.
    // sRange+ ".Item1".onRelease=function(){

  • Differance betwen Variable & Fixed and Variable in Cost Component Structure

    Dear All,
    What is the difference between the Variable and Fixed and Variable for the cost component for the Cost Component Structure.
    why we have to take Raw Material Cost Componennt always Variable.  Is any help?
    Regards

    fixed cost is irrespective the level of production the cost remains same. or upto certain level of production the cost the cost will ramain same and after the cost may increase.
    example: rent of the factory building or office buildings remains same irrespective of the operations level.
    variable is with every change in the level of production the cost change.
    example: raw material used in manufacturing finished product. The more finished products the more is the consumption of raw material.

Maybe you are looking for

  • IPhone Poor Call Quality Without Headphones

    I have an iPhone 4s.  When I am working in my home office, the carrier signal level is good - typically three or four bars out of 5.  However, the call quality is sometimes very poor - I can hear the other caller very clearly but they cannot hear me

  • Can I get my music collection (play counts and playlists inc.) from my iPad to my PC?

    I had a problem with iTunes where I couldn't add songs to the library because I didn't have sufficient permissions to edit my iTunes library (even though I did). After a few days of tweaking administrator permissions and the like, I got really annoye

  • Conflict with Adobe Reader 9 and Acrobat 6

    I'm having an issue with a conflict between Reader 9 and Acrobat 6.  PDF files open properly in Reader 9, but when I open URL's with PDF links it defaults to Acrobat 6.  Reader 9 is the default program on my machine to open PDF's and I have tried to

  • Link Line Items AUAS with ANEP

    Greeting, How to link line items of table AUAS with ANEP if there is more than one line for a document number in both tables with different amounts. The scenario is that I am reading lines of table AUAS and need to get the transaction type from table

  • How to change the nodes in middle tier

    how to chnage the node in middle tier and a new node for middle tier?