Modified "Create error table" from CKM SQL problem
Hi guys!
I have a strange problem while creating error table by the CKM. I've changed in the interface from flow control to static control and now the command to create error table looks like:
create table STG_TMP.E$_I_D_ASSORTMENT_S
ERR_TYPE VARCHAR2(1 CHAR) NULL,
ERR_MESS VARCHAR2(250 CHAR) NULL,
CHECK_DATE DATE NULL,
ORIGIN VARCHAR2(100 CHAR) NULL,
CONS_NAME VARCHAR2(35 CHAR) NULL,
CONS_TYPE VARCHAR2(2 CHAR) NULL
the create error table(it should create table with all the columns varchar2 and handle the situation when column is number(0,0) => varchar2(255)) step from CKM is:
<%=snpRef.getColList("<?\t", "int vL[POS]=[LONGC]+[SCALE]; if(\u0022[DEST_DT]\u0022.equals(\u0022DATE\u0022)) {vL[POS]=20;}; if(\u0022[DEST_DT]\u0022.equals(\u0022NUMBER\u0022) && vL[POS]==0) {vL[POS]=255;};", "\n \t", "\n?>", "INS")%>
create table <%=snpRef.getTable("L","ERR_NAME", "W")%>
ERR_TYPE <%=snpRef.getDataType("DEST_VARCHAR", "1", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>,
ERR_MESS <%=snpRef.getDataType("DEST_VARCHAR", "250", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>,
CHECK_DATE <%=snpRef.getDataType("DEST_DATE", "", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>,
<%=snpRef.getColList("", "[COL_NAME]\t varchar2 (<?=vL[POS]?>) " + snpRef.getInfo("DEST_DDL_NULL"), ",\n\t", "", "INS")%>,
ORIGIN <%=snpRef.getDataType("DEST_VARCHAR", "100", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>,
CONS_NAME <%=snpRef.getDataType("DEST_VARCHAR", "35", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>,
CONS_TYPE <%=snpRef.getDataType("DEST_VARCHAR", "2", "")%> <%=snpRef.getInfo("DEST_DDL_NULL")%>
Do you know whats the problem??
Thanks in advance :)
With regards,
PsmakR
What version of ODI are you using ?
Are you still using Sunopsis ?
Try using ODI 10.1.3.5
Also, follow the solution in post
Issue with Create Target Table in CKM Oracle
Similar Messages
-
How do i create a new table from a *.sql file in JSP
<html>
<%@ page language="java" import="java.sql.*" %>
<%@ page errorPage="ExceptionHandler.jsp" %>
<%
Class.forName("com.mysql.jdbc.Driver").newInstance();
String dbUrl = "jdbc:mysql://localhost/test?user=root";
Connection conn = DriverManager.getConnection(dbUrl);
Statement stmt = conn.createStatement();
stmt.executeUpdate("\\. addresses.sql");
%>
how would i create a table from the addresses.sql file?stmt.executeUpdate("\\. addresses.sql");This, of course, will not work.
You might even execute it the same way you do from command line with some Runtime.exec() jugglery but I would suggest you to work with my first suggestion unless someone else came up with something better. -
Create oracle table from sql server
Dear Gurus,
I need to create some tables from sql server 2008 to a oracle 11g database. Some tables contain vbinary datatype. Now my queries are
1. How can I do that?
2. If DB link is a solution then would you please provide me a step by step process to do so?
3. Is there any issue with datatype?
SQL Server db is on windows 2008 R2
Oracle is in RHEL 5.5
Will appreciate ur help.well suppose i generate flat files from sql server and load in oracle by sqlloader then will there be any issue with vbinary datatype? what should be the equivalent data type in oracle table?
-
How to create a table from an existing table with new column
Hi !
Please help me.
I want to create a table from an existing table with data and add two new column to the new table.
What will be the syntax?craete table new_table as select a.*, 'somevalue' new_col1, 'somevalue'
new_col2 from old_table a;Also there is a pitfall - newly created table will accept column type and precision from the select statement, so further you can be needed to modify columns
if you want to have VARCHAR2 instead of CHAR for example:
SQL> create table new_dept as select dept.*, 'New data' new_col from dept;
Table created.
SQL> desc new_dept
Name Null? Type
DEPTNO NUMBER(2)
DNAME VARCHAR2(14)
LOC VARCHAR2(13)
NEW_COL CHAR(8)
SQL> alter table new_dept modify (new_col varchar2(8));
Table altered.
SQL> desc new_dept
Name Null? Type
DEPTNO NUMBER(2)
DNAME VARCHAR2(14)
LOC VARCHAR2(13)
NEW_COL VARCHAR2(8)Rgds.
Didn't see michael's post - it reflects the fix for this problem using CAST.
Message was edited by:
dnikiforov -
Using execute immediate creating a table from another
hi friend i wanted to create a table from a select statement in a pl sql procedure. i am using execute immediate but getting problems with it pls can anyone help me.
here is the query i am using
EXECUTE IMMEDIATE 'CREATE TABLE table_name AS (SELECT * FROM a_view WHERE column_name LIKE '%some_string%');
i need to know if this can be done and if yes how. pls help me its bit urgent too. the schema name is same and the privileges are available to create tables too.Your syntax is wrong.
If you would use a syntax higlighted editor, it would show.
Yout try to execute a string where another string is embedded. Please use two times single quote or use the 'q' function:
This one is correct:
EXECUTE IMMEDIATE 'CREATE TABLE table_name AS (SELECT * FROM a_view WHERE column_name LIKE ''%some_string%'')';
or this one:
EXECUTE IMMEDIATE q'|CREATE TABLE table_name AS (SELECT * FROM a_view WHERE column_name LIKE '%some_string%')|';
good luck -
Copy table from Ms SQL Server 2005 to Oracle with SSIS package
Hi all
I am witting an SSIS package to copy 2 tables from Ms SQL Server 2005 to an Oracle 10g database.
Problem: I can only see the Microsoft OLDB Provider for Oracle and it is too slow. How can I use the Oracle ODBC in aMs SQL Server 2005 or building a .net SSIS package.
thanksYes I am able to see the driver on the Data Source (ODBC), I also created a connection to the Oracle database. The problem in Ms SQL Server 2005 is that the ODBC connection I created is not listed. None of the lo local connections are listed, only Microsoft OLEDB connections
-
How create temporary table from list of values
Can you anybody advise me how can I create temporary table from list of values? I have list of values and need create temporary table for next use with command JOIN etc.
Thank you for helpNO, you can not create temporary table in oracle on the fly ( Like #Tabels in SQl Server or Sybase ) , you will have to use the GTT i.e Global Temporary Tables
check the following link GTT :
to flush the tables after commit
CREATE GLOBAL TEMPORARY TABLE my_temp_table (
column1 NUMBER,
column2 NUMBER
) ON COMMIT DELETE ROWS;In contrast, the ON COMMIT PRESERVE ROWS clause indicates that rows should be preserved until the end of the session.
so to keep rows in Table after commit
CREATE GLOBAL TEMPORARY TABLE my_temp_table (
column1 NUMBER,
column2 NUMBER
) ON COMMIT PRESERVE ROWS; -
I am trying to create a table from the results of a query. With other products, I could issue the following SQL statement to achieve my goal but this doesn't work with Oracle.
select MyTable.* into NewTable from MyTable where MAPID < 1000
What am I missing?Try this way :
create table NewTable as
select * from MyTable where MAPID < 1000; -
Migrate tables from Ms SQL Server 20005 to Oracle 10g
Hi all,
I am trying to migrate 10 table from Ms SQL Server 2005 to Oracle 10g. I started creating a SSIS package to transfer them but it always fail when it tries to create the tables.
Questions:
- Is there any other way to import Ms SQL Server 2005 tables to Oracle
- also I need to create a scirp that will update these tables periodically
any ideas?
ThanksYingKuan is right. jsut to expound a little further. This will also allow you to have have scripts which you can run again and again or even schedule them regularly too.
B -
Create one tables from 2 different tables
Hi,
How I can create one table from 2 different tables. Source tables have data and I want to include it in new table.
I try this:
create table NEW_ONE
select * from OLD_ONE
union
select * from OLD_ONE2;
But it didn't work correctly :/I don't have any error. This syntax create table NEW_ONE, but this table have columns only from OLD_ONE table :/ There aren't any column from OLD_ONE2 :/ Any suggestions?
I don't forget about "as" in my query, only in this post.
Edited by: tutus on Sep 8, 2008 6:36 AM -
Create a table from another table
I have Windows XP with 10g 10.2.0.1.0
I need to create a table from another table to re-arrange the table column order and add the following statement at the end of creation.
PCTFREE 10 PCTUSED 0 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
TABLESPACE "TAB_DATA"
Below iis my SQL statement, but it doesn't work. Please help.
create table my_table as (select t1, t5, t2, t3, t4 from orig_table
PCTFREE 10 PCTUSED 0 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
TABLESPACE "TAB_DATA"
*);*Kee Kee wrote:
I have Windows XP with 10g 10.2.0.1.0
I need to create a table from another table to re-arrange the table column order Why? Column order has no meaning. The individual SELECT statement specifies the column order that particular statement wants, which may be different from the needs of some other SELECT statement.
and add the following statement at the end of creation.
PCTFREE 10 PCTUSED 0 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
TABLESPACE "TAB_DATA"
Below iis my SQL statement, but it doesn't work. Please help.
create table my_table as (select t1, t5, t2, t3, t4 from orig_table
PCTFREE 10 PCTUSED 0 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
TABLESPACE "TAB_DATA" -
How to Create adf table from java bean
Hi,
How to Create adf table from java class (Not from ADF BC).
Thanks
Satya@vlsn -- you have to follow what shay said.
Do the following in Model layer ::
create a table property java class with your columns setters and getters like :
*public class gridProps {*
private int sno;
private String orderNum;
*public void setSno(int sno) {*
this.sno = sno;
*public int getSno() {*
return sno;
*public void setOrderNum(String orderNum) {*
this.orderNum = orderNum;
*public String getOrderNum() {*
return orderNum;
Create another table java class which will populate the values to your column values and return the collection :
*public class gridPopulate {*
private List<gridProps> gridValues ;
*public List<gridProps> setToGrid(ArrayList<ArrayList> valuesToSet) {*
*if (valuesToSet == null) {*
return gridValues;
gridValues = new ArrayList<gridProps>();
if(btnValue.equals("completeBtn"))
return gridValues;
for(ArrayList<String> tempArr:valuesToSet)
gridProps gp = new gridProps();
gp.setSno(Integer.valueOf(tempArr.get(0)));
gp.setOrderNum(tempArr.get(1));
return gridValues;
Right click gridPopulate class and create this as data control.This class will be seen in Data control list.Under this data control,Drag the grid property collection(created earlier) to your page.Then execute your binding(gridPopulate) according to your logic.
Thanks.(My jdev version 11.1.1.5.0) -
Hi,
are there any tools to create oracle tables from dtd'sNone to my knowledge. DTD's don't provide any data type information or length information on the data, so at best such a tool could create you tons of VARCHAR2(4000) columns.
-
Create temp table in PL/SQL
How to create temp table in PL/SQL procedure/function?
In SQL plus, I can create a table using
create table <table name>
on commit reserve ..If you're referring to temp table similar as the temp table of informix .. the answer is you cannot create a temp table in oracle than will automatically be cleaned by oracle session.
However its possible to create a remporary table but this will be a permanent part of your schema.. and you'll be the one responsible for dropping this table.
regards,
Victor ([email protected])
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Mike Chan:
How to create temp table in PL/SQL procedure/function?
In SQL plus, I can create a table using
create table <table name>
on commit reserve ..
<HR></BLOCKQUOTE>
null -
Creating temporary table in pl/sql block problem
hello
i have a problem in creating and using temporary table in pl/sql block
please verify below block
begin
execute immediate 'create global temporary table alitemp1 (co_t varchar2(10),color varchar2(10))';
insert into alitemp1 (co_t,color) values ('001','red');
execute immediate 'DROP TABLE alitemp1';
end;
when i execute that block i will receive this error
insert into alitemp1 (co_t,color) values ('001','red');
ERROR at line 3:
ORA-06550: line 3, column 14:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 3, column 2:
PL/SQL: SQL Statement ignored
i think it because that alitemp1 table don't create
but two below block run fine
begin
execute immediate 'create global temporary table alitemp1 (co_t varchar2(10),color varchar2(10))';
execute immediate 'DROP TABLE alitemp1';
end;
begin
execute immediate 'create global temporary table alitemp1 (co_t varchar2(10),color varchar2(10))';
end;
select table_name from user_tables where table_name='ALITEMP1';
TABLE_NAME
ALITEMP1
it means that problem is when the below line exists in block
insert into alitemp1 (co_t,color) values ('001','red');
if may please guide meIn addition to the comments by Justin and 3360, you cannot do what you want the way you are doing it.
All objects referred to in a PL/SQL block must exist at the time the block is compiled. In your case, since it is an anonomous block, that is run time. Since you are dynamically creating the temporary table you need to refer to it dynamically as well. More like:
BEGIN
EXECUTE IMMEDIATE 'create global temporary table alitemp1 (co_t varchar2(10),
color varchar2(10))';
EXECUTE IMMEDIATE 'insert into alitemp1 (co_t,color) values (:b1,:b2)' USING '001', 'red';
EXECUTE IMMEDIATE 'DROP TABLE alitemp1';
END;However, don't do that it is a really bad idea. Just create the temporary table, if you really need it, once and use it in your processing.
In most cases, things that SQL Server needs temporary tables for can be done easily in Oracle with a single SQL statement,
John
Maybe you are looking for
-
Go to a Website no longer disappears when cursor in blank field
Normal windows standards dictate that an empty field show blank when a cursor is put in it. However, starting with FF15, the Go to a Website verbiage does not disappear. Is there a config to make this go away? Confusing, because your never sure quick
-
Problem with opening cs4 document in cs5.5
I have quite a big document of a catalog, created in InDesign cs4. It contains many layers and different master pages. When I open this document in cs5.5 layers and master pages get completely confused and the document looks completely different. Whe
-
How do I run Disk Utility in Tiger?
I want to run Disk Utility and it says I need to run it from a start-up disk, but it won't let me from the installer disk. How do I make a start-up disk so I can run Disk Utility?
-
Youtube video not working in powerpoint
i put a youtube video in a powerpoint. Got message i needed the flashplayer. hit websupport and it says successful installed. When I try to view the video, I still get the same message.
-
Issue certview exam history result
Hi i got an issue to view my score report in certview... Issue is i had taken my 1Z0-238 (Oracle EBS R12: Install, Patch and Maintain Oracle Applications) exam with personvue.. from a few days in cert view Exam History in Grade Indicator it says REVO