Simple CREATE TABLE issue
Hi all,
I'm brand new to SQL, so I'm working my way through Sam's Teach Yourself SQL in 24 hours.
I'm using Microsoft SQL Server Management Studio
12.0.2000.8
I'm in Chapter 3 or the book where we are supposed to create our first table, and I'm having issues.
Here is the statement we're supposed to use:
Create table EMPLOYEE_TBL
emp_id varchar
(9) not null,
emp_name varchar
(40) not null,
emp_st_addr varchar
(20) not null,
emp_city varchar
(15) not null,
emp_st char
(2) not null,
emp_zip integer
(5) not null,
emp_phone integer
(10) null,
emp_pager integer
(10) null
It gives me this error:
Msg 2716, Level 16, State 1, Line 1
Column, parameter, or variable #6: Cannot specify a column width on data type int.
This seems to be saying that I have an INT data type on Line 1 that I'm trying to set a width on, but I don't see that.
What am I doing wrong?
Thanks!
I'm not sure why it's not displaying that statement correctly. It should be:
Create
table EMPLOYEE_TBL
emp_id
varchar (9)
not null,
emp_name
varchar (40)
not null,
emp_st_addr
varchar (20)
not null,
emp_city
varchar (15)
not null,
emp_st
char (2)
not null,
emp_zip
integer (5)
not null,
emp_phone
integer (10)
null,
emp_pager
integer (10)
null
Similar Messages
-
Hi,
I am creating one table from select statment query. The row number order in select query is getting changed after table created. For example 5th records in select query is there in 6th records in newly created table.
Could any one hlp me?
ThanksHi,
849592 wrote:
Hi,
I am creating one table from select statment query. The row number order in select query is getting changed after table created. For example 5th records in select query is there in 6th records in newly created table.
Could any one hlp me?
ThanksSorry, I can't figure out what you're asking.
Whenever you have a question, post a complete test script that the people who want to help you can reun to re-create the problem and test their ideas. Include a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say what version of Oracle you're using.
See the forum FAQ {message:id=9360002}
What do you mean by "The row number in select query"? The order of rows in a query output is determined by its ORDER BY clause. If you don't have an ORDER BY clause, then you can't be sure of the ourder of output. There is no way to make a default order for a table. (You can do this for a view, but it's usually not a very good idea.) -
30EA3 - Edit Table/Create Table(Advanced) - Table Name, Text Box Size
I am not sure if its the same on non-Linux versions, but in the edit table dialog, the table name text box size is tiny. Its only wide enough that you can see approx 7 chars.
Is it possible to increase this? The size of the text box in the simple create table dialog seems like a good size. As far as I can tell, it is not tiny to conserve space for other items.
Anyway, it's just a minor issue that wont prevent me from doing work - just think it'd be better a bit bigger. I am sure it didn't used to be this small.
Ta,
Trentoh interesting.
are you using openJDK?
$ /usr/lib/jvm/java-6-sun-1.6.0.22/bin/java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
Ta,
Trent -
Create table runs in Toad but not in Linux
Hello,
I've just started writing in SQL 3 days ago so I would like to apologize in advance for the shabby code and the stupid question. I'm hoping that somebody can help me with my problem.
Anyway, this has been bugging me for 2 days now and I can't seem to find the problem. The code below is just a simple create table that I coded in Toad for Oracle by Quest Software and runs fine in it but when I try to copy it over to our linux server and run it using '@/home/user/atm_dc.sql', the table is not created.
Can someone help me?
Thanks.
drop table atm_dc;
CREATE TABLE atm_dc
AS (
SELECT
'I' as action_code,
rpad(' ',22,' ') as card_num,
rpad(' ',24,' ') as client_cd,
'000119' as inst_cd,
rpad(sa01mast.brncd,6,' ') as branch_cd,
' ' as vip_flag,
' ' as owner_cd,
'0' as basic_card_flag,
rpad(' ',22,' ') as basic_card_num,
rpad(' ',4,' ') as title,
case when length(cf01cif.sname) > 0 then
rpad(cf01cif.sname,20,' ') else
rpad(' ',20,' ') end as family_name,
rpad(' ',20,' ') as first_name,
rpad(' ',26,' ') as embossed_name,
rpad(' ',26,' ') as encoded_name,
case when length(cf01cif.maritsts) > 0 then
case when cf01cif.maritsts in ('M') then '2' else '1' end else
' ' end as marital_status,
case when length(cf01cif.sex) > 0 then
case when cf01cif.sex in ('F') then 'F' else 'M' end else
' ' end as gender,
rpad(' ',15,' ') as legal_id,
'608' as nationality_code,
'00' as num_of_children,
rpad('0',12,'0') as credit_limit,
'0' as issuers_client,
' ' as lodging_period,
' ' as res_status,
rpad('0',12,'0') as net_yearly_income,
'00' as no_of_dependents,
case when length(cf01cif.birthdt) > 0 then
to_char(cf01cif.birthdt,'YYYYMMDD') else rpad(' ',8,' ')
end as birth_date,
rpad(' ',5,' ') as birth_city,
case when length(cf01cif.cntry) > 0 then
rpad(cf01cif.cntry,3,' ') else rpad(' ',3,' ')
end as birth_cntry,
case when length(cf01addr.addr1) > 0 then
rpad(substr(cf01addr.addr1,1,30),30,' ') else rpad(' ',30,' ')
end as address1,
case when length(cf01addr.addr2) > 0 then
rpad(substr(cf01addr.addr2,1,30),30,' ') else rpad(' ',30,' ')
end as address2,
case when length(cf01addr.addr3) > 0 then
rpad(substr(cf01addr.addr3,1,30),30,' ') else rpad(' ',30,' ')
end as address3,
case when length(cf01addr.addr4) > 0 then
rpad(substr(cf01addr.addr4,1,30),30,' ') else rpad(' ',30,' ')
end as address4,
case when length(cf01addr.city) > 0 then
rpad(substr(cf01addr.city,1,5),5,' ') else rpad(' ',5,' ')
end as city_code,
case when length(cf01addr.postcd) > 0 then
rpad(cf01addr.postcd,10,' ') else rpad(' ',10,' ')
end as zip_code,
case when length(cf01addr.cntry) > 0 then
rpad(cf01addr.cntry,3,' ') else
rpad(' ',3,' ') end as country_code,
rpad(' ',15,' ') as phone_no1,
rpad(' ',15,' ') as phone_no2,
rpad(' ',15,' ') as mobile_phone,
rpad(' ',50,' ') as email_id,
rpad(' ',40,' ') as employer,
rpad(' ',30,' ') as emp_addr1,
rpad(' ',30,' ') as emp_addr2,
rpad(' ',30,' ') as emp_addr3,
rpad(' ',30,' ') as emp_addr4,
rpad(' ',5,' ') as emp_city_cd,
rpad(' ',10,' ') as emp_zip_cd,
rpad(' ',3,' ') as emp_cntry_cd,
rpad(' ',8,' ') as cont_start_dt,
' ' as emp_status,
to_char(sa01mast2.opendt,'YYYYMMDD') as open_dt,
rpad(' ',8,' ') as start_val_dt,
'001' as prod_code,
'0' as delivery_mode,
rpad(sa01mast.brncd||sa01mast.modcd||lpad(sa01mast.acno,6,'0')||
lpad(sa01mast.chkdgt,2,'0'),24,' ') as account1,
'PHP' as acct1_currency,
case when sa01mast.crline in ('SA') then '10' else '20'
end as account1_type,
rpad(' ',12,' ') as limit_cash_dom,
rpad(' ',12,' ') as limit_purch_dom,
rpad(' ',12,' ') as limit_te_dom,
rpad(' ',12,' ') as reserved1,
rpad(' ',12,' ') as limit_cash_int,
rpad(' ',12,' ') as limit_purch_int,
rpad(' ',12,' ') as limit_te_int,
rpad(' ',12,' ') as reserved2,
rpad(' ',12,' ') as autho_limit_dom,
rpad(' ',12,' ') as autho_limit_int,
rpad(' ',12,' ') as reserved3,
rpad(' ',4,' ') as activity_cd,
rpad(' ',4,' ') as socio_prof_code,
'00' status_code,
rpad(' ',10,' ') as staff_id,
'0' as delivery_flag,
rpad(' ',8,' ') as delivery_date,
rpad(' ',14,' ') as bank_dsa_ref,
rpad(' ',50,' ') as ud_field1,
rpad(' ',50,' ') as ud_field2,
rpad(' ',50,' ') as ud_field3,
rpad(' ',50,' ') as ud_field4,
rpad(' ',50,' ') as ud_field5,
rpad(' ',26,' ') as emboss_line3,
rpad(' ',45,' ') as mailing_addr1,
rpad(' ',45,' ') as mailing_addr2,
rpad(' ',45,' ') as mailing_addr3,
rpad(' ',45,' ') as mailing_addr4,
rpad(' ',10,' ') as mailing_zip_code,
rpad(' ',5,' ') as mailing_city_code,
rpad(' ',3,' ') as mailing_country_code,
rpad(' ',15,' ') as phone_home,
rpad(' ',15,' ') as phone_alt,
rpad(' ',15,' ') as phone_mobile,
'0' as photo_indicator,
' ' as language_indicator,
rpad(' ',25,' ') as maiden_name,
rpad('0',8,'0') as check_sum
FROM cf01cif, sa01mast, cf01addr, sa01mast2
WHERE cf01cif.cifkey=sa01mast.cifkey and
cf01cif.cifkey=cf01addr.cifkey and
sa01mast2.brncd = sa01mast.brncd and
sa01mast2.modcd = sa01mast.modcd and
sa01mast2.acno = sa01mast.acno and
sa01mast2.chkdgt = sa01mast.chkdgt and
sa01mast2.opendt < sysdate
);You can use the SPOOL command to create a output file. Run the below script. This will create a file "output.log". Check in the file for any error messages
set echo on
spool output.log
drop table atm_dc
CREATE TABLE atm_dc
AS (
SELECT
'I' as action_code,
rpad(' ',22,' ') as card_num,
rpad(' ',24,' ') as client_cd,
'000119' as inst_cd,
rpad(sa01mast.brncd,6,' ') as branch_cd,
' ' as vip_flag,
' ' as owner_cd,
'0' as basic_card_flag,
rpad(' ',22,' ') as basic_card_num,
rpad(' ',4,' ') as title,
case when length(cf01cif.sname) > 0 then
rpad(cf01cif.sname,20,' ') else
rpad(' ',20,' ') end as family_name,
rpad(' ',20,' ') as first_name,
rpad(' ',26,' ') as embossed_name,
rpad(' ',26,' ') as encoded_name,
case when length(cf01cif.maritsts) > 0 then
case when cf01cif.maritsts in ('M') then '2' else '1' end else
' ' end as marital_status,
case when length(cf01cif.sex) > 0 then
case when cf01cif.sex in ('F') then 'F' else 'M' end else
' ' end as gender,
rpad(' ',15,' ') as legal_id,
'608' as nationality_code,
'00' as num_of_children,
rpad('0',12,'0') as credit_limit,
'0' as issuers_client,
' ' as lodging_period,
' ' as res_status,
rpad('0',12,'0') as net_yearly_income,
'00' as no_of_dependents,
case when length(cf01cif.birthdt) > 0 then
to_char(cf01cif.birthdt,'YYYYMMDD') else rpad(' ',8,' ')
end as birth_date,
rpad(' ',5,' ') as birth_city,
case when length(cf01cif.cntry) > 0 then
rpad(cf01cif.cntry,3,' ') else rpad(' ',3,' ')
end as birth_cntry,
case when length(cf01addr.addr1) > 0 then
rpad(substr(cf01addr.addr1,1,30),30,' ') else rpad(' ',30,' ')
end as address1,
case when length(cf01addr.addr2) > 0 then
rpad(substr(cf01addr.addr2,1,30),30,' ') else rpad(' ',30,' ')
end as address2,
case when length(cf01addr.addr3) > 0 then
rpad(substr(cf01addr.addr3,1,30),30,' ') else rpad(' ',30,' ')
end as address3,
case when length(cf01addr.addr4) > 0 then
rpad(substr(cf01addr.addr4,1,30),30,' ') else rpad(' ',30,' ')
end as address4,
case when length(cf01addr.city) > 0 then
rpad(substr(cf01addr.city,1,5),5,' ') else rpad(' ',5,' ')
end as city_code,
case when length(cf01addr.postcd) > 0 then
rpad(cf01addr.postcd,10,' ') else rpad(' ',10,' ')
end as zip_code,
case when length(cf01addr.cntry) > 0 then
rpad(cf01addr.cntry,3,' ') else
rpad(' ',3,' ') end as country_code,
rpad(' ',15,' ') as phone_no1,
rpad(' ',15,' ') as phone_no2,
rpad(' ',15,' ') as mobile_phone,
rpad(' ',50,' ') as email_id,
rpad(' ',40,' ') as employer,
rpad(' ',30,' ') as emp_addr1,
rpad(' ',30,' ') as emp_addr2,
rpad(' ',30,' ') as emp_addr3,
rpad(' ',30,' ') as emp_addr4,
rpad(' ',5,' ') as emp_city_cd,
rpad(' ',10,' ') as emp_zip_cd,
rpad(' ',3,' ') as emp_cntry_cd,
rpad(' ',8,' ') as cont_start_dt,
' ' as emp_status,
to_char(sa01mast2.opendt,'YYYYMMDD') as open_dt,
rpad(' ',8,' ') as start_val_dt,
'001' as prod_code,
'0' as delivery_mode,
rpad(sa01mast.brncd||sa01mast.modcd||lpad(sa01mast.acno,6,'0')||
lpad(sa01mast.chkdgt,2,'0'),24,' ') as account1,
'PHP' as acct1_currency,
case when sa01mast.crline in ('SA') then '10' else '20'
end as account1_type,
rpad(' ',12,' ') as limit_cash_dom,
rpad(' ',12,' ') as limit_purch_dom,
rpad(' ',12,' ') as limit_te_dom,
rpad(' ',12,' ') as reserved1,
rpad(' ',12,' ') as limit_cash_int,
rpad(' ',12,' ') as limit_purch_int,
rpad(' ',12,' ') as limit_te_int,
rpad(' ',12,' ') as reserved2,
rpad(' ',12,' ') as autho_limit_dom,
rpad(' ',12,' ') as autho_limit_int,
rpad(' ',12,' ') as reserved3,
rpad(' ',4,' ') as activity_cd,
rpad(' ',4,' ') as socio_prof_code,
'00' status_code,
rpad(' ',10,' ') as staff_id,
'0' as delivery_flag,
rpad(' ',8,' ') as delivery_date,
rpad(' ',14,' ') as bank_dsa_ref,
rpad(' ',50,' ') as ud_field1,
rpad(' ',50,' ') as ud_field2,
rpad(' ',50,' ') as ud_field3,
rpad(' ',50,' ') as ud_field4,
rpad(' ',50,' ') as ud_field5,
rpad(' ',26,' ') as emboss_line3,
rpad(' ',45,' ') as mailing_addr1,
rpad(' ',45,' ') as mailing_addr2,
rpad(' ',45,' ') as mailing_addr3,
rpad(' ',45,' ') as mailing_addr4,
rpad(' ',10,' ') as mailing_zip_code,
rpad(' ',5,' ') as mailing_city_code,
rpad(' ',3,' ') as mailing_country_code,
rpad(' ',15,' ') as phone_home,
rpad(' ',15,' ') as phone_alt,
rpad(' ',15,' ') as phone_mobile,
'0' as photo_indicator,
' ' as language_indicator,
rpad(' ',25,' ') as maiden_name,
rpad('0',8,'0') as check_sum
FROM cf01cif, sa01mast, cf01addr, sa01mast2
WHERE cf01cif.cifkey=sa01mast.cifkey and
cf01cif.cifkey=cf01addr.cifkey and
sa01mast2.brncd = sa01mast.brncd and
sa01mast2.modcd = sa01mast.modcd and
sa01mast2.acno = sa01mast.acno and
sa01mast2.chkdgt = sa01mast.chkdgt and
sa01mast2.opendt < sysdate
spool off -
Performance issue Create table as select BLOB
Hi!
I have a performance issue when moving BLOB´s between tables. (The size of images files are from 2MB to 10MB).
I'm using follwing statement for example,
"Create table tmp_blob as select * from table_blob
where blob_id = 333;"
Is there any hints that I can give when moving data like this or is Oracle10g better with BLOB's?Did you find a resolution to this issue?
We are also having the same issue and wondering if there is a faster mechanism to copy LOBs between two table. -
CREATE TABLE AS - PERFORMANCE ISSUE
Hi All,
I am creating a table CONTROLDATA from existing tables PF_CONTROLDATA & ICDSV2_AutoCodeDetails as per the below query.
CREATE TABLE CONTROLDATA AS
SELECT CONTROLVALUEID, VALUEORDER, CONTEXTID, AUDITORDER, INVALIDATINGREVISIONNUMBER, CONTROLID, STRVALUE
FROM PF_CONTROLDATA CD1
JOIN ICDSV2_AutoCodeDetails AC ON (CD1.CONTROLID=AC.MODTERM_CONTROL OR CD1.CONTROLID=AC.FAILED_CTRL OR CD1.CONTROLID=AC.CODE_CTRL)
AND CD1.AUDITORDER=(SELECT MAX(AUDITORDER) FROM PF_CONTROLDATA CD2 WHERE CD1.CONTEXTID=CD2.CONTEXTID);The above statement is taking around 10mins of time to create the table CONTROLDATA which is not acceptible in our environment. Can any one please suggest is there any way to improve the performance of the above query to create the table CONTROLDATA under a minute?
PF_CONTROLDATA has 1,50,00,000 (15million) rows and has composite index(XIF16PF_CONTROLDATA) on CONTEXTID, AUDITORDER columns and one more index(XIE1PF_CONTROLDATA) on CONTROLID column.
ICDSV2_AutoCodeDetails has only 6 rows and no indexes.
After the create table statement CONTROLDATA will have around 10,00,000 (1million) records.
Can some one give any suggestion to improve the performance of the above query?
oracle version is : 10.2.0.3
Tkprof output is:
create table CONTROLDATA2 as
SELECT CONTROLVALUEID, VALUEORDER, CONTEXTID, AUDITORDER, INVALIDATINGREVISIONNUMBER, CONTROLID, DATATYPE, NUMVALUE, FLOATVALUE, STRVALUE, PFDATETIME, MONTH, DAY, YEAR, HOUR, MINUTE, SECOND, UNITID, NORMALIZEDVALUE, NORMALIZEDUNITID, PARENTCONTROLVALUEID, PARENTVALUEORDER
FROM PF_CONTROLDATA CD1
JOIN ICDSV2_AutoCodeDetails AC ON (CD1.CONTROLID=AC.MODTERM_CONTROL OR CD1.CONTROLID=AC.FAILED_CTRL OR CD1.CONTROLID=AC.CODE_CTRL OR CD1.CONTROLID=AC.SYNONYM_CTRL)
AND AUDITORDER=(SELECT MAX(AUDITORDER) FROM PF_CONTROLDATA CD2 WHERE CD1.CONTEXTID=CD2.CONTEXTID)
call count cpu elapsed disk query current rows
Parse 1 0.00 0.03 2 2 0 0
Execute 1 15.25 593.43 211688 4990786 6617 1095856
Fetch 0 0.00 0.00 0 0 0 0
total 2 15.25 593.47 211690 4990788 6617 1095856
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 40
********************************************************************************Explain plan output is:
Plan hash value: 2771048406
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | CREATE TABLE STATEMENT | | 1 | 105 | 3609K (1)| 14:02:20 |
| 1 | LOAD AS SELECT | CONTROLDATA2 | | | | |
|* 2 | FILTER | | | | | |
| 3 | TABLE ACCESS BY INDEX ROWID | PF_CONTROLDATA | 178K| 9228K| 55344 (1)| 00:12:55 |
| 4 | NESTED LOOPS | | 891K| 89M| 55344 (1)| 00:12:55 |
| 5 | TABLE ACCESS FULL | ICDSV2_AUTOCODEDETAILS | 5 | 260 | 4 (0)| 00:00:01 |
| 6 | BITMAP CONVERSION TO ROWIDS | | | | | |
| 7 | BITMAP OR | | | | | |
| 8 | BITMAP CONVERSION FROM ROWIDS| | | | | |
|* 9 | INDEX RANGE SCAN | XIE1PF_CONTROLDATA | | | 48 (3)| 00:00:01 |
| 10 | BITMAP CONVERSION FROM ROWIDS| | | | | |
|* 11 | INDEX RANGE SCAN | XIE1PF_CONTROLDATA | | | 48 (3)| 00:00:01 |
| 12 | BITMAP CONVERSION FROM ROWIDS| | | | | |
|* 13 | INDEX RANGE SCAN | XIE1PF_CONTROLDATA | | | 48 (3)| 00:00:01 |
| 14 | BITMAP CONVERSION FROM ROWIDS| | | | | |
|* 15 | INDEX RANGE SCAN | XIE1PF_CONTROLDATA | | | 48 (3)| 00:00:01 |
| 16 | SORT AGGREGATE | | 1 | 16 | | |
| 17 | FIRST ROW | | 1 | 16 | 3 (0)| 00:00:01 |
|* 18 | INDEX RANGE SCAN (MIN/MAX) | XIF16PF_CONTROLDATA | 1 | 16 | 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter("AUDITORDER"= (SELECT MAX("AUDITORDER") FROM "PF_CONTROLDATA" "CD2" WHERE
"CD2"."CONTEXTID"=:B1))
9 - access("CD1"."CONTROLID"="AC"."MODTERM_CONTROL")
11 - access("CD1"."CONTROLID"="AC"."FAILED_CTRL")
13 - access("CD1"."CONTROLID"="AC"."CODE_CTRL")
15 - access("CD1"."CONTROLID"="AC"."SYNONYM_CTRL")
18 - access("CD2"."CONTEXTID"=:B1)
Note
- dynamic sampling used for this statement
********************************************************************************I tried to change the above logic even by using insert statement and APPEND hint, but still taking the same time.
Please suggest.
Edited by: 867546 on Jun 22, 2011 2:42 PMHi user2361373
i tried using nologging also but still it is taking same amout of time. Please find below the tkprof output.
create table CONTROLDATA2 NOLOGGING as
SELECT CONTROLVALUEID, VALUEORDER, CONTEXTID, AUDITORDER, INVALIDATINGREVISIONNUMBER, CONTROLID, DATATYPE, NUMVALUE, FLOATVALUE, STRVALUE, PFDATETIME, MONTH, DAY, YEAR, HOUR, MINUTE, SECOND, UNITID, NORMALIZEDVALUE, NORMALIZEDUNITID, PARENTCONTROLVALUEID, PARENTVALUEORDER
FROM PF_CONTROLDATA CD1
JOIN ICDSV2_AutoCodeDetails AC ON (CD1.CONTROLID=AC.MODTERM_CONTROL OR CD1.CONTROLID=AC.FAILED_CTRL OR CD1.CONTROLID=AC.CODE_CTRL OR CD1.CONTROLID=AC.SYNONYM_CTRL)
AND AUDITORDER=(SELECT MAX(AUDITORDER) FROM PF_CONTROLDATA CD2 WHERE CD1.CONTEXTID=CD2.CONTEXTID)
call count cpu elapsed disk query current rows
Parse 1 0.03 0.03 2 2 0 0
Execute 1 13.98 598.54 211963 4990776 6271 1095856
Fetch 0 0.00 0.00 0 0 0 0
total 2 14.01 598.57 211965 4990778 6271 1095856
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 40
********************************************************************************Edited by: 867546 on Jun 22, 2011 3:09 PM
Edited by: 867546 on Jun 22, 2011 3:10 PM -
Primary Key Issue With Creating Tables
Hi,
I have the following scripts to create my two tables in oracle 10g, i was wondering wether or not i had correctly set up my primary key or if there is a better way of doing it than the way i have.
Here are my two scripts for my tables:
CREATE TABLE CUSTOMER (
fname varchar2(15) NOT NULL,
lname varchar2(20) NOT NULL,
age varchar2(3) NOT NULL,
custAreaCode number(5) NOT NULL,
custNumber number(6) NOT NULL,
constraint cust_pk PRIMARY KEY (custAreaCode),
constraint cust_pk2 PRIMARY KEY (custNumber),
constraint age_chk CHECK (age >=18 AND age <150)
CREATE TABLE PHONECALL (
startDateTime smalldatetime NOT NULL,
custAreaCode number(5) NOT NULL, ---Reference PK From Customer Table
custNumber number(6) NOT NULL, ---Reference PK From Customer Table
dialledAreaCode number(5) NOT NULL,
dialledNumber number(6) NOT NULL,
crgPerMinute number number (3,1) NOT NULL,
endDateTime smalldatetime NOT NULL));
I am not sure if i have referenced the primary keys correctly in the PHONECALL table.
Thanks in advance :)Hi,
You want like this below ? I think that smalltime data type is not a valid type. Other thing, this is not a rule, but I advice you to put the primary key columns as the first columns of your table. One question: There is no PK on the phonecall table ?
SGMS@ORACLE10> create table customer (
2 custareacode number(5) not null,
3 custnumber number(6) not null,
4 fname varchar2(15) not null,
5 lname varchar2(20) not null,
6 age varchar2(3) not null,
7 constraint cust_pk primary key (custareacode),
8 constraint cust_uk unique (custnumber),
9 constraint age_chk check (age >=18 and age <150)
10 );
Table created.
SGMS@ORACLE10> create table phonecall (
2 custareacode number(5) not null constraint fk_phone_cusarecode_customer references customer,
3 custnumber number(6) not null constraint fk_phone_custnumber_customer references customer,
4 startdatetime date not null,
5 dialledareacode number(5) not null,
6 diallednumber number(6) not null,
7 crgperminute number (3,1) not null,
8 enddatetime date not null);
Table created.
SGMS@ORACLE10> select table_name,constraint_name,constraint_type from user_constraints
2 where table_name in ('CUSTOMER','PHONECALL') and constraint_type in ('P','U','R');
TABLE_NAME CONSTRAINT_NAME C
CUSTOMER CUST_PK P
CUSTOMER CUST_UK U
PHONECALL FK_PHONE_CUSARECODE_CUSTOMER R
PHONECALL FK_PHONE_CUSTNUMBER_CUSTOMER RCheers -
[Solved]SIMPLE Question ON "CREATE TABLE as SELECT".
Hi there,
I was wondering how to work it out smartly and briefly.
For example, I already have a "tableA" as following.
tableA
id name
1 name1
2 name2
create table tmp as
select id, name from tableA;
It will create the tmp table successfully.
If I want to add a new column 'tel' in tmp table,
I can run as following.
create table tmp as
select id, name, 999 tel, 'aaaaaaaaa' ps from tableA;
It will add 'tel NUMBER' column and 'ps char(9)' in tableA.
If I want to add 'col varchar(50)' in tableA,
I do not want to make a string which contains 50 characters in Select command.
How can I make it work in a smart way?
Thanks.
Phil
Message was edited by:
user615355Is there a reason that you need this to be in a single statement? You would normally be better served here with a separate CREATE TABLE and INSERT (possibly as a direct path operation).
That said, you could use the CAST operator, i.e.
SCOTT @ jcave102 Local> create table a as select cast('a' as varchar2(50)) col1 from dual;
Table created.
Elapsed: 00:00:00.48
SCOTT @ jcave102 Local> desc a;
Name Null? Type
COL1 VARCHAR2(50)
SCOTT @ jcave102 Local> Justin -
Create table select option Issue
I have created a copy of an exisitng table in the database as -
create table test1_temp as select * from test1 where 1=2;
The table was created w/o data.
But the problem is that the indexes and primary key of table "test1" are not copied to "test1_temp".
Since the table ddl is copied dynamically, I want to copy the indexes and primary keys also dynamically. How should I achieve this.
Pls help.Thanks.user10525117 wrote:
Thanks for your suggestions.
Actually there are 2 problems - 1) the sql needs to be run automatically using a script.Hence no manual intervention is possible. In that case have your script that search for the table_name and replace with new table_name (sed in unix)
2) the customer has adviced this approach of creating the table.
In that case you have to explain to your customer that creation of index is not possible in CTAS.
Based on these facts, pls suggest.
Thanks.I hope you are creating temporary tables, and would be dropping that tables later. If that is the case (ie. you do not mind the tablespace in which index is created). In this case you can have your pl/sql that runs dynamic sql to create the index fetching the data from user_constraints table.
Regards
Anurag -
SQL Developer 1.5.1 - warning messages generated by CREATE TABLE
Hi,
Have an issue with a CREATE TABLE statement - it works correctly, but generates a warning message when used in SQL Developer (1.2 or 1.5.1). Full test case below:
Setup:
drop table samplenames;
drop table customers;
drop table phones;
drop table customers_phone;
drop sequence primkey;
create table samplenames
(name VARCHAR2(10));
insert into samplenames values ('dan');
insert into samplenames values ('joe');
insert into samplenames values ('bob');
insert into samplenames values ('sam');
insert into samplenames values ('weslington');
insert into samplenames values ('sue');
insert into samplenames values ('ann');
insert into samplenames values ('mary');
insert into samplenames values ('pam');
insert into samplenames values ('lucy');
create sequence primkey
start with 1000000
increment by 1;
create table customers as
select primkey.nextval as cust_id,
tmp1.name || tmp2.name as first_name,
tmp3.name || tmp4.name || tmp5.name as last_name
from samplenames tmp1,
samplenames tmp2,
samplenames tmp3,
samplenames tmp4,
samplenames tmp5;
CREATE TABLE PHONES AS
SELECT cust_id, 'H' as phn_loc, trunc(dbms_random.value(100,999)) as area_cde,
trunc(dbms_random.value(1000000,9999999)) as phn_num
FROM customers;
INSERT INTO PHONES
SELECT cust_id, 'B' as phn_loc, trunc(dbms_random.value(100,999)) as area_cde,
trunc(dbms_random.value(1000000,9999999)) as phn_num
FROM customers;
--randomly delete ~10% of records to make sure nulls are handled correctly.
delete from phones
where MOD(area_cde + phn_num, 10) = 0;
create table statement (there are legacy reasons for why this is written the way it is):
CREATE TABLE customers_phone NOLOGGING AS
SELECT cst.*,
piv.HOME_PHONE,
piv.WORK_PHONE
FROM (SELECT cust_id,
MAX(decode(phn_loc, 'H', '(' || area_cde || ') ' ||
substr(phn_num,1,3) || '-' || substr(phn_num,4,4), NULL)) AS HOME_PHONE,
MAX(decode(phn_loc, 'B', '(' || area_cde || ') ' ||
substr(phn_num,1,3) || '-' || substr(phn_num,4,4), NULL)) AS WORK_PHONE
FROM phones phn
WHERE phn_loc IN ('H', 'B')
AND cust_id IS NOT NULL
AND EXISTS (SELECT NULL
FROM customers
WHERE cust_id = phn.cust_id)
GROUP BY cust_id) piv,
customers cst
WHERE cst.cust_id = piv.cust_id (+)
Warning message output:
"Error starting at line 1 in command:
CREATE TABLE customers_phone NOLOGGING AS
SELECT cst.*,
piv.HOME_PHONE,
piv.WORK_PHONE
FROM (SELECT cust_id,
MAX(decode(phn_loc, 'H', '(' || area_cde || ') ' || substr(phn_num,1,3) || '-' || substr(phn_num,4,4), NULL)) AS HOME_PHONE,
MAX(decode(phn_loc, 'B', '(' || area_cde || ') ' || substr(phn_num,1,3) || '-' || substr(phn_num,4,4), NULL)) AS WORK_PHONE
FROM phones phn
WHERE phn_loc IN ('H', 'B')
AND cust_id IS NOT NULL
AND EXISTS (SELECT NULL
FROM customers
WHERE cust_id = phn.cust_id)
GROUP BY cust_id) piv,
customers cst
WHERE cst.cust_id = piv.cust_id (+)
Error report:
SQL Command: CREATE TABLE
Failed: Warning: execution completed with warning"
I am on 10.2.0.3. The CREATE TABLE always completes successfully, but the warning bugs me, and I have had no success tracking it down since there is no associated numberr.
Anyone have any ideas?Hi ,
The Oracle JDBC driver is returning this warning so I will be logging an issue with them, but for the moment SQL Developer will continue to report the warning as is.
The reason for the warning is not clear or documented as far as I can tell,
but I have replicated the issue with a simpler testcase which makes it easier to have a guess about the issue :)
----START
DROP TABLE sourcetable ;
CREATE TABLE sourcetable(col1 char);
INSERT INTO sourcetable VALUES('M');
DROP TABLE customers_phone;
CREATE TABLE customers_phone AS
SELECT MAX(decode(col1, 'm','OK' , NULL)) COLALIAS
FROM sourcetable;
----END
The warning occurs in the above script in SQL Developer , but not in SQL*Plus.
The warning disappears when we change 'm' to 'M'.
The warning disappears when we change NULL to 'OK2'
In all cases the table creates successfully and the appropriate values inserted.
My gut feeling is ...
During the definition of customers_phone, Oracle has to work out what the COLALIAS datatype is.
When it sees NULL as the only alternative (as sourcetable.col1 = 'M' not 'm') it throws up a warning. It then has to rely on the 'OK' value to define the COLALIAS datatype, even though the 'OK' value wont be inserted as sourcetable.col1 = 'M' and not 'm'. So Oracle makes the correct decision to define the COLALIAS as VARCHAR2(2), but the warning is just to say it had to use the alternative value to define the column.
Why SQL*Plus does not report it and JDBC does, I'm not sure. Either way it doesn't look like a real issue.
Again, this is just a guess and not a fact.
Just though an update was in order.
Regards,
Dermot. -
Help! 10g logical standby not replicating "create table" on standby
Hi,
I'm setting up a logical standby environment and everything works, except when I tried to create a simple table on the primary, the table doesn't show up on the standby. I tried creating a new tablespace on the primary and it shows up right away on the standby. I checked the error logs on both primary and standby and no errors.
create table test1 (id number(10) primary key, col1 varchar(20), col2 varchar(20));
The table is created successfully on primary and I also inserted couple of rows and all committed.
I even tried the following query on the standby to check any failed events and the "create table" DDL doesn't show up , even if it failed:
select event_time, status, event from dba_logstdby_events order by event_timestamp, commit_scn
So I'm now confused. The logical standby is active and applying. What would be the issue? How do I find out ?
Thankshad you started apply using this syntax
real time apply
alter database start logical standby apply immediate;
check lag:
alter session set nls_date_format='dd/mm hh24:mi';
select newest_time || chr(22)|| newest_scn||chr(10)||applied_time||chr(22)||applied_scn||chr(13)||chr(16)||(newest_scn-applied_scn) lag from dba_logstdby_progress
/ -
Hi Experts,
I have created a page in Apex where I m using File browse item say :p13_filebrowse(where i m using CSV format files) and other items too. On click of Submit button I m calling package which dynamically creates the table successfully of browsed CSV FIle.
Now My requirement is to create the dbms_scheduler Job for the existing package(AS Above) so that If I upload the very huge file it should run in backend using the DBMS Job.If I call package directly from the APex . it is happening successfully. But If i create the Job for that package then I m getting error for not identify the Apex file browsed items.
In Package I m using wwv_flow_files from where i m extracting the file and creating the table.Through Job it is unable to recognise the Apex file browse item.For more information please go through the follwing code:-
I m calling package from Apex which is succesfully executing in creaitng the table:-
htmldb_sid_50.parse_file(:P13_FILEBROWSE,'P13_COLLECTION' ,'P13_HEADINGS','P13_COLUMNS','P13_DDL');
htmldb_sid_50.parse_file(:P13_FILEBROWSE,'P13_COLLECTION' ,'P13_HEADINGS','P13_COLUMNS','P13_DDL','gdqdata.gdq_table1');
Foollwing code of Package:-
create or replace PACKAGE BODY htmldb_sid_50
AS
TYPE varchar2_t IS TABLE OF VARCHAR2(32767) INDEX BY binary_integer;
-- Private functions --{{{
PROCEDURE delete_collection ( --{{{
-- Delete the collection if it exists
p_collection_name IN VARCHAR2
IS
BEGIN
IF (htmldb_collection.collection_exists(p_collection_name))
THEN
htmldb_collection.delete_collection(p_collection_name);
END IF;
END delete_collection; --}}}
PROCEDURE csv_to_array ( --{{{
-- Utility to take a CSV string, parse it into a PL/SQL table
-- Note that it takes care of some elements optionally enclosed
-- by double-quotes.
p_csv_string IN VARCHAR2,
p_array OUT wwv_flow_global.vc_arr2,
p_num IN VARCHAR2 DEFAULT null,
p_separator IN VARCHAR2 := ','
IS
l_start_separator PLS_INTEGER := 0;
l_stop_separator PLS_INTEGER := 0;
l_length PLS_INTEGER := 0;
l_idx BINARY_INTEGER := 0;
l_new_idx BINARY_INTEGER := 0;
l_quote_enclosed BOOLEAN := FALSE;
l_offset PLS_INTEGER := 1;
p_csv_string_test varchar2(4000);
cell_value varchar2(400);
BEGIN
l_length := NVL(LENGTH(p_csv_string),0);
IF (l_length <= 0)
THEN
RETURN;
END IF;
LOOP
l_idx := l_idx + 1;
l_quote_enclosed := FALSE;
-- p_csv_string
p_csv_string_test := replace(p_csv_string,'""','@@');
--p_csv_string := p_csv_string_test;
IF SUBSTR(p_csv_string_test, l_start_separator + 1, 1) = '"'
THEN
l_quote_enclosed := TRUE;
l_offset := 2;
l_stop_separator := INSTR(p_csv_string_test, '"', l_start_separator + l_offset, 1);
ELSE
l_offset := 1;
l_stop_separator := INSTR(p_csv_string_test, p_separator, l_start_separator + l_offset, 1);
END IF;
IF l_stop_separator = 0
THEN
l_stop_separator := l_length + 1;
END IF;
if l_idx = 1 then
p_array(l_idx) := p_num;
l_idx := l_idx + 1;
end if;
if(l_idx < 50) then
cell_value := (SUBSTR(p_csv_string_test, l_start_separator + l_offset,(l_stop_separator - l_start_separator - l_offset)));
cell_value := replace(cell_value, '@@', '"');
p_array(l_idx) := cell_value;
end if;
EXIT WHEN l_stop_separator >= l_length;
IF l_quote_enclosed
THEN
l_stop_separator := l_stop_separator + 1;
END IF;
l_start_separator := l_stop_separator;
END LOOP;
END csv_to_array; --}}}
PROCEDURE get_records(p_blob IN blob,p_records OUT varchar2_t) --{{{
IS
l_record_separator VARCHAR2(2) := chr(13)||chr(10);
l_last INTEGER;
l_current INTEGER;
BEGIN
-- Sigh, stupid DOS/Unix newline stuff. If HTMLDB has generated the file,
-- it will be a Unix text file. If user has manually created the file, it
-- will have DOS newlines.
-- If the file has a DOS newline (cr+lf), use that
-- If the file does not have a DOS newline, use a Unix newline (lf)
IF (NVL(dbms_lob.instr(p_blob,utl_raw.cast_to_raw(l_record_separator),1,1),0)=0)
THEN
l_record_separator := chr(10);
END IF;
l_last := 1;
LOOP
l_current := dbms_lob.instr( p_blob, utl_raw.cast_to_raw(l_record_separator), l_last, 1 );
EXIT WHEN (nvl(l_current,0) = 0);
p_records(p_records.count+1) := utl_raw.cast_to_varchar2(dbms_lob.substr(p_blob,l_current-l_last,l_last));
l_last := l_current+length(l_record_separator);
END LOOP;
END get_records; --}}}
-- Utility functions --{{{
PROCEDURE parse_textarea ( --{{{
p_textarea IN VARCHAR2,
p_collection_name IN VARCHAR2
IS
l_index INTEGER;
l_string VARCHAR2(32767) := TRANSLATE(p_textarea,chr(10)||chr(13)||' ,','@@@@');
l_element VARCHAR2(100);
BEGIN
l_string := l_string||'@';
htmldb_collection.create_or_truncate_collection(p_collection_name);
LOOP
l_index := instr(l_string,'@');
EXIT WHEN NVL(l_index,0)=0;
l_element := substr(l_string,1,l_index-1);
IF (trim(l_element) IS NOT NULL)
THEN
htmldb_collection.add_member(p_collection_name,l_element);
END IF;
l_string := substr(l_string,l_index+1);
END LOOP;
END parse_textarea; --}}}
PROCEDURE parse_file( --{{{
p_file_name IN VARCHAR2,
p_collection_name IN VARCHAR2,
p_headings_item IN VARCHAR2,
p_columns_item IN VARCHAR2,
p_ddl_item IN VARCHAR2,
p_table_name IN VARCHAR2 DEFAULT NULL
IS
l_blob blob;
l_records varchar2_t;
l_record wwv_flow_global.vc_arr2;
l_datatypes wwv_flow_global.vc_arr2;
l_headings VARCHAR2(4000);
l_columns VARCHAR2(4000);
l_seq_id NUMBER;
l_num_columns INTEGER;
l_ddl VARCHAR2(4000);
l_keyword varchar2(300);
l_records_count number;
l_count number;
l_filename varchar2(400);
BEGIN
--delete from test_mylog;
-- insert into t_log(slog) values('p_file_name '||p_file_name||'p_collection_name '||p_collection_name||'p_headings_item '||p_headings_item||'p_columns_item '||p_columns_item||'p_ddl_item '||p_ddl_item||'p_table_name '||p_table_name);
-- commit;
insert into testing_job values(p_file_name,p_collection_name,p_headings_item,p_columns_item,p_ddl_item,p_table_name);commit;
IF (p_table_name is not null)
THEN
BEGIN
execute immediate 'drop table '||p_table_name;
EXCEPTION
WHEN OTHERS THEN null;
END;
l_ddl := 'create table '||p_table_name||' '||v(p_ddl_item);
htmldb_util.set_session_state('P13_DEBUG',l_ddl);
execute immediate l_ddl;
l_ddl := 'insert into '||p_table_name||' '||
'select '||v(p_columns_item)||' '||
'from htmldb_collections '||
'where seq_id > 1 and collection_name='''||p_collection_name||'''';
htmldb_util.set_session_state('P13_DEBUG',v('P13_DEBUG')||'/'||l_ddl);
execute immediate l_ddl;
RETURN;
END IF;
BEGIN
/*select blob_content into l_blob from wwv_flow_files
where name=p_file_name;*/
select the_blob into l_blob from t_batch_attachments
where blob_filename=p_file_name;
-- insert into testing_job values (l_blob);commit;
EXCEPTION
WHEN NO_DATA_FOUND THEN
raise_application_error(-20000,'File not found, id='||p_file_name);
END;
get_records(l_blob,l_records);
IF (l_records.count < 2)
THEN
raise_application_error(-20000,'File must have at least 2 ROWS, id='||p_file_name);
END IF;
-- Initialize collection
htmldb_collection.create_or_truncate_collection(p_collection_name);
-- Get column headings and datatypes
csv_to_array(l_records(1),l_record,'sid');
--l_records_count:=l_record.count+1;
--csv_to_array(l_records(l_records_count),l_datatypes);
l_num_columns := l_record.count;
if (l_num_columns > 100) then
raise_application_error(-20000,'Max. of 100 columns allowed, id='||p_file_name);
end if;
-- Get column headings and names
FOR i IN 1..l_record.count
LOOP
l_record(i) := trim(l_record(i));
l_record(i) := replace(l_record(i),' ','_');
l_record(i) := replace(l_record(i),'-','_');
l_record(i) := replace(l_record(i),'(','_');
l_record(i) := replace(l_record(i),')','_');
l_record(i) := replace(l_record(i),':','_');
l_record(i) := replace(l_record(i),';','_');
l_record(i) := replace(l_record(i),'.','_');
l_record(i) := replace(l_record(i),'"','_');
l_headings := l_headings||':'||l_record(i);
l_columns := l_columns||',c'||lpad(i,3,'0');
END LOOP;
l_headings := ltrim(l_headings,':');
l_columns := ltrim(l_columns,',');
htmldb_util.set_session_state(p_headings_item,l_headings);
htmldb_util.set_session_state(p_columns_item,l_columns);
-- Get datatypes
FOR i IN 1..l_record.count
LOOP
l_datatypes(i):='varchar2(400)';
l_ddl := l_ddl||','||l_record(i)||' '||l_datatypes(i);
END LOOP;
l_ddl := '('||ltrim(l_ddl,',')||')';
htmldb_util.set_session_state(p_ddl_item,l_ddl);
-- Save data into specified collection
FOR i IN 1..l_records.count
LOOP
csv_to_array(l_records(i),l_record,i-1);
l_seq_id := htmldb_collection.add_member(p_collection_name,'dummy');
FOR i IN 1..l_record.count
LOOP
htmldb_collection.update_member_attribute(
p_collection_name=> p_collection_name,
p_seq => l_seq_id,
p_attr_number => i,
p_attr_value => l_record(i)
END LOOP;
END LOOP;
-- DELETE FROM wwv_flow_files WHERE name=p_file_name;
END;
BEGIN
NULL;
END;
Now I m stuck in If I call the Package through following Job:-
DBMS_SCHEDULER.create_job (
job_name => 'New_Testing1',
job_type => 'PLSQL_BLOCK',
job_action => 'begin
GDQ.htmldb_sid_50.parse_file ('''||:P13_FILEBROWSE||''',''P13_COLLECTION'',''P13_HEADINGS'',''P13_COLUMNS'',''P13_DDL'');
htmldb_sid_50.parse_file('''||:P13_FILEBROWSE||''',''P13_COLLECTION'' ,''P13_HEADINGS'',''P13_COLUMNS'',''P13_DDL'',''gdqdata.gdq_table1'');
end;
start_date => NULL,
repeat_interval => NULL,
end_date => NULL,
enabled => TRUE,
comments => 'UPLOAD FILE INTO TABLE IN GDQ.'
I believe there is security issue in APex related to wwv_flow_files which is creating the problem . Please can anybody assist me in this issue.
Thanks in Advance
DanalaxmiPlease post the details of the application release, along with the complete error message and the steps you followed to reproduce the issue.
Thanks,
Hussein -
Is there any way to create table inside cell in sapui5??
Hello experts,
How do we create table inside cell in ui5??
something like this::
Market Activities
Other Activities
Header 1
Header 2
Header 1
Header 2
Header 3
Header 1
Header 2
Header 3
Then how do we go about binding??
Thank you,
Best Regards
ChetnaThis code is actually for simple table which i have created:
var dvrData = [
{DealerNo:"",checkedOrd:{checked:false,enabled:false},checkedOrd1:{checked:false,enabled:false},checkedColl: {checked:false,enabled:false},checkedPromos:{checked :false,enabled:false},
var newDvrTable = new sap.ui.table.Table({
id:"newDvrTableId",
visibleRowCount: 1,
selectionMode: sap.ui.table.SelectionMode.Single
//following field comes unser first column (with blank label)
newDvrTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: " Dealer Code", wrapping : true}),
template: new NewTextField({
id:"dlrNum",
value: "{DealerNo}" ,
// following columns come under "MARKET ACTIVITIES"
newDvrTable.addColumn(new sap.ui.table.Column({
name : "SHOP ACTIVITY",
label: new sap.ui.commons.Label({id:"shopId",text: "SHOP",
wrapping : true}),
template: new sap.ui.commons.CheckBox("chkShop",{
enabled: "{checkedOrd/enabled}",
checked:"{checkedOrd/checked}",
newDvrTable.addColumn(new sap.ui.table.Column({
name : "Order Related ACTIVITY",
label: new sap.ui.commons.Label({id:"shopId",text: "ORDER",
wrapping : true}),
template: new sap.ui.commons.CheckBox("chkShop",{
enabled: "{checkedOrd1/enabled}",
checked:"{checkedOrd1/checked}",
//Following two columns must come under Other Activities Column
newDvrTable.addColumn(new sap.ui.table.Column({
name : "CHEQUE COLLECTION",
label: new sap.ui.commons.Label({id:"shopId",text: "COLLECTION",
wrapping : true}),
template: new sap.ui.commons.CheckBox("chkShop",{
enabled: "{checkedColl/enabled}",
checked:"{checkedColl/checked}",
newDvrTable.addColumn(new sap.ui.table.Column({
name : "SCHEME UPDATE",
label: new sap.ui.commons.Label({id:"shopId",text: "SCHEME UPDATE",
wrapping : true}),
template: new sap.ui.commons.CheckBox("chkShop",{
enabled: "{checkedPromos/enabled}",
checked:"{checkedPromos/checked}",
var oModel = new sap.ui.model.json.JSONModel();
oModel.setData(dvrData);
var newdata = oModel.getData();
sap.ui.getCore().setModel(oModel,"newDvr");
newDvrTable.setModel(oModel);
newDvrTable.bindRows("/");
Thank you,
Best Regards,
Chetna -
How to enter a data into the specified column and row in a created table
Hi,
I want to enter some data to specified column and row in a already created table. Please let me know how to do this.
Regards
Shivakumar SinghA table is just a 2D array of strings. Keep it in a shift register and use "replace array element" to modify the desired entry programmatically.
If you want to modify it manually and directly from the front panel, make it into a control and type directly into the desired element. (In this case your program would need to write to it using a local variable).
Atttached is a simple example in LabVIEW 7.0 that shows both possibilities.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
ChangeTableEntries.vi 41 KB -
Source sys Restore "error while creating table EDISEGMENT "
Dear All,
I am Basis person and recently we have refreshed data of Test BI system from Development BI system. we normally carry out these Refresh but In this case we have also changed Hostname and SID for Test BI system.
We have done all BW refresh steps as per guide and during Restore of source system we
are getting errors during datasource activation as " error while creating table EDISEGMENT ".
we have checked RFC and Partner profiles and working fine.
We have 2 clients connected from source system to our Test BI box.strange thing is we got one source system activated without any errors and for second
source system we are getting above mentioned error.
We have reviewed notes 339957 , 493422 but our BI fuctional team is not sure whether
those apply to our OLTP system , as one source system from same OLTP system got
successfully activated and source system for other client giving this issue .
Please help us out with this problem.
we are running on BI 7.0 platform and ECC 6.0 for source.
Regards,
Rrcheck the relevant profiles in We20 t code and also in sm59 if the remote connection with autorisation is sucssessfull, connection is ok otherwise you need to check th paramters.
hope this helps
regards
santosh
Maybe you are looking for
-
I have been sent a 'word document' in which are a series of boxes about thirty lines long to insert written text. When Pages opens the document it extends these to a whole A4 page how do I get it to retain the original layout
-
Hi! I would urgently need an API providing functionality for comparing two xml files and creating a delta (e.g. which elements were deleted in the first file). I was searching the web for hours and could just find applications, but no apis for java.
-
LDB-PNP Variant behavior (Background job ) on INITIALIZATION Event.
Iu2019ve written code on initialization event to pre-select employees based on Employee status (active) and created PNPINDEX. Problem: This program move to prod in June, user created the variant as u201Ccurrent yearu201D and employee status u201CACTI
-
Does SAP Support Adobe Acrobat 8.1.4 ?????
Hello Colleagues, I just want to now which all versions of Adobe SAP supports and in particular if Adobe Acrobat 8.1.4 is supported. Thanks & Regards, Kavitha.
-
How do i upload my pictures to facebook after editing using elements 8?