Split Output from Select into 2 different Cols

Hi,
I am new to oracle dev. Env Oracle 10g R2
I need a help with the following.
I have a select query that returns comma separated values.
Column LIST1 in table svp_1.
This needs to hold that data returned by the select query.
Datatype of Column LIST1 varchar2(4000)
I get the follwing error.
ORA-19011: Character string buffer too small
CREATE OR REPLACE PROCEDURE
sale_temp( pType in Char,lDate in date) as
cnt number;
v_error_code NUMBER;
v_error_msg VARCHAR2(2000);
cursor c1 is select svp
from sale
where type = pType
var1 c1%ROWTYPE;
BEGIN
UPDATE svp_1
SET LIST1 = ( SELECT LTRIM( xmlagg (xmlelement (c, RTRIM(RELATED_SVP) || ',')).extract ('//text()'), ',' ) AS RELATED_SVP from (
SELECT rtrim(BASE_SVP) BASE_SVP,
rtrim(RELATED_SVP) RELATED_SVP
from
svp_enc se
where
se.effective date<= pDate
and (se.expiration_date is null or se.expiration_date > plDate )
and se.base_svp in
( var1.svp
and se.RELATION_TYPE = '4'
)group by base_svp)
WHERE type = pType
commit;
dbms_output.put_line('UPDATE done' );
end;
end loop;
close c1;
END ;
My requirement :
In need to capture the data from the select query and update the column.
The data needs to be returned as comma separated values.
This data can also be split into 2 columns.....ie data split and updated into 2 cols ie LIST1 AND LIST2 ( can be added to existing table).
What is the best way to do this?
Is the below approach possilble?
LOOP through cursor ...check the length of data....for the select query ....check length .if > 3990 byte.....then write into 2 plsql variables.....and update 2 cols....
Is this apporach right, if so how to do that in the procedure ? Please give an example...
Are there any other approaches...?
All I need is to Split Output from Select into 2 different columns and avoid the ORA-19011: Character string buffer too small error.
Thanks in advance.

Re: ORA-19011: Character string buffer too small

Similar Messages

  • What are the steps to upload zipped LMS output from UPK into iLearning?

    Please would someone be kind enough to detail the steps to import zipped LMS output from UPK into iLearning or point me to where I can find this information?
    Many thanks.

    The zipped output from UPK contains a few folders within the zip file itself before you get to the area within the zip where the imsmanifest.xml file is. You need to repackage the zip so that the imsmanifest.xml and related .xsd files are at the "root" of the zip file, rather than in a directory within the zip.
    So basic steps are as follows:
    1. Extract the zip file locally to your hard drive.
    2. Navigate down the newly created folder structure until you see the imsmanifest.xml file.
    3. Add/replace the .xsd files in this location with the iLearning specific XSD files that you can get on metalink
    4. Select all the files in this directory (including the folders in this directory like "audio", "certificate", "help", "images" etc), then right click and add to a new zip file. This will ensure that the new zip file contains the imsmanifest.xml and related xsd files at the root of the zip file rather than buried in a folder.
    5. Import as SCORM 1.2 in iLearning and off you go.
    Hope that helps.
    Scott
    http://www.seertechsolutions.com

  • Split data and insert into different rows

    I have a string like 'sfdsf,sfdsf,sfsd,qweqeqw,iuoi,"
    I have created a single column table
    I have to extract data from first untill comma(,) occurs and insert into the table like the following
    sfdsdf
    sfdsf
    sfsd
    qweqeqw
    iuoi
    Please help me how to do it

    Or a Single SQL query
    SELECT trim(',' from DECODE(ROWNUM,1,SUBSTR(STR,1,INSTR(STR,',',1)),
                                        LENGTH(STR)-LENGTH(REPLACE(STR,','))+1,SUBSTR(STR,INSTR(STR,',',-1,1)),
                                         SUBSTR(STR,INSTR(STR,',',1,ROWNUM-1), INSTR(STR,',',1,ROWNUM)-INSTR(STR,',',1,ROWNUM-1))
                                   ))  STR1
                     FROM (SELECT 'sfdsf,sfdsf,sfsd,qweqeqw,iuoi' STR FROM DUAL),ALL_TABLES
                     WHERE ROWNUM <= LENGTH(STR)-LENGTH(REPLACE(STR,','))+1
                      ORDER BY ROWNUM

  • The waveform of output from file is different from original one

    I've a new question about displaying a waveform from a text file. The waveform which its data is from file is different from the original one.
    I attached image files which included my two vi files and 3 waveform. In the compressed file, "ReadData_Waveform1.jpg" is a image of waveform from "ReadData.jpg" vi file with the configuration of "Transpose" is True,
    "ReadData_Waveform2.jpg" is a image of waveform from "ReadData.jpg" vi file with the configuration of "Transpose" is False,
    "WriteData_Waveform.jpg" is a image of waveform from "WriteData.jpg" vi file.
    I attached the source file of waveform with text format as well.
    Please help me to solve this question if there is anyone who can figure it out.
    Thanks, Andy.
    Attachments:
    Question.zip ‏154 KB
    data.txt ‏55 KB

    Hi Andy
    If you transpose the data when you write it, you also have to transpose it when you read it.
    Just have a look at the simple example attached. I write data and read it again. Each file operation is called with the default-value for transpose (false). The data is read correctly.
    Hope this helps.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    data.vi ‏35 KB

  • How do you stop pictures from going into different rolls?

    Everytime I transfer a picture into iPhoto it goes into a different roll. When it comes to finding these pictures, it can take a long time. Can anyone tell me how to make pictures all go to the same place?

    Each import creates a new roll. You can't change this behavior.
    You can edit your rolls. Select Library from the Source Pane. Go to View > Sort Photos > by Film Rolls. If rolls are closed you can Option-click on one roll's disclosure triangle to open all of them at once. Open the info pane at the lower left of the iPhoto window. Now any time you select a roll by clicking its title, you can edit its info in the info pane. You can edit the title, date, and comments. You can select photo(s) and move to another roll by dragging until a roll's title is highlighted, then drop. You can combine rolls or create new rolls.
    I use large memory cards with my camera and import photos little by little, as I take them. I keep the photos from one card together in one roll. So each time I import, I immediately drag the new roll up to the existing roll for that memory card. This places those photos into the roll with the others, and deletes the newly created roll.

  • Output from selected string

    i have two table and i am giving the structures bellow
    tWO TABLE
    TBL1
    ID DATA                    COL1 COL2
    1     TESTING 1 DATA      2     DEPTID YEAR
    MESSGAE :TESTING DEPTID DATA 2008 ( 1 REPLACES COL1 VALUE AND 2 REPLACES COL2 VALUE
    TBL2
    ID     DEPTID     NAME
    1     IT     ALEX
    2     AC     GEORGE
    AFTER CALLING OUTPUT SHOULD BE FOR INPUT ID-1
    TESTING IT DATA 2008 . HOW I WILL GET THIS? THROUGH PROCEDURE OR FUNCTION

    (note: UPPERCASE is considered shouting)
    I get the feeling that you have only provided us with half of your actual requirement.
    Based on the little bit you've given us, this will achieve what you want...
    SQL> with tbl1 as (select 1 as id, 'TESTING 1 DATA 2' as data, 'DEPTID' as col1, 'YEAR' as col2 from dual)
      2      ,tbl2 as (select 1 as id, 'IT' as DEPTID, 'ALEX' as name from dual union all
      3                select 2, 'AC', 'GEORGE' from dual)
      4  --
      5  select replace(replace(data, '1', tbl2.deptid), '2', to_char(sysdate, 'YYYY')) as data
      6  from tbl1 join tbl2 on (tbl1.id = tbl2.id)
      7  /
    DATA
    TESTING IT DATA 2008
    SQL>I assume, however, that you are looking for something a little more dynamic in some way, but you need to tell us how.

  • Distribution of fields from screen into different tabs in tabstrip.

    Hi All,
    I am having a screen 400 in program 'SAPLMR1M' which is the main program for MIRO transaction.
    The screen is having some 15 fields into it.
    When I run the MIRO transaction, I can see some of those fields appearing in the different tabs.
    My question is if a screen has 10 fields. Can I get the fields from one single screen distributed in different tabs in a tabstrip.
    Eg. 2 fields in tab1.
          4 fields in tab2.
          4 fields in tab3.
    Thanks in advance.
    Regards,
    Gaurav.

    Hi,
    Yes. It is possible.
    If you consider any transaction then it contains various tables for updation.
    Suppose if a screen contains 10 fields . Then 2 situations arises:
    1) If all that 10 fields belong to the same table then we can get directly based on the key value into any number of tab strips.
    2) Incase if we have field from more than 1 table then we have to create separate internal tables for each tabstrip and based on primary key we have to fetch the data using JOINS or FOR ALL ENTRIES and you can display in the tabstrips or table controls.
    Reward points if helpful;.
    Thanks and regards.

  • How can I Split the PDF File into different pages?

    Hi,
    My requirment is to split the pdf file , which is obtained by using FM "convert_otf" , into seperate PDF file for each employee data(PERNR).
    Please suggest me the way to slipt the PDF file that has to be downloaded into the presentation server.

    Hi,
    Ok, looking at that programm didn't actually help me very much to understand what's going on, or where you have the CONVERT_OTF call... Regardless, if the suggestion by Raymond is not feasible in your scenario, the thing I'd try to do is - splitting the spool (OTF) contents before calling CONVERT_OTF into individual documents (feeding it to convert FM piecemeal)... The link to OTF format and commands documentation is here.
    Again, it's difficult to give a good algorithm without knowing the exact OTF contents (could you perhaps somehow export the display of spool in RAW format and attach here?) but it would boil down to approximately following:
    1) set the &first_page per PERNR = 1;
    2) run through OTF lines until the &end_page for PERNR has been identified somehow (hopefully there are Begin/End Form OTF commands '//' in that spool... and they correspond to the split of spool you need...);
    3) extract the otf contents from &first_page to the EP command of &end_page into separate OTF itab and, if necessary, add // (End of form) command at the end of itab;
    4) call CONVERT_OTF on the table and download;
    5) set the &first_page per PERNR = &end page + 1;
    6) repeat from 2) until end of spool OTF data
    Something like that... Depending how the Sapscript translates into OTF, you may also need to prepend a few commands found at the very beginning of the spool to each extracted invividual OTF document...
    I Hope you can get the gist of what I'm suggesting... splitting OTF is definetly easier than trying to split PDF, I feel. It's not ideal solution, because - what if the structure of OTF contents you would be realying on changes for some reason..?
    cheers
    Janis

  • Splitting a long recording into different songs?

    Some friends and I will be recording today and there are a few things I am unsure about.
    First, we usually play for about 2 hours nonstop and we will be recording 3 simultaneous tracks. After the session, I would like to export the recording into itunes. But, instead of one 2 hour song, I would like to split it up into multiple songs. How would i do this?
    Second, to record nonstop for 2 hours, do i need to adjust the tempo of the recording before we start in order to maximize the time we can record. I thought I saw someone say that you had to lower the tempo to 40 to record for a few hours. I couldn't find the post though so could someone let me know if this is correct?
    Thanks!

    I would like to split it up into multiple songs.
    http://www.bulletsandbones.com/GB/GBFAQ.html#exportexactlength
    I thought I saw someone say that you had to lower the tempo to 40 to record for a few hours
    http://www.bulletsandbones.com/GB/GBFAQ.html#recordlength

  • How can I programati​cally control the names of files output from Labview into .pdf format (ie with Adobe PDF Writer or Distiller)​?

    I would like to save some data forms for a standard test controlled with labview in a pdf format. Due to the large number of forms and test reports, I would like to have Labview automatically assign the .pdf file name based on test number already contained in the labview code. How can I do this.
    Note: This question is very similar to:
    "Labview and Adobe Acrobat output" posted by John Balone on 1/26/2000. The reponses offered good suggestions but it is not clear to me how to implement them.

    This information is essential if you plan to use the Acrobat Distiller printer driver and any of the examples listed here:
    http://zone.ni.com/devzone/devzone.nsf/webcategori​es/EADE78F29101E8DB862567AC0058596B?opendocument&n​ode=DZ52095_US
    -Graeme, rayodyne.com
    Attachments:
    1_-_Printer_Configuration_with_Acrobat_Distiller.jpg ‏64 KB
    2_-_Printer_Configuration_with_Acrobat_Distiller.jpg ‏33 KB

  • Clock output from TRITON into Logic

    Does anyone know how to use the sequencer clock in a KORG TRITON EXTREME to control logic?
    I have tried every possible combination from the two but can not seem to get this to work?
    Any help would be grateful
    Maxx
    G5 Duel 2 gig   Mac OS X (10.4.5)   4 gigs memory / 192 digital interface / Logic 7.1.1

    I had tried many ways to get Logic to slave or master to my Roland 1680 and in the end it was a 50 sec (or something like that) offset for SYMPTE (in the Logic song/sync window) that I had to change to 0:0:0 then everything worked. And yes all the correct rules of Midi applied - set Korg to send out MTC, set Logic to receive in that song/synchronizations window and hit the button.
    I also had to make a custom setting on my Motu Micro Express to route the Midi signal correctly.

  • Printing output from select-object with write-host

    $lastdir = Get-ChildItem 'C:\Users\' | select Name | sort | select -last 1 name
    write-host $lastdir
    results printed as @{Name=guptal}
    how do I get it just to print the "guptal" part only? How do I access this object values?

    Hi,
    Add -ExpandProperty to your Select-Object.
    EDIT: Or use $lastdir.Name
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • BPM 1:N split into different service interfaces

    Hi everyone, just a quick question about multimapping scenarios.
    If I want to make a 1:N message split in BPM I should use a transformation step and specify a multiline container element to get the result of the transformation. That multiline container element is bound to a single message type so, If I want to split my incoming interface into different service interfaces (based on different message types), how can I handle that in BPM? Or is it just not possible?
    Thanks in advance.

    Hi,
    It is possible to specify more than one container element for the resulting messages of the transformation step
    Its possible.
    In operation mapping in IR if you add 3 interfaces in Target side and the same mapping if you select in BPM transform step then it will ask for three contaner.
    Create 3 contaneir.
    Select type as Abstract Interface.
    Then select individual interface in those containers.

  • Splitting one column into different columns.

    Hello Experts,
    How do i split datetime column into different columns while doing a Select statement.
    Ex:
    The column "REC_CRT_TS" has data like "2014-05-08 08:23:09.0000000".The datatype of this column is "DateTime". And i want it in SELECT statement like;
    SELECT
    YEAR(DATETIME) YEAR,
    MONTH(DATETIME) MONTH,
    DATENAME(DATETIME) MONTHNAME,
    DATEPART(DATETIME) WEEKNUM,
    DAY(DATETIME) DATE,
    DATEPART(DATETIME) HOUR
    FROM TABLE_NAME;
    The output should look like this;
    --YEAR| MONTH | MONTHNAME| WEEKNUM | DATE | HOUR
    --2014| 5 | May | 25 | 08 |08
    Any suggestions please.
    Thanks!
    Rahman

    I made a very quick research and I see in this blog post
    http://www.jamesserra.com/archive/2011/08/microsoft-sql-server-parallel-data-warehouse-pdw-explained/
    that  It also uses its own query engine and not all features of SQL
    Server are supported.  So, you might not be able to use all your DBA tricks.  And you wouldn’t want to build a solution against SQL Server and then just hope to upsize it to Parallel Data Warehouse Edition.
    So, it is quite possible that this function doesn't exist in PDW version of SQL
    Server. In this case you may want to implement case based month name or do it in the client application.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Split up of events into clips, imported from VHS cassettes

    I have been trying to split up events which I imported from different video cassettes, they import in one big clip into one event, but the thing is I need to split up this event into several independant events, I dont seem to be able to find a solution,
    Bye for now, Peter

    I am assuming that once you have split up your Event you will create a Project for each of them in order to do your editing  etc.
    What you could do is create several Projects from the one Event, thereby achieving, hopefully, the same thing.
    Try this.
    From your Event create new Project ie File -- New Project.You could call this Project 1.
    At top of screen select iMovie then down to Preferences.Select the Browser tab and click on "Clicking in Events Browser selects entire clip " Close the Imovie Preferences.
    Click on your big clip in your Event and a yellow box will surround this whole clip .You should see that the left and right sides of this yellow box have what look like small loops or handles. Click and hold down on the handles and move the sides (left or right ) to the position where you want to start and finish a particular section.You can view these positions on your screen as you move left or right, let go of mouse when in wanted position.
    You might want to expand your clip using the slider at bottom right of the Event before doing this to give you more visibility and control.
    When you have positioned the left and right handles to your liking, ( covering say the first 20 minutes of your Event ) click in the yellow box, hold down and drag to your project.
    Now create a new project---  Project 2  and repeat the above for the next section of your Event, and so on untill you have covered your entire Event.
    If you wanted to break up your Event into say 5 sections, you have 1Event but 5 Projects.( Instead of 5 Events and 5 Projects)
    Each Project can be edited as you wish.
    Moving the handles left and right takes a bit of getting used to at first but you will get the hang of it quite quickly.
    Hope this achieves what you were trying to get to.

Maybe you are looking for

  • New Firmware Update for Nokia N95 (RM-159 ) :Decem...

    Hello All, It looks like new firmware update is available for Nokia N95 basic model . Earlier Version of Firmware was : 30.0.015 Now the latest available Firmware was : 31.0.014 When i connected my N95 to PC using PC-Suite, it notified me about this.

  • While browsing, my computer runs out of space

    Even though I know I have 2 GB of free space (not enough, I know, and I am getting an external drive), when browsing, I suddenly get a warning that I am almost out of disk space. There is only 100mb left, or less. When I restart, it goes back to 2GB.

  • Calling a applet in jsp

    While running the jsp I am getting following alert box and rad will exit please any one help for this . The alert box contains :- The procedure entry point JVMGetMethodIxLocalsCount@12 could not be located in the dynamic link library jvm.dll. Please

  • New wireless mouse wont scroll

    Hi I have an Imac 10.4.11 and I have just purchased a new apple bluetooth mouse today but I cant get it to scroll down through a website as they do in the video on the apple site. Can anyone shed any light on this? I have gone into system preferences

  • How to shutdown the PC using Lab View

    Hi, We are doing UPS project. In this project we have to shutdown the PC if there is a battery low condition. I want to know whether is their any library function in Lab View to shutdown the PC. And also we want make this labview to run in background