Convert the lines into columns... very urgent

Hello

I have a small doubt... I create it follows and insert commands.

CREATE THE TABLE SCOTT. ABC
(
ROOM_NAME VARCHAR2 (20 BYTE),
MET_MONTH VARCHAR2 (2 BYTE),
NUMBER OF TOTAL_SEATS
);

TOGETHER TO DEFINE
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("Synergy Room 3', '06' 18");
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("NP2-18', ' 08,' 35 ');
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("Synergy room 2', '08' 50 ');
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("Synergy room 2', '05' 20 ');
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("NP5-26 ', ' 05,' 10 ');
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("NP2-18 ', ' 11', 35 ');
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("NP3-49 ', ' 07,' 10 ');
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("Synergy Room1", '08', 45);
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("Wallace Stevens', '09', 95 ');
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
('Synergy Room1', '04', 73);
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("Wallace Stevens ', 10', 205 ');
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("Wallace Stevens', '04', 100 ');
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("Synergy Room 3', '04' 25 ');
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("NP3-49 ', ' 04', 8 ');
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("Synergy Room 3', '07' 10 ');
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("NP5-26', ' 07,' 13 ');
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("NP2-18', ' 05,' 28 ');
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("NP3-49 ', ' 09', 15 ');
Insert into ABC
(ROOM_NAME, MET_MONTH, TOTAL_SEATS)
Values
("NP5-26 ', ' 10', 15 ');
COMMIT;

So I need to get the result like this:

RoomName Jan Feb Mar Apr May June July Aug 7 Oct Nov Dec

Synergy room 1 0 0 0 73 0 0 0 45 0 0 0 0
Synergy room 2 0 0 0 0 20 0 0 50 0 0 0 0
Synergy Room 3 0 0 0 25 0 18 10 0 0 0 0 0
Wallace Stevens 0 0 0 100 0 0 0 0 95 205 0 0
NP5-26 0 0 0 0 10 0 13 0 0 15 0 0
NP2-18 0 0 0 0 28 0 0 35 0 0 35 0
NP3-49 0 0 0 0 0 0 10 0 15 0 0 0



Thank you
Rajiv

If you do not want null values then try like this

NVL (sum (decode (met_month, ' 01', total_seats)), 0) such as jan,.

S

Tags: Database

Similar Questions

  • How to convert the lines into columns dynamically

    HII
    I have a 'report_line' with the following data table

    location_code line_code value
    LOC1 L1 12
    loc2 L1 13
    LOC1 L2 15
    loc2 L3 11
    LOC3 L1 9

    Now I want the o/p by converting the line_codes in clumns as below

    L1 L2 L3
    LOC1 12 15
    13 11 loc2
    LOC3 9

    How can I do this dynamically. Line codes are not constatnt, they can change for each scenario.

    Thank you
    Sandeep

    I want just a sql for this query and no. columns ' maximum of are 6.

    In this case you can do.

    --sample data
    with t
    as
    (
    select 'loc1' location_code, 'L1' line_code, 12 value from dual union all
    select 'loc2', 'L1', 13 from dual union all
    select 'loc1', 'L2', 15 from dual union all
    select 'loc2', 'L3', 11 from dual union all
    select 'loc3', 'L1', 9 from dual
    )
    --end of sample data
    select location_code,
           max(decode(line_code, 'L1', value, null)) L1,
           max(decode(line_code, 'L2', value, null)) L2,
           max(decode(line_code, 'L3', value, null)) L3,
           max(decode(line_code, 'L4', value, null)) L4,
           max(decode(line_code, 'L5', value, null)) L5,
           max(decode(line_code, 'L6', value, null)) L6
      from t
     group by location_code
    

    Here I used the WITH clause as an example of table. You can replace the "t" table name in the select statement with your actual table and remove the WITH clause.

  • SQL to convert the lines into columns

    Can someone please help with this? It sounds easy, but I can't do it on my own

    I need to create the output table something like this using the input table

    Entry table
    BOOKID ORDNAM ORDID
    100 1 XXX
    100 2 YYY
    101 AAA 3
    101 4 BBB

    For each ID value, there will be 2 ORDID leave a sequence

    Output table
    BOOKID ORDNAM ORDID ORDNAM ORDID
    YYY XXX 100 1 2
    101 BBB 3 4 AAA

    Hello

    It's called swing , and there are a few good links in the FAQ forum on this subject:
    SQL and PL/SQL FAQ

    Exactly how do depends on your version of Oracle and exactly to your needs.
    If you use Oracle 11, you can use SELECT... Function PIVOT.

    If you have only two lines (by ID) of the original table you need to view side by side, then a self-join can be easier, regardless of your version.
    For example:

    SELECT     l.bookid
    ,     l.ordnam
    ,     l.ordid
    ,     r.ordnam
    ,     r.ordid
    FROM          input_table  l
    LEFT OUTER JOIN     input_table  r  ON   l.bookid  = r.bookid
                                     AND  l.ordid   < r.ordid
    ;
    

    I hope that answers your question.
    If this isn't the case, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all tables, or post a question involving tables commonly available, such as those in the scott schema. Whatever it is, after the desired results from these data.
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.
    You will find the answers better faster if you always provide this information whenever you post a question.

    Published by: Frank Kulash, July 22, 2011 11:21

  • Convert the lines into a single column

    create table suresh
    (
    Identification number,
    ch char (1)
    )
    ;

    Insert in suresh values(1,'i');
    Insert in suresh values(1,'a');
    Insert in suresh values(1,'m');
    Insert in suresh values(1,'b');
    Insert in suresh values(1,'o');
    Insert in suresh values(1,'y');

    Select * from suresh

    ID ch
    1 I
    1 a
    1 m
    1 b
    1 o
    1 y


    I'm looking for output something like this

    ID ch
    1 iamboy
    ..
    select id,listagg(ch) within group(order by ch) as ch
    from suresh
    group by id 
    
  • Divide the line into several columns

    Hi all

    I have a question where I want to divide the line into multiple columns based on the delimiter ' |'.

    Staging of Table structure: People_STG, I have people in it.

    Create table People_STG(col1 varchar2(4000));


    Insert into People_STG(Emp_id|) User name | FirstName. LastName. JobTitle | hire_date | Location_id)


    SELECT REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 1) EMP_ID,
           REGEXP_SUBSTR ( COL1, '[^|]+', 1, 2) USERNAME,
           REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 3) FIRSTNAME,
           REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 4) LASTNAME,
           REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 5) JOBTITLE,
           REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 6) HIRE_DATE,
           REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 7) LOCATION_ID
    FROM PEOPLE_STG
    WHERE length(regexp_replace(COL1, '[^|]', '')) = 14;
    

    But I am facing a problem here, as in some lines, function is null, but when I run the above query, it is not recognizing the empty element and inserting Hire_date values of function and location_id in Hire_date where function is null.

    for example: 1 | akash51 | Akaksh | C | 22/11/14 | 15

    Here the function is null, so when I run top to divide query it will insert 11/22/14 in the function column and 15 in Hire_Date.

    Please need help on this one.

    Oracle Version: 11.2 g

    Thanks in advance,

    Akash.

    There are different techniques to cope with this.  Is a simple...

    SQL > ed
    A written file afiedt.buf

    1 with t as (select 1 | akash51 |) Akaksh | C | 22/11/14 | 15' as col1 of union double all the
    2 Select 2 | akash52 | Akaksh | C | Jobs jobs | 23/11/14 | 15' of the double
    3            )
    4  --
    5. end of test data
    6  --
    7 select trim (REGEXP_SUBSTR (COL1, ' [^, |] +', 1, 1)) EMP_ID,.
    8 toppings (REGEXP_SUBSTR (COL1, ' [^, |] +', 1, 2)) USERNAME,.
    9 garnish (REGEXP_SUBSTR (COL1, ' [^, |] +' 1, 3)) FIRSTNAME,
    10 pads (REGEXP_SUBSTR (COL1, ' [^, |] +' 1, 4)) LASTNAME,.
    11 garnish (REGEXP_SUBSTR (COL1, ' [^, |] +' 1, 5)) JOBTITLE,.
    12 pads (REGEXP_SUBSTR (COL1, ' [^, |] +', 1, 6)) HIRE_DATE,.
    13 garnish (REGEXP_SUBSTR (COL1, ' [^, |] +' 1, 7)) location_id
    14 * from (select replace (col1, ' |)) ',' | as col1 of t)
    SQL > /.

    EMP_ID USERNAME FIRSTNAME LASTNAME, JOBTITLE HIRE_DATE LOCATION_I
    ---------- ---------- ---------- ---------- ---------- ---------- ----------
    1 akash51 Akaksh C 22/11/14 15
    2 akash52 Akaksh C Job 23/11/14 15

  • How to view the line of columns without using the pivot keyword

    Hello
    could someone help me how to display lines in columns without using the keyword pivot and actuall is my scenario, iam having two tables with names and examples of data is shown below

    MIDDLE MINAME TASKID TASKNAME IDENTIFICATION PROJECT

    1 PROJ1 1 AA 100 PR1_TASK1
    1 PROJ1 3 CC PR1_TASK3 102
    1 PROJ1 DD 4 103 PR1_TASK4
    1 PROJ1 EE 5 104 PR1_TASK5
    1 PROJ1 6 105 FF PR1_TASK6
    2 PROJ2 EE 5 114 PR2_TASK1
    2 PROJ2 6 115 FF PR2_TASK2
    2 PROJ2 GG 7 116 PR2_TASK3
    2 PROJ2 HH 8 117 PR2_TASK4
    2 PROJ2 9 118 PR2_TASK5 JJ
    2 PROJ2 KK 10 119 PR2_TASK6
    2 PROJ2 1 AA PR2_TASK7 120


    The output should show the project and County of tasks at a given stage as shown below

    project AA BB CC DD EE FF GG HH JJ KK
    1 2 0 1 5 3 2 0 2 1 0
    2 1 2 0 2 1 0 2 4 3 1


    Thanks in advance,
    VVR
    CREATE TABLE pivot_test (
    ID           NUMBER,
    PROJECT      VARCHAR2(10),
    MID          NUMBER,
    MINAME       VARCHAR2(5),
    TASKID       NUMBER,
    TASKNAME     VARCHAR2(10)
    );
    
    INSERT INTO pivot_test VALUES (1, 'PROJ1', 1,  'AA', 100, 'PR1_TASK1');
    INSERT INTO pivot_test VALUES (1, 'PROJ1', 3,  'CC', 102, 'PR1_TASK3');
    INSERT INTO pivot_test VALUES (1, 'PROJ1', 4,  'DD', 103, 'PR1_TASK4');
    INSERT INTO pivot_test VALUES (1, 'PROJ1', 5,  'EE', 104, 'PR1_TASK5');
    INSERT INTO pivot_test VALUES (1, 'PROJ1', 6,  'FF', 105, 'PR1_TASK6');
    INSERT INTO pivot_test VALUES (2, 'PROJ2', 5,  'EE', 114, 'PR2_TASK1');
    INSERT INTO pivot_test VALUES (2, 'PROJ2', 6,  'FF', 115, 'PR2_TASK2');
    INSERT INTO pivot_test VALUES (2, 'PROJ2', 7,  'GG', 116, 'PR2_TASK3');
    INSERT INTO pivot_test VALUES (2, 'PROJ2', 8,  'HH', 117, 'PR2_TASK4');
    INSERT INTO pivot_test VALUES (2, 'PROJ2', 9,  'JJ', 118, 'PR2_TASK5');
    INSERT INTO pivot_test VALUES (2, 'PROJ2', 10, 'KK', 119, 'PR2_TASK6');
    INSERT INTO pivot_test VALUES (2, 'PROJ2', 1,  'AA', 120, 'PR2_TASK7');
    
    SELECT ID as PROJECT,
           SUM(DECODE(miname, 'AA', 1, 0)) AS AA,
           SUM(DECODE(miname, 'BB', 1, 0)) AS BB,
           SUM(DECODE(miname, 'CC', 1, 0)) AS CC,
           SUM(DECODE(miname, 'DD', 1, 0)) AS DD,
           SUM(DECODE(miname, 'EE', 1, 0)) AS EE,
           SUM(DECODE(miname, 'FF', 1, 0)) AS FF,
           SUM(DECODE(miname, 'GG', 1, 0)) AS GG,
           SUM(DECODE(miname, 'HH', 1, 0)) AS HH,
           SUM(DECODE(miname, 'JJ', 1, 0)) AS JJ,
           SUM(DECODE(miname, 'KK', 1, 0)) AS KK
    FROM   pivot_test
    GROUP BY ID;
    
    PROJECT AA BB CC DD EE FF GG HH JJ KK
    ------- -- -- -- -- -- -- -- -- -- --
          1  1  0  1  1  1  1  0  0  0  0
          2  1  0  0  0  1  1  1  1  1  1 
    
  • I still have not found "help" to tell me how to remove all the lines and columns beyond those needed for my spreadsheet.

    I used several worksheets.  More allows me to specify the rows/columns and then delete them.  This is to remove all the lines/columns beyond those set up and formatted for my spreadsheet.   I tried many ways to remove all additional lines/columns, but without success.  I even took the time to scroll down/on to highlight all the unnecessary lines and columns, but they do not remove it.
    Any suggestions?  I used spreadsheets most allow me to specify the number of rows/columns for my worksheet

    You can ask your question in the office | Excel Forum because it is not really a problem of Windows XP performance and maintenance.

    Office | Excel

    http://answers.Microsoft.com/en-us/Office/Forum/Excel

    Also, providing specific information may help to get a faster response or better, such as the version of Office or Excel? version of Windows XP? Home, Pro, 32-bit or 64-bit.

    I hope this helps.

  • view the lines of columns

    I have a table which has used and services

    I have question
    Select d.department_name, count (*)
    e employees, departments d
    where
    e.department_id = d.department_id
    D.department_name group;

    This will return charges and the name of the Department.

    Can any body guide me how to display these rows into columns.

    using pivot or some other way.

    Thank you
    Lavan

    It is explained, including examples in the SQL and PL/SQL FAQ: {message identifier: = 9360005}
    If you need more help then post a unit test and your version of the database , as explained here: {message identifier: = 9360002}

  • Need help for the conversion of the lines in columns

    Hi all

    I have a table with 2 columns.
    colId value
    1 aaa
    2 bbb
    3 ccc
    1 ddd
    Eee 2
    3 fff

    I want to store the data in the table above in another table that has 3 columns.
    col1 col2 col3
    AAA bbb ccc
    DDD eee fff

    I am pivot query. But I don't get it properly. Help, please.

    I have Oracle Database 11 g Enterprise Edition Release 11.1.0.6.0 - 64 bit Production

    Thanks in advance,
    Girish G

    Published by: Girish G July 28, 2011 01:28

    Girish G wrote:
    Hey Tubby,

    Let me explain the real-world scenario.

    I'm the external source CLOB data in oracle stored procedure.

    The data are coming in the form below.

    col1 # | #col2 # | #col3 ~ | ~ col1 # | #col2 # | #col3 ~ | ~ col1 # | #col2 # | #col3

    # Here. #-> is the column delimiter.
    and ~ | ~-> is the line delimiter.

    I want to store these data in a table that has 3 columns.

    My approach was to extract the data for each column and store it in a temporary table in separate lines. Then move the data from the temporary table to the destination table.

    Are there other alternatives for my requirement? Please suggest.

    Thank you
    Girish G

    Much better when you show us the context like that.

    It's late and I have sleepiness in my bones, so it's not likely optimal.

    select
       regexp_substr(split, '[^@]+', 1, 1) as col1 ,
       regexp_substr(split, '[^@]+', 1, 2) as col2 ,
       regexp_substr(split, '[^@]+', 1, 3) as col3
    from
    (
       select
          replace(regexp_substr(source_str, '[^@]+', 1, level), '#|#', '@') as split
       from
       (
          select
             replace('val1#|#val2#|#val3~|~val4#|#val5#|#val6~|~val7#|#val8#|#val9', '~|~', '@') as source_str
          from dual
       )
       connect by level <= length(source_str) - length (replace(source_str, '@') )  + 1
    );
    

    I do not have an instance running (tested on XE) 11 so I can't use "magical" things like regexp_count and fun stuff. This should give you a basic idea of how to analyze data well.

    I decode your delimiters in something "more manageable" just because it's easier than worrying about the escaping of special characters and all that fun stuff I'm too asleep to try.

    Since you are dealing with a CLOB (you actually over 4,000 characters of data?) you have to give it up and look for a function in the pipeline as a suitable alternative.

  • convert the data in the rows into columns

    Hello
    my table structure in this
    Emp_id          loancode           interest         principal
       1                   003                  12               1000
       1                   004                  12               2000
       2                   007                  16               2500
    The same employee might have to take two loans.i different need to display every ready as a separate... column detail like
    Empi_id          soc_code           loancode003     interestforloancode003  principal_for_loancode003     loancode004   i
     
    
    int_004   principal_for_loancode004
    I need to break all the different emp_id and soc_code (from another table)

    pls help


    Kind regards

    The WITH clause is called subquery factoring (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#i2077142)

    It is used to create tables of nickname, roughly the same as using inline views in the query.

    for example, it's the same thing...

    SQL> ed
    Wrote file afiedt.buf
    
      1  select decode(tp,1,'Op/Bal','Cl/Bal') as type
      2        ,max(case when period = 'JAN' and rn=1 then decode(tp,1,opn_bal,clo_bal) end) as Jan1
      3        ,max(case when period = 'JAN' and rn=2 then decode(tp,1,opn_bal,clo_bal) end) as Jan2
      4        ,max(case when period = 'JAN' and rn=3 then decode(tp,1,opn_bal,clo_bal) end) as Jan3
      5        ,max(case when period = 'FEB' and rn=1 then decode(tp,1,opn_bal,clo_bal) end) as Feb1
      6        ,max(case when period = 'FEB' and rn=2 then decode(tp,1,opn_bal,clo_bal) end) as Feb2
      7        ,max(case when period = 'FEB' and rn=3 then decode(tp,1,opn_bal,clo_bal) end) as Feb3
      8  from (select period, opn_bal, clo_bal, row_number() over (partition by period order by opn_bal) rn from dta),
      9       (select rownum as tp from dual connect by rownum <= 2)
     10* group by tp
    SQL> /
    
    TYPE         JAN1       JAN2       JAN3       FEB1       FEB2       FEB3
    ------ ---------- ---------- ---------- ---------- ---------- ----------
    Op/Bal       2000       2200       2300       5000
    Cl/Bal       3000       3300       3400       4500
    
    SQL>
    

    Simply, it makes it more tidy code and allows the same sets of data to be referenced multiple times in a query without duplicating the request online.

    It is also useful to create sets of dummy test data to use (you will see people on the forum to use for that) so that we don't have to create tables in our database just to test with.

  • Divide the lines into different columns

    HRCM_RECRUITMENT_NO amount facilities
    R000035 MONEY, FOOD, BASIC 0,0,0

    I did the result like this


    Now, I want to like this


    HRCM_RECRUITMENT_NO facilities Facilities_1 Facilities_2 amount Amount_1 Amount_2

    R000035. CASH FOOD BASIC 0 0 0


    Please help me! Tell me what to do?

    Hello
    This will not work unless you have constant facilities for all HRCM_RECRUITMENT_NO.

    SQL> with h as
      2  (select 'R000035' HRCM_RECRUITMENT_NO ,'CASH,FOOD,BASIC' Facilities ,'0,0,0' Amount from dual) 
    
      3  select HRCM_RECRUITMENT_NO,regexp_substr(Facilities,'[^,]+',1,1) f1,
      4         regexp_substr(Facilities,'[^,]+',1,2) f2,
      5         regexp_substr(Facilities,'[^,]+',1,3) f3,
      6         regexp_substr(Amount,'[^,]+',1,1) A1,
      7         regexp_substr(Amount,'[^,]+',1,2) A2,
      8         regexp_substr(Amount,'[^,]+',1,3) A3
      9  from h;
    
    HRCM_RE F1   F2   F3    A A A
    ------- ---- ---- ----- - - -
    R000035 CASH FOOD BASIC 0 0 0
    

    Twinkle

  • Convert a line into several lines

    Hello

    I have a Calendar_1 table with 4 columns and 1 row

    CREATE TABLE Calendar_1
    (
    Sunday (1) tank,.
    Monday (1) tank,.
    Tuesday (1) tank,.
    Wednesday char (1)
    );

    INSERT INTO Calendar_1 VALUES ('A', ' B ', 'C' ' d ' ");
    COMMIT;

    I need to get my result under a single column 'DAYS' as shown below

    DAYS
    --------
    A
    B
    C
    D

    Could you please provide me with the required SQL code

    Concerning
    -Learnsequel

    Like this

    select decode(l, 1, sunday, 2, monday, 3, tuesday, 4, wednesday) days
      from calendar_1
      cross join (select level l from dual connect by level <= 4) 
    
  • Another question on the lines of columns...

    Hello world
    I have to rotate a table, but without knowing the actual values of the columns.
    I have:

    create table (test)
    cust_id varchar2 (10),
    month_id number (6).
    number of recipes);

    insert into test ('123', 201010, 1000) values;
    insert into test ('123', 201011, 1050) values;
    insert into test ('123', 201012, 200) values;
    insert into test ('125', 201010, 2000) values;
    insert into test ('125', 201011, 2050) values;
    insert into test ('125', 201012, 2005) values;
    insert into test ('120', 201010, 5000) values;
    insert into test ('120', 201011, 5050) values;
    insert into test ('120', 201012, 2000) values;


    Result:

    '123' as cust_id, 1000 as month_1, 1050 as month_2, 200 month_3
    "125" as cust_id, 2000 as month_1, 2050 as month_2, 2005, month_3
    '120' as cust_id, 5000 as month_1, 5050 as month_2, 2000 as month_3

    I still have 3 distinct values for month_id, but I do not have at the time of the selection.
    Could you help me?
    Thank you

    MIA

    user543426 wrote:

    I still have 3 distinct values for month_id, but I do not have at the time of the selection.

    You can use an approach to table pivot, as explained in {message identifier: = 9275390}.

    Before using the PivotTable, delete its contents, run a SELECT to get your 3 distinct values and insert in the PivotTable.

    Then run the SQL pivot.

    No need of dynamic SQL or PL/SQL - like you are dealing with 3 columns static pivot for 3 distinct values. The actual values are not relevant to the process itself.

  • Why converts the images into a text file?

    I found that when I opened some art work that I have done in Illustrator CS4 work seems itself have converted into text files.

    Could someone tell me why this is happening. I seem to have lost the work which took many hours. I'm puzzled.

    Grateful for any advice.

    Kind regards.

    What gives you the impression that they are text files? The original format of the files was Postscript, a text format, but who died with AI9. Here is the PDF format.

  • Convert the Recordset into text

    Hi all

    I have a query returns the contents of a shopping cart. I'm trying to find a way to convert this recordset in text object to insert in the database as a description of the order.

    Any ideas?

    TIA
    Paul

    No, you're not being stupid. There are usually a number of ways to accomplish something and you are trying only to get an idea of the best way.

    I would still be a little go with my original suggestion... store the object of the request at the time of the purchase (by storing in text form). You can convert a query object later and perform all operations above you need.

    storing text, you are limited to... Well... just out of text.

    Alternatively, you may wish to consider that when an item is changed (all change, be at this price, description, etc.), you write too simply existing data. first copy the original file to a "product archive" table...-then-update the price of your table is active.

    doing this is a little more work, but there may be benefits to this. Let's say you want to look over the past 3 years to see which product has changed their prices more frequently. or what product had the largest increase in price last year.

    When you simply replace data, your story is actually gone. not a lot of reports that you can do... and reports often is very convenient to watch (or search) some trends that can help you decide which direction you want to go in the future.

    My $0.02 :)

Maybe you are looking for