Use the lines of a text file as input to an SQL command

Hello

I have a text file containing the lines...

123

1234

I would like to use as input for a SQL command running in a script. ie

Update flag set < table > = 'Y' where job = < the text file lines >;

Any help much appreciated.

See you soon

External table will do.

For reference...

CREATE TABLE Hold'em (SEQ_NUM NUMBER (10));

insertion in hold select SEQ_NUM in task where proc like '% PROC;

update set hold_flag = task ' ' where in SEQ_NUM (select hold SEQ_NUM);

Tags: Database

Similar Questions

  • How to concatenate strings with the lines of a text file

    Hello
    I tried concatenate strings with the lines of a text file, but something is wrong with my code and I belive is the agruments I use in the cycle for. If anyone can help me I will appreciate it very much.
    My code is:
    [code]@echo off
    the value "input=C:\Users\123\Desktop\List.txt".
    for /f "usebackq tokens = *" % in (' input % ') do)
    the value 'str1 = C:\some directory\ ".
    the value ' str2 = %% ~ F '.
    the value "str3 = .pdf".
    the value "str4 = str1% str2% str3%.
    echo.%STR4%
    ) [/ code]
    and the text file is something like:
    121122 [code]
    122233
    123344
    124455 [/ code]
    But I get only one wrong answer and I have to run it like 3 times to get a real result and it is a mistake, the first two are empty spaces and gives the third one as the last line of the text file but repeated n times, where n is the number of lines in the text file.
    Result:
    [code] C:\Users\123\Desktop>concatenate.bat
    C:\Users\123\Desktop>concatenate.bat
    C:\Users\123\Desktop>concatenate.bat
    C:\some directory\124455.pdf
    C:\some directory\124455.pdf
    C:\some directory\124455.pdf
    C:\some directory\124455.pdf
    C:\some directory\124455.pdf
    C:\Users\123\Desktop>[/code]
    So if anyone has an idea about what is wrong please let me know.
    Concerning
    -Victor-

    Hi Victor,

    This forum is dedicated to the support of the Office of consumer Windows (fonts, colors, personal settings).  Since your question is about programming and usually outside the context of most of the customers, I suggest you post your question in the forums as http://msdn.microsoft.com - the Microsoft network to users will be more adapted to help you in your quest.
  • Load the data from a text file into a table using pl/sql

    Hi Experts,

    I want to load the data from a text file (sample1.txt) to a table using pl/sql

    I used the pl/sql code below

    ***********************************
    declare
    f utl_file.file_type;
    s varchar2 (200);
    c number: = 0;
    Start
    f: = utl_file.fopen('TRY','sample1.txt','R');
    loop
    UTL_FILE.get_line (f, s);
    insert into sampletable (a, b, c) values (s, s, s);
    c: = c + 1;
    end loop;
    exception
    When NO_DATA_FOUND then
    UTL_FILE.fclose (f);
    dbms_output.put_line('No. deles de lignes insérées: ' || c);
    end;

    ***************************************

    and my sample1.txt file looks like

    ***************************************
    1
    2
    3
    ***************************************

    Gets the data inserted, with way below

    Select * from sampletable;

    A, B AND C

    1-1-1
    2-2-2
    3 3 3

    I want that data to get inserted as

    A, B AND C

    1 2 3

    The text file I have is to have three lines, and the first value of each line should go to each column

    Help, please...

    Thank you
    declare
    f utl_file.file_type;
    s1 varchar2(200);
    s2 varchar2(200);
    s3 varchar2(200);
    c number := 0;
    begin
    f := utl_file.fopen('TRY','sample1.txt','R');
    utl_file.get_line(f,s1);
    utl_file.get_line(f,s2);
    utl_file.get_line(f,s3);
    insert into sampletable (a,b,c) values (s1,s2,s3);
    c := c + 1;
    utl_file.fclose(f);
    exception
    when NO_DATA_FOUND then
    if utl_file.is_open(f) then utl_file.fclose(f); ens if;
    dbms_output.put_line('No. of rows inserted : ' || c);
    end;
    

    SY.

  • How can I increase the size of the line when the queue to a text file

    How can I increase the size of the line when the queue to a text file, so that explain plans do not end all crushed togeather...?

    SQL > SET LINESIZE 999

  • New line number in text file in Notepad open

    Hi all,

    Create a text file using the procedure and moved to the FTP folder. Text file opened through IE its working very well. Copied to the local computer and open in Notepad, its not work i.e., appeared in a continuous line. Return the correct sound also verified text only

    Code:

    Declare

    Begin

    v_File_Name: = utl_file.fopen (Dir_Obj_Name, filename, 'W');

    For Cur In (Select "A" A1, A2 'Two', 'Three' A3 double)

    Union

    Select 'Four', 'Five' A2, A3 A1 "Six" double

    )

    Loop

    v_line_Text: = Cur.A1 | ' ' || Cur.A2 | ' ' || Cur.A3 | ' ' || Chr (13).

    UTL_FILE.put_line (v_File_Name, v_line_Text, True);

    End loop;

    UTL_FILE.fclose (v_File_Name);

    End;

    Ouput except

    One two three

    Four five Six

    BoopathiL wrote:

    Hi all,

    Create a text file using the procedure and moved to the FTP folder. Text file opened through IE its working very well. Copied to the local computer and open in Notepad, its not work i.e., appeared in a continuous line. Return the correct sound also verified text only

    Code:

    Declare

    Begin

    v_File_Name: = utl_file.fopen (Dir_Obj_Name, filename, 'W');

    For Cur In (Select "A" A1, A2 'Two', 'Three' A3 double)

    Union

    Select 'Four', 'Five' A2, A3 A1 "Six" double

    )

    Loop

    v_line_Text: = Cur.A1 | ' ' || Cur.A2 | ' ' || Cur.A3 | ' ' || Tank (13);

    UTL_FILE.put_line (v_File_Name, v_line_Text, True);

    End loop;

    UTL_FILE.fclose (v_File_Name);

    End;

    Ouput except

    One two three

    Four five Six

    Well, your code is not still valid in the first place.

    There is no function called "tank", the real function is "chr".

    The character for a new line character is Chr (10) rather than Chr (13).

    In unix operating systems, the line break is just Chr (10).

    Operating systems windows/dos line break is Chr (13) | Chr (10), although some windows applications such as Word/Wordpad will understand * nix style chr (10) is like the newlines too, however, things like Notepad will not and will eventually display all data on a single line.

    When you transfer a text file of a unix operating system to an operating system of windows that it is usually performed using FTP and you need to make sure you put the software FTP in ASCII mode so that the new line characters get converted correctly...

    FTP > CSA

    200 type set to A.

    (for binary files, you ensure that the FTP is set to binary mode so that no byte in the file is corrupted by such a conversion).

    By transferring your file using FTP ASCII mode, from unix to windows, the characters Chr (10) in the file will be converted to Chr (13) | the pairs of characters Chr (10), then the file will be displayed correctly in Notepad.  If you transfer from windows to unix in ASCII Chr (13) | Chr (10) pairs are converted back to just chr (10) for unix.

    As an alternative, there's also a Unix utility called "unix2dos" which converts a text file from unix style returns to the line of back style line breaks, then you simply transfer the file in binary mode, so no other conversion takes place.

  • When I use the mail merge with excel file, after I press ok the progress bar indicates "NaN", mail project window crashes. My record is nice little CVS n

    When I use the mail merge with excel file, after I press ok of the progress bar indicates "NaN", mail project window crashes. My file is in the correct format and small size (4-column 4 raws). I use an English version of thunderbird after accidentally, I installed one in my tongue.

    I am attaching the screenshot

    I solved the problem
    has been st@pid excel

    I created a CSV file in openoffice calculator and everything went smoothly

  • Everytime I turn on my Mac Java says he needs to install the message says "to use the line tool java command, you must install a JDK.  Click on "more information visit the java developer kit download site."  I followed all these steps and downloSoftware.

    The message says "to use the line tool java command, you must install a JDK.  Click on "more information visit the java developer kit download site."  I followed all these steps and downloaded the correct software update, but still getting the message.

    A

    If you have installed the plugin of Facebook video appeal and you no longer want to use it, you can remove it as follows.

    1 back up all data.

    2. open the library folder in your home folder by holding down the option key and selecting

    Go ▹ library

    in the Finder menu bar.

    3. place these items in the library folder to the Trash:

    LaunchAgents/com.facebook.videochat.name.plist

    Support/Facebook app

    Here the name represents the name of your Facebook.

    4 log off or restart the computer, and then empty the trash.

    B

    If you do not use this plugin, or any other software (for example, some Adobe products), which depends on Java, install the Java runtime distributed by Apple.

    C

    If you do not have the Facebook plugin and you don't want to install Java, please ask for further instructions.

  • Installation of 8.1 of Windows 8 by using the windows 8.1 image file located on USB

    I want to do the Windows Installation 8.1 do I need key to install the pre-installed Windows 8 windows using the windows 8.1 image file located on USB downloaded from microsoft.

    Hi Lovina,

    We are here to help.

    Installation of Windows 8.1 using the image file is on your key USB can be activated without the product key.

    You can also consider to upgrade your computer to the latest version of Windows, Windows 10. Check out this article for more of Windows features 10

    Please do not hesitate to contact us if you need assistance.

  • The listener is down: even if a listener with the name "AUDITOR", is running on this host at the port: "1521", it has not started using "the target LISTENER. ORA file.


    I moved a listener on a host in a House different oracle. The headset works fine, but EM 12 c shows that the listener is down with the following summary:

    The listener is down: even if a listener with the name "AUDITOR", is running on this host at the port: "1521", it has not started using "the target LISTENER. ORA file. CORRECTIVE ACTION: To monitor this "EM listener target" with its current configuration, you must stop the process of listening running and start it using the Listener parameter file: opt/oracle/product/12.1.0.2/network/admin/listener.ora. Alternatively, you can update "this target LISTENER. Location ORA setting"with the location of the listener running, which started using the: opt/oracle/product/11.2.0.3/network/admin/listener.ora.

    EM 11 g, I simply changed the configuration of the listener for the different oracle home, argued the change and in a few minutes the listener would show that 'UP' with the oracle of new home. I upgraded to MS 12 c (12.1.0.4) and can't find how to do this. Can someone give me the procedure.

    Thank you

    Ron

    Hi Ron,

    Can you please do the following?

    -Create a for the listener listener.ora file, stop and start the receiver using the listener.ora file. If the file is located in a default location, set the TNS_ADMIN environment variable to that location before you start the listener.

    -Log on to the EM console, go to the homepage of the listener.

    -In the Oracle Listener menu, select target Configuration > Configuration of the analysis.

    -Ensure that the parameters, including the Listener.ora directory, are properly.

    Kind regards

    -Loc

  • Cannot be joined lines when using the line Segment tool

    So unfortunately, I've updated to the latest version of Illustrator Cc (V19.2.1). And to my horror, I can no longer draw a line (with the line segment tool) then draw another line, coming from the previous those anchor point. When I try to shoot immediately. He's trying to turn the line rather than create a line joining... anyway to change that or am I stuck with it?

    (Also, I use windows currently..)

    http://Tinypic.com/player.php?v=iqc0mc & s = 9 #. Vr5gifJ95hE

    I don't know if you can say/see/see in the video, but here's the process that I'm following departure using the line-drawing the line-> > segment trying to draw a line from that anchor point (and that is the question, when I'm doing it automatically, it assumes I want to transform the line)-> changes to the tool selection and clicks on the line to deselect-> goes back and finishes object, repeating the process.

    Help me please... I'm desperate...

    It is these new life forms, a few disadvantages too with the rectangle tool, ellipse etc. tool.

    to go back to the old behavior

    Object > shape > expand the form, do a deed for him, or do what I did a hotkey (Windows 7).

    Edit > keyboard shortcuts > Menu commands > object > shape > expand the form , then in the first box to the right click in it, select and press a key on the keyboard, I choose F9, OK and name.

    It's an extra step, having to have a finger on the mouse and the other on the keyboard for each line. but I can't think otherwise.

  • Now shift isn't snapping line when you use the line Segment tool

    I could be wrong and it has always been like that, but when I take a shift to rotate a line created by using the line Segment tool turns is more degrees as I thought that it used to. I checked and it works always with the Rectangle tool, but not when I traced a line. Guides and snap to Point are both on.

    Is much more annoying when I'm dragging an end point and it will remain at an ideal level of 90 or 45 angle... but nevertheless it remains valid this angle when I paint, just do not change.

    Matt,

    You are not alone.

    See this thread with a link to the other thread:

    https://forums.Adobe.com/message/8274663#8274663

  • How to upgrade the value of line in a report by using the line selector (check box)

    Hello

    I have a requirement where I need to make PLSQL update process on a specific line in my report.
    Based on the line selector (marked) the plsql process update on the values of the selected line.

    I have to update status of the employee selected as 3.
    But regardless of the choice of line selector, juice processing SRM application in a sequence that is., this is row selected, application takes the first line and updates the status.

    My update process from looks like this:

    BEGIN

    BECAUSE me in 1... apex_application.g_f01. COUNTY - checkbox
    LOOP
    If apex_application.g_f01 (i) only IS NOT NULL then - box marked
    insert into values TEMP_T (apex_application.g_f03 (i), V ('APP_USER')); -f03:Deptno
    update status set Table_x = 3 where deptno in (select deptno from TEMP_T where rtrim (lower (apex_user)) = rtrim (lower (V ('APP_USER')));
    delete from TEMP_T where rtrim (lower (apex_user)) = rtrim (lower (V ('APP_USER')));
    end if;
    END LOOP;
    END;

    Once the user selects the line selector, application needs to update the status of this particular emp 3 in Table_X.
    Currently, if I select a line, using the line selection box, my update process changes the status of the first record line. If I select three rows, then my first three rows updated.
    So I have to update the particular line or selected using the selector (checkbox) row lines

    If you could help me solve this question would be really appreciated.

    Thank you
    Vijay

    This example shows how to use checkboxes in tabular form:

    http://HTMLDB.Oracle.com/pls/OTN/f?p=31517:95

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • How to insert text from the text file saved using the line number of the indesign document to point specific cursor?

    I use indesign for books of the brand. I need always insert quotes from some holy books. so I need to insert text using the verse number

    If you are looking for a way to automate where to insert the text? I really don't understand what you're trying to do.

  • count the lines in a text/csv file.

    Can you advice me how can I get the total number of lines in a text/CSV file please using java code.

    I will get the contents of the text/csv file in a string variable to no not as a file.

    EX: string var = "123\n234\n123\n3456\nsdfsd\n" this is \n in the new line.

    for that I have to get the total rows 5.

    Please advice.

    Thank you.

    I think I have to try a split of the string and see how big the table is either simply to count the number of newline characters. Since you said you have a huge file and your data are contained in 1 chain, then you should be able to do it more conveniently.

  • text HTML anchor tag uses the line

    Here is one. When I shoot html as text in a text field, and set the paragraph to align to the right, the entire line is defined as a link.

    Is there anyway to make sure the link is not made for the entire line?

    Example:

    < p align = "right" > < a href = "link" > Link Text < /a > < /p >

    Any help would be appreciated.

    Wally

    TIm,

    Thanks for that. I came up with the same results. Because I'm all loading of external files, I wanted to shy from the exhausts of all these characters. But you certainly helped me to find a solution.

    I took some of my text links and dropped everything in a test film I've worked with and has accidentally left thetag in the head, which appears in the html code. Needless to say that the text "untitled document" doesn't have the hyperlink applied.<p class="reply"> <p class="reply">So I got to thinking, "what happens if I put text before and after the anchor tag." And sure enough. NO HYPER LINK on the new text. Then I got to thinking, 'Hmm. Maybe I'll just put a character before and after the hyperlink and set its color to white so it will not be displayed. »</p> <p class="reply">Of course, it worked. So this is my fix/workaround. If you have a hyperlink which is aligned to the right and it appears on the line, put a character before and after the hyperlink and do he same as the background color.</p> <p class="reply">It worked, but <strong>HELLO ADOBE / FLASH TEAM!</strong> Please fix the bug and implement HTML 4.0 or higher if we don't get to these workaround solutions crazy, <em>Please</em>.</p> <p class="reply">Thanks to all who helped on this. Great community!</p> <p class="reply">Wally</p>

Maybe you are looking for