Splitting words before inserting into the new table

SQL> desc company
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 CO_ID                                     NOT NULL NUMBER(9)
 R_DATE                                             TIMESTAMP(0)
 CONAME                                             VARCHAR2(140)
 ESTYR                                              NUMBER(5)
 COUNTRY                                            VARCHAR2(32)
 PRODUCTS                                           VARCHAR2(3900)

SQL> select unique(products) from company where rownum<6;

PRODUCTS
--------------------------------------------------------------------------------
bars,tubes,pre-weld seams,isosceles and un-isosceles angles,special profiles,u-p
rofiles,plates,t-profiles,flanges,tube fittings,round,hollow bars,double-t-profi
les (ipe und ipb),pipe clamps,flat,special designs according to drawings for new
 products,profiles for floor covering,hexagon

carbon steel bright bars,tool steel bright bars,alloy steel bright bars,stainles
s steel bright bars

cold rolled coil,e.g sheet,prepainted sheet,galvalume coil,copper scrap,stainles
s steel sheet,shredded scrap,hms1 and 2,cobalt ore,rail scrap,hot rolled coil,ga
lvanized sheet,iron ore

PRODUCTS
--------------------------------------------------------------------------------

ferro alloy producer
switch technology,special tubes,rails,steel strip,special steel
I created another table:
crate table keywords(
k_id number(14),
keywords varchar2(500) unique
);

create sequence keywords_pk_seq
start with 3484 increment by 1;

create or replace trigger keywords_pk_trig
before insert on keywords
referencing new as new
for each row
begin
select keywords_pk_seq.nextval into :new.k_id
from dual;
end;
/
I want to:
one) to split columns of company.products where is comma (,) for example, bars, tubes, pre-soudures, tubes will became 4 different as words:
bars
tubes
welds
tubes

(b) then I want to insert these words in the table keywords.keywords with condition separated by ignoring the existing keywords.keywords (e.g. tubes came twice, let's get just a tubes) for example
k_id keywords
1 bars
2 tubes
3 before welding

Thank you and best regards

You can use the merge statement:

for example

merge into keywords
using (
with t as (select 'pipes,taps,spanner,spade,tubes' as txt from dual)
-- end of sample data
  select distinct REGEXP_SUBSTR (txt, '[^,]+', 1, level) kw
  from t
  connect by level <= length(regexp_replace(txt,'[^,]*'))+1
  ) x
 on (keywords.keyword = x.kw)
when not matched then insert (id, keyword) values (key_seq.nextval, x.kw)
/

But keep in mind that the sequence in this example will be updated for each line independently to know if she gets inserted or not.
If you set the ID using a sequence triggered when inserting then this will solve this problem.

Tags: Database

Similar Questions

  • Record is not inserted into the transparent Table Forms 10g

    Hi all

    I have the built in 10g (10.1.2.0.2) form.

    Basically, the form has 2 blocks.
    1 block with a single element, where we enter a value and press on enter (this place you block2 and run the query).
    Block 2 (tabular) will get the records. This block2 have now 3 columns (caseid, userid, date).

    Now when I insert a new record, I just need to get the caseid only. And username and date must be filled in automatically.
    I can fill fields username and the DATE.
    And when I enter a value element of the block 2 caseid and then Control + S(to insert the record and Save the transaction),.
    I get the message saying FRM-40400: transactions: 1 applied and saved records.
    But when I ask again for the same thing, I do not have is the record inserted into the table.
    Why is this happening?

    Help please...

    Drop the trigger for INSERTION WE (do not comment code or write NULL) and move your code to INSERT before trying.

    -Clément

  • Data does not get inserted into the Hxt_Add_Assign_Info_F table

    Hello

    Can tell me regarding when the data is inserted into the Hxt_Add_Assign_Info_Ftable.
    Lately this table not get updates.

    Thank you
    Bitr

    When you enter the assignment of time information, this table is filled (responsibility of the OTL Application Developer > OTL time accounting > assignment of time information)

  • insert into the summary table of the table.

    I was wondering if there is a smart way to do it with SQL, but I'm not sure. I would like to consult you yo guys.

    I have a table like this
     CREATE TABLE "TEMPLE_FINANCE"."TEST" 
       (     "COLUMN1" VARCHAR2(10 BYTE), 
         "COLUMN2" VARCHAR2(10 BYTE), 
         "COLUMN3" VARCHAR2(10 BYTE), 
         "COLUMN4" VARCHAR2(10 BYTE)
       ) ;
    
    
    Insert into TEST (COLUMN1,COLUMN2,COLUMN3,COLUMN4) values ('1','2','50.00',null);
    Insert into TEST (COLUMN1,COLUMN2,COLUMN3,COLUMN4) values ('1','2','50.00',null);
    I would like to at the rate of an update and you end up with
    "COLUMN1"     "COLUMN2"     "COLUMN3"     "COLUMN4"
    "1"                  "2"          "100.00"     
    What update statement can run for this?
    I would enter in the summary of the lines based on the column 1 and column2 and get rid of repeative lines.
    I have try this insert statement, but it's bascially just adding an extra record in the table.
    INSERT INTO  TEST (SELECT COLUMN1, COLUMN2, SUM(COLUMN3), COLUMN4 FROM TEST GROUP BY COLUMN1, COLUMN2,COLUMN4);
    any help would be grateful.

    Published by: mlov83 on January 25, 2013 12:45

    Published by: mlov83 on January 25, 2013 13:03

    Hello

    I can't help but wonder if you have the best design of table for what it is, you need to do.

    The best solution would be to create a new table, using the SUM (TO_NUMBER (Column3)) and GROUP BY, and then delete the original table and rename a new one to the old name. While you're at it, change Column3 as a NUMBER and add a primary key.

    In collaboration with just the existing table, INSERT one won't work. INSERT always adds new lines. You want something that can INSERT new lines (or update some existing routes) and DELETE lines at the same time. FUSION can do it all. Here's a way to use the MERGE:

    MERGE INTO     test     dst
    USING   (
              SELECT column1, column2, column4
              ,      SUM (TO_NUMBER (column3))
                                 OVER (PARTITION BY  column1, column2, column4)
                                AS column3_total
              ,      ROWID             AS r_id
              ,      MIN (ROWID) OVER (PARTITION BY  column1, column2, column4)
                                          AS min_r_id
              FROM    test
         )          src
    ON     (src.r_id     = dst.ROWID)
    WHEN MATCHED THEN UPDATE
    SET     dst.column3       = TO_CHAR ( src.column3_total
                                , 'FM9999999.00'
                            )
    DELETE
    WHERE     src.r_id     != src.min_r_id
    ;
    

    Published by: Frank Kulash on January 25, 2013 16:07

  • Insert in the new table if the row update SQL

    Guy
    If I have an update statement that I would like to keep track of wich ranks where actually updates how could I do? Here is what im tryin to acomplishe, I want to update a table column and if this line is put on day of my update statement I would like to insert a new table. Is this possible to do with plain ol' sql? or should I use plsql.

    an example would be great if someone would guide me on this one.
    CREATE TABLE "TEMPLE_FINANCE"."FWICNCL"
      (
        "FWICNCL_INVOICE"     VARCHAR2(10 CHAR) NOT NULL ENABLE,
        "FWICNCL_CANCEL_USER" VARCHAR2(60 CHAR) NOT NULL ENABLE
      )
    Insert into FWICNCL (FWICNCL_INVOICE,FWICNCL_CANCEL_USER) values ('I0003711','L_BANNER');
    Insert into FWICNCL (FWICNCL_INVOICE,FWICNCL_CANCEL_USER) values ('I0003710','L_BANNER');
    -My update statement wich I have in a procedure. Note that at this point I would insert each record in fobappd anything. I just want to insert the fwicncl records that actually fit and updated fabinvh.


    UPDATE FABINVH 
    SET FABINVH_CANCEL_IND = 'N',
    FABINVH_CANCEL_DATE = TRUNC(SYSDATE),
    FABINVH_CANCEL_USER = (SELECT fwicncl_cancel_user FROM FWICNCL WHERE FABINVH_CODE = fwicncl_INVOICE),
    FABINVH_CANCEL_ACTIVITY_DATE = trunc(SYSDATE)
    WHERE EXISTS 
    (SELECT fwicncl_INVOICE
          FROM FWICNCL 
          WHERE FABINVH_CODE = fwicncl_INVOICE);
    COMMIT;
    
    
        INSERT INTO FOBAPPD (FOBAPPD_SEQ_CODE,
                         FOBAPPD_DOC_NUM,
                         FOBAPPD_ACTIVITY_DATE)
        (SELECT '3', fwicncl_INVOICE, TRUNC(SYSDATE) FROM  FWICNCL);
          COMMIT;
    Thank you for your help in advance.

    Well, you can use the RETURN clause IN the UPDATE statement to get all of the values that must be returned to a collection.

    Refer to the RETURN clause IN the PL/SQL user's Guide

    http://docs.Oracle.com/CD/B19306_01/AppDev.102/b14261/returninginto_clause.htm

    The bottom of the page has links to examples that show how to do this. This is one of the examples.

    Example 7-6 Dynamic SQL Inside FORALL Statement
    
    DECLARE
       TYPE NumList IS TABLE OF NUMBER;
       TYPE NameList IS TABLE OF VARCHAR2(15);
       empids NumList;
       enames NameList;
    BEGIN
       empids := NumList(101,102,103,104,105);
       FORALL i IN 1..5
          EXECUTE IMMEDIATE
            'UPDATE employees SET salary = salary * 1.04 WHERE employee_id = :1
             RETURNING last_name INTO :2'
             USING empids(i) RETURNING BULK COLLECT INTO enames;
    END;
    /
    
  • "missing the SELECT keyword" error during an insert into the temporary table using the blob value

    I'm trying to insert into an oracle temp table using select that retrieves data from a blob field but I get the error: "lack the SELECT keyword.

    How we store temporary in oracle result when we make this type of operation (extraction of data in fields and try to load them into a separate table on the fly.?)

    with cte as)

    Select user_id, utl_raw.cast_to_varchar2 (dbms_lob.substr (PREFERENCES)) as USER my_blob

    )

    create table new_table as

    SELECT user_id,EXTRACTvalue(xmltype(e.my_blob),'/preferences/locale') regional settings

    E ETC

    ----------------------------------------------------------------------------------

    BLOB data - value - which is

    <? XML version = "1.0" encoding = "ISO-8859-1" ?>

    - < Preferences >

    < time zone > America/New_York < / > zone

    < displayscheduleinusertimezone > Y < / displayscheduleinusertimezone >

    < local > Spanish < /locale >

    < DateFormat > JJ/mm/aaaa < / DateFormat >

    < timeFormat > hh: mm aaa < / timeFormat >

    < longformat > Long_01 < / longformat >

    < doubleformat > Double_01 < / doubleformat >

    < percentformat > Percentage_01 < / percentformat >

    < currencyformat > Currency_01 < / currencyformat >

    < / Preferences >

    A WITH clause that must immediately precede the SELECT keyword:

    SQL > create table t:

    2 with the o as (select double dummy)

    3 select * West longitude;

    Table created.

  • How to filter the form entries before inserting into the database?

    Hello Adobe Forums,

    This is my first post and im a beginner with dreamweaver. I have created two forms on my site, one for messages (contact form) and the other for the testimony. I used the server behavior record insert to insert the record into the database, and then display the record in my administration area. What I want to do is to make sure that nobody can put the code in one of the entries, and if they do then to strip out code before its insertion in the database. Anyone know how I can do this? I'm not a coder I just use dreamweavers Insert menu, but I can change the code if somone told me what to do and where.

    Thanks in advance

    Dang - sorry-

    foreach ($_POST as $key-online $value) {}

  • Select values from the db1 table and insert into the DB2 table

    Hello

    I have three databases oracle running in three different machines. their ip address is different. among the DB can access databases. (means am able to select values and insert values into tables individually.)

    I need to extract data from the DB1 table (ip say DB1 is 10.10.10.10 and the user is DB1user and the table is DB1user_table) and insert the values into DB2 table (say ip DB2 is 11.11.11.11 and the user is DB2user and table DB2user_table) of DB3 that is to have access to the two IPs DB.

    How do I do this

    Edited by: Aemunathan on February 10, 2010 23:12

    Depending on the amount of data must be moved between DB1 and DB2, and the frequency at which this should happen, you might consider the SQL * COPY more control. I think it's very useful for one-off tasks little, so I can live within its limits of the data type. More http://download.oracle.com/docs/cd/E11882_01/server.112/e10823/apb.htm#i641251.

    Change some parameter of sqlplus session are almost mandatory in order to get decent transfer rates. Tuning ARRAYSIZE and COPYCOMMIT can make a huge difference in flow. LONG change may be necessary, too, depending on your data. The documentation offers these notes on use:

    To activate the copy of data between Oracle and databases non-Oracle, NUMBER of columns is replaced by DECIMAL columns in the destination table. Therefore, if you are copying between Oracle databases, a NUMBER column with no precision will become a DECIMAL column (38). When copying between Oracle databases, you must use SQL commands (CREATE TABLE AS and INSERTION), or you must make sure that your columns have a specified precision.

    SQL * the VALUE LONGER variable limits the length of the LONG column you are copying. If all LONG columns contain data exceeds the value of LONG, COPY truncates the data.

    SQL * Plus performs a validation at the end of each successful COPY. If you set the SQL * variable more COPYCOMMIT DEFINED to a value positive n, SQL * Plus performs a validation after copying all lots n of records. The SQL * Plus ARRAYSIZE variable SET determines the size of a batch.

    Some operating environments require that the service names be placed between double quotes.

    From a SQL * Plus term on DB3, can resemble the command to move all content from my_table in DB1 to the same table in DB2

    COPY from user1/pass1@DB1 to user2/pass2@DB2 -
    INSERT INTO my_table -
    USING select * from my_table
    

    Note the SQL code * more line-continuation character ' - '. It is used to escape the newline character in a SQL * Plus command if you do not have to type all on one line. I use it all the time with this command, but I can't locate the documentation on that right now. Maybe someone else can put their finger on it.

    There are other ways to accomplish what the command copy and it is not without its quirks and limitations, but I find that there is usefulness in an Oracle Toolbox.

  • delete all, then insert into the target table, two steps in one transaction?

    Hello

    We have the following two steps in one ODI package, it will be managed in a single transaction?

    procedure step 1): remove all of the target table.
    interface in step 2): insert data in the source table in the target table.

    our problem is that step 2 can take some minutes, and then the target table can temporary unusable for end users who try to access it, I'm good?

    Kind regards
    Marijo

    Hello

    It can be managed in a single transaction by selecting IKM as the Append and TRUNCATE/DELETEALL Option command in the FLOW of an interface tab.

    Thanxs
    Malezieux

  • error when insert into the xmltype table

    Hi expert,

    I'm in I'm in Oracle Enterprise Manager 11 g 11.2.0.1.0.
    SQL * more: Production of release 11.2.0.1.0 killed him Feb 22 11:40:23 2011

    I correctly applied several .xml files in the table xmltype DOCUMENT by using this PROCEDURE.
    But only received the error, because he understood "the House of McVay.
    My codes and messages are listed below:

    SQL > CREATE or REPLACE PROCEDURE loadxml IS
    77
    EXCEPTION 78
    79, SO THAN OTHERS THEN
    raise_application_error 80 (-20101, ' Exception occurred in a procedure loadxml :'||) SQLERRM);
    LoadXml END 81;
    82.

    CAUTION: Procedure created with compilation errors.

    SQL > show the error;
    LOADXML PROCEDURAL errors:

    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    18/31 PLS-00103: encountered the symbol "S" when expecting one of the
    Next:
    * & = - + ; <>/ is mod remains not rem
    < an exponent (*) > <>or! = or ~ = > = < = <>and like2 or
    like4 likec between | submultiset of type multiset Member

    Is there someone can help?

    Thank you!

    Cow

    Published by: cow on March 22, 2011 21:50

    Basic SQL/PLSQL: Given that you create a string a single quotation mark is represented by two "characters...

    However, you should probably use & apos; rahther as a single quote

    Published by: mdrake on March 18, 2011 15:44

  • Look for patterns in a string and insert it into a new table

    I need to write a query that finds a number of location of employees that has been changed from old to new

    EMPLOYEE_DESC

    Description of the ID

    1 employee location was change from 877-287-8765 to 876-876-0976

    2 location of employee was passing of 877-287-8766 at 876-879-0976

    slot 3 is passed under NONE FOUND TO577-75-5951

    Once I get the identifier for the old and the new, I need to insert into the new table

    INSERT INTO TABLE_B

    (OLD_LOC_ID, NEW_LOC_ID)

    VALUES (OLD_LOC_ID, NEW_LOC_ID);

    TABLE_B

    ID OLD_LOC_ID NEW_LOC_ID

    1 287-877-8765 876-876-0976

    2 287-877-8766 879-876-0976

    3. NONE FOUND 577-75-5951

    The problem is that there is no fixed model for these records. I guess I have to insert the records that correspond to a fixed patten and snoop then through other manually. Is there a REGULAR expression feature that can help me grep values old and new location for the employee_desc number?

    Thank you

    Kevin

    Hello

    Kevin_K wrote:

    ...  The problem is that there is no fixed model for these records. I guess I have to insert the records that correspond to a fixed patten and snoop then through other manually. Is there a REGULAR expression feature that can help me grep values old and new location for the employee_desc number?

    Thank you

    Kevin

    Yes, you can do something like this:

    REGEXP_SUBSTR (description

    , ' ((NONE FOUND) |) (\d+-\d+-\d+)) * To * \d+-\d+-\d+'

    1

    1

    'i' - case-insensitive

    )

    It looks like for

    1. a "phone number" or the words "NOTHING FOUND", followed immediately by
    2. 0 or more spaces followed immediately by
    3. the word "TO", followed immediately
    4. 0 or more spaces followed immediately by
    5. a "phone number".

    where a "phone number" is defined as

    1. 1 or more digits, followed immediately
    2. a hyphen, immediately followed by
    3. 1 or more digits, followed immediately
    4. a hyphen, immediately followed by
    5. 1 or more digits
    6. You can also get the parts before and after 'TO' separately.
  • Insert data as XML into the Oracle Table

    Hi all

    I have a requirement where the data in XML format, and I need to insert into the Oracle Table. For example, I get XML data in the following format,
    < results >
    < row >
    < BANK_ACCOUNT_ID > 10010 < / BANK_ACCOUNT_ID >
    < BANK_ID > 300968 < / BANK_ID >
    Vision operations < LEGAL_ENTITY > < / LEGAL_ENTITY >
    < BANK_NAME > BofA < / BANK_NAME >
    < BANK_ACCOUNT_NUM > 10271-17621-619 < / BANK_ACCOUNT_NUM >
    < BANK_ACCOUNT_NAME > BofA-204 < / BANK_ACCOUNT_NAME >
    < BRANCH_NAME > New York < / BRANCH_NAME >
    USD < CURRENCY_CODE > < / CURRENCY_CODE >
    < BALANCE_DATE > 2007 - 11 - 09 < / BALANCE_DATE >
    < LEDGER_BALANCE > 432705900.56 < / LEDGER_BALANCE >
    < / row >
    < row >
    < BANK_ACCOUNT_ID > 10091 < / BANK_ACCOUNT_ID >
    < BANK_ID > 300984 < / BANK_ID >
    Vision industries < LEGAL_ENTITY > < / LEGAL_ENTITY >
    Barclay Bank < BANK_NAME > < / BANK_NAME >
    < BANK_ACCOUNT_NUM > 70986798 < / BANK_ACCOUNT_NUM >
    Bank Multi currency-626 < BANK_ACCOUNT_NAME > Barclays < / BANK_ACCOUNT_NAME >
    Reading < BRANCH_NAME > < / BRANCH_NAME >
    GBP < CURRENCY_CODE > < / CURRENCY_CODE >
    < BALANCE_DATE > 2007 - 11 - 14 < / BALANCE_DATE >
    < LEDGER_BALANCE > 24244085.24 < / LEDGER_BALANCE >
    < / row >
    < row >
    < BANK_ACCOUNT_ID > 10127 < / BANK_ACCOUNT_ID >
    < BANK_ID > 300968 < / BANK_ID >
    < LEGAL_ENTITY > SSC U.S. 01 < / LEGAL_ENTITY >
    < BANK_NAME > BofA < / BANK_NAME >
    < BANK_ACCOUNT_NUM > 4898744 < / BANK_ACCOUNT_NUM >
    < BANK_ACCOUNT_NAME > BofA SSC U.S. 02-7188 < / BANK_ACCOUNT_NAME >
    < BRANCH_NAME > New York < / BRANCH_NAME >
    USD < CURRENCY_CODE > < / CURRENCY_CODE >
    < BALANCE_DATE > 2007 - 11 - 28 < / BALANCE_DATE >
    < LEDGER_BALANCE > 10783815.28 < / LEDGER_BALANCE >
    < / row >
    < / results >

    I like to write PLSQL code that will receive these data with XML tags and insert it into the Oracle Table. Is this possible with built-in XML features provided in the Oracle database?

    Please Guide...

    Kind regards
    Priyanka

    But the problem is the file XML is to have the details of the records if you carefully observed the XML file. But by using more high statement select I get output in the following format.
    ORG_ID REQ_LINE PO_NUMBER EXPECTED_REC_QTY USER_NAME REQ_NUMBER
    204204 1444714450 11 64446445 11 OPERATIONSOPERATIONS

    The table has only one row, so you get a single row as output.
    I'm surprised that you find useful examples showing how to divide the data into several lines.

    (1) create the table with the following option, it will optimize the performance of storage and query for large XML documents:

    CREATE TABLE xxios_xml_data_test(xml_data XMLTYPE)
    XMLTYPE COLUMN xml_data STORE AS SECUREFILE BINARY XML
    ;
    

    (2) interview table with:

    SQL> select x.*
      2  from xxios_xml_data_test t
      3     , xmltable(
      4         '/Results/Row'
      5         passing t.xml_data
      6         columns ORG_ID           number       path 'ORG_ID'
      7               , REQ_NUMBER       number       path 'REQ_NUMBER'
      8               , REQ_LINE         number       path 'REQ_LINE'
      9               , PO_NUMBER        number       path 'PO_NUMBER'
     10               , EXPECTED_REC_QTY number       path 'EXPECTED_REC_QTY'
     11               , USER_NAME        varchar2(30) path 'USER_NAME'
     12       ) x
     13  ;
    
        ORG_ID REQ_NUMBER   REQ_LINE  PO_NUMBER EXPECTED_REC_QTY USER_NAME
    ---------- ---------- ---------- ---------- ---------------- ------------------------------
           204      14447          1       6444                1 OPERATIONS
           204      14450          1       6445                1 OPERATIONS
     
    
  • FND_REQUEST. SUBMIT_REQUEST returns request_id, but documents are not inserted into the table AP_INVOICES_ALL

    simultaneous program returns request_id, but the lines are not inserted into the AP_INVOICES_ALL table.

    where can I check for errors? is there any error log written by simultaneous program?

    Please do not post any duplicates- FND_REQUEST. SUBMIT_REQUEST stores the error messages in the table

  • How to jump a line to insert in the staging table

    Hello world

    I'm actually transform data from a source table in the staging table and staged, and then at the final table. I generated a primary key using the sequence. As I put the insert method of the staging table as truncate/insert. So whenever the mapping is loaded, intermediate table is truncated and new data are inserted but as I am with sequence of intermediate table, it will give the new numbering of old data from the source table and it will be duplicated data in the target table. So for this reason I use key look up on top of some attributes of entry and that the use of expression that I try to avoid duplication. At each exit of the attributes in the expression, I'm trying the case statement

    "BOLD" CASE WHEN INGRP1. ROW_ID IS NULL
    THEN
    INGRP1.ID
    END * bold *.

    Because of this condition, I get the error message

    "BOLD"
    Warning
    ORA-01400: cannot insert NULL into ('SCOTT'. "" "" STG_TARGET_TABLE '. "" ROW_ID")
    "BOLD"

    But I'm stuck when the row_id value is zero, that that condition or statement should I write to jump the insertion of data. I want to insert data only when ROW_ID IS NULL.




    Kindly help me.

    Thank you

    Concerning
    Suhail Dayer

    You do not need identical tables to use LESS, only the 'select list' must match. Assuming you have the key of the enterprise (one or more columns that uniquely identifies a row of your data source) in the source and the final table, you can do the following:

    -Use a Set operation where the result is the key to the business of staging table LESS the key to the business of the final table
    -The output of the set operation is then joined to the staging table to get the rest of the attributes for these lines
    -The output of the join is inserted into the final table

    This will ensure that the lines with the new keys to the company are responsible.

    Hope this helps,
    Roald

  • increase the value of minute in 14 minutes, while the data is inserted into the table

    Hello

    I'm having the asp page that connects with the DB to insert values into the table. One column is date data type. Value from this asp page must be incremented to 14 minutes before be inserted into the table.

    How can I do this?
    sqlG="INSERT INTO AEMU " &_
                                                      " (MSISDN,X,Y,TIME_STAMP,REQ_ID, " &_
                                                      "  COUNTRY_G)" &_
                                                      " VALUES " &_
                                                      "('"& msid &"'," &_
                                                      "'" & X & "'," &_
                                                      "' " & Y & " '," &_
                                                      "to_date('" & Day(TrueTimeStamp) & "-" & MonthName(Month(TrueTimeStamp), True) & "-" & Year(TrueTimeStamp) & " " & Hour(TrueTimeStamp) & ":" & Minute(TrueTimeStamp) & ":" & Second(TrueTimeStamp) & "', 'DD-MON-YYYY HH24:MI:SS')," &_
                                                      "' " & req_id & " '," &_
                                                      "'" & CountryName_G & "')"

    Try this way:

    sqlG="INSERT INTO AEMU " &_
         " (MSISDN,X,Y,TIME_STAMP,REQ_ID, " &_
         "  COUNTRY_G)" &_
         " VALUES " &_
         "('"& msid &"'," &_
         "'" & X & "'," &_
         "' " & Y & " '," &_
         "to_date('" & Day(TrueTimeStamp) & "-" & MonthName(Month(TrueTimeStamp), True) & "-" & Year(TrueTimeStamp) & " " & Hour(TrueTimeStamp) & ":" & Minute(TrueTimeStamp) & ":" & Second(TrueTimeStamp) & "', 'DD-MON-YYYY HH24:MI:SS')+14/(24*60)," &_
         "' " & req_id & " '," &_
         "'" & CountryName_G & "')"
    

    Max
    [My Italian blog Oracle | http://oracleitalia.wordpress.com]

Maybe you are looking for

  • Satellite C660-2EM - after recoveryinstalla WLAN is not installed

    Today, I decided to reset my laptop to factoryHe has just completed, but now it dosnt have installed WiFi adapter? Someone knows what to do?

  • Qosmio G30 - 175 virus and the need to recover

    Unfortunately, my husband has downloaded a virus Smart Engine and now my laptop does not work. Sometimes I can get on the internet and Word for example, but sometimes takes several attempts.Slowly, has worsened over the last days even though I though

  • Lenovo Y570 clicking noise

    Just bought this computer around a mountain there and it is a mysterious rattling from my computer (it looks like the click of death's hard drive) but theres nothing wrong with my computer. Is it possible, it could just be the fan? I'll do a disc che

  • Impossible to go online using Internet Explore after installing updates

    Title: I use Windows Vista Home Ed and after installing Windows updates 08/22/2012 (7 in total) I can't access any site on Internet Explorer without using the system restore I use Windows Vista Home Ed and after installing Windows updates 08/22/2012

  • Diagnostic tool memory stops near 40%

    I tied to run my Windows vista memory diagnostic tool and stop about 40%. What's wrong?