Help with Constraint
Dear gurus,
I am trying to perform the following check:
Assume you have the tables below:
WRK_HR
WRKHR_ID (PK)
WRKUNIT_ID (FK)
PAYPERIOD_ID
WRK_UNIT
WRKUNIT_ID (PK)
PAYRULE_ID (FK)
PAYRULE
PAYRULE_ID (PK)
PAYRULE_CODE (FK)
PAYPERIOD
PAYPERIOD_ID (PK)
PAYRULE_CODE
STARTDATE
ENDDATE
A Work Unit (WRK_UNIT) has one Pay Rule (PAYRULE) and a Pay Rule has several Pay periods (PAYPERIOD).
When inserting a new Work Hour (WRK_HR) I have to check to see if the chosen pay period (PAYPERIOD_ID) is valid for the chosen Work unit (WRKUNIT_ID).
These are sample tables to simplify and keep in mind that I cannot modify any of these tables. I have to work with what I have.
Is there a way to perform this check with a constraint?
Thanks so much!
So your constraint requirement can be specified using an SQL Assertion as follows:
create assertion amazongirl as check
(not exists
(select 'a tuple in this join'
from WRK_HOUR h
,WRK_UNIT u
,PAY_RULE r
,PAY_PERIOD p
where h.wrkunit_id = u.workunit_id
and u.payrule_id = r.payrule_id
and h.payperiod_id = p.payperiod_id
and r.payrule_code != p.payrule_code)
);Unfortunately Oracle doesn't support ASSERTIONS, nor do any other vendors, to my knowledge....
So you'd have to write triggers for this, or embed constraint validation code around the INSERT's.
(Note that theoretically you require triggers on all four involved tables to fully implement this constraint.)
Similar Messages
-
Help with constraints on object relational tables
Hi
I am looking to create an object relational database with a check constraint on the relationships. For example:
* I have table called person_tab which is a table of person_t type.
* Person_t type is inherited by the manager_t type and the applicant_t type.
* I have a second table called interview_tab of interview_t type.
* The interview table has two columns (manager and appilcant) that are scope restrained to the person table.
* I would also like to put check constraints on these columns to say:
----- Manager: check the person_number is less than 20000
----- Applicant: check the person_number is greater than 19999
Can anyone tell me if this is possible and if so how can it be done?
Thanks in advance
StephenYou have circular dependencies (manager_t depends upon interview_list_t depends upon interview_t depends upon manager_t) which I don't think is a good idea. But then that's probably just my old-fashioned relational head baulking at this new-fangled OO way of looking at data models. However, my experience with using types and subtypes in Oracle does teach me that this is a complete pain in the neck, because it makes changing your Type definitions a very awkward process.
am I right in saying I cannot use the check constraint?I think so. If the value range for ID is a property of being a Manager or an Applicant then properly that should be enforced by those types not by the Interview type. Then all that Interviews needs to worry about is that it gets instantiated with attributes of the correct Type.
I've simplified your model a bit. To start with I'm going to create a single PERSONS table to store both managers and applicants...
SQL> CREATE TYPE person_t AS OBJECT (
2 personno NUMBER,
3 surname VARCHAR2(30),
4 forename VARCHAR2(30),
5 dob DATE
6 ) NOT FINAL;
7 /
Type created.
SQL>
SQL> CREATE OR REPLACE TYPE applicant_t UNDER person_t
2 (qualifications varchar2(200))
3 FINAL ;
4 /
Type created.
SQL>
SQL> CREATE OR REPLACE TYPE manager_t UNDER person_t
2 (extension varchar2(5)) FINAL;
3 /
Type created.
SQL>
SQL> CREATE OR REPLACE TYPE interview_t AS OBJECT (
2 interviewno NUMBER,
3 idate DATE,
4 itime NUMBER,
5 interest NUMBER,
6 is_made_by REF manager_t,
7 attended_by REF applicant_t
8 ) ;
9 /
Type created.
SQL>
SQL>
SQL> CREATE TABLE persons OF person_t
2 /
Table created.
SQL> CREATE TABLE interviews OF interview_t
2 /
Table created.
SQL> Okay let's create some objects...
SQL> declare
2 mgr manager_t := manager_t(1,'RUNCITER', 'GLEN', sysdate - (42*365), 'x1234');
3 app applicant_t := applicant_t(2, 'CHIP', 'JOE', sysdate - (38*365), 'BSc, MSc');
4 intv interview_t;
5 m_ref REF person_t;
6 a_ref REF person_t;
7 begin
8 INSERT INTO persons p VALUES mgr
9 RETURNING REF(p) INTO m_ref ;
10 INSERT INTO persons p VALUES app
11 RETURNING REF(p) INTO a_ref ;
12 insert into interviews
13 values (interview_t(1001, sysdate, 45, 5, TREAT(m_ref AS REF manager_t)
, TREAT(a_ref AS REF applicant_t)));
14 end;
15 /
PL/SQL procedure successfully completed.
SQL> SELECT i.interviewno, i.is_made_by.surname, i.attended_by.surname
2 FROM interviews i
3 /
INTERVIEWNO IS_MADE_BY.SURNAME ATTENDED_BY.SURNAME
1001 RUNCITER CHIP
SQL> Have we got integrity?
SQL> rollback
2 /
Rollback complete.
SQL>
SQL> declare
2 mgr manager_t := manager_t(1,'RUNCITER', 'GLEN', sysdate - (42*365), 'x1234');
3 app applicant_t := applicant_t(2, 'CHIP', 'JOE', sysdate - (38*365), 'BSc, MSc');
4 intv interview_t;
5 m_ref REF person_t;
6 a_ref REF person_t;
7 begin
8 INSERT INTO persons p VALUES mgr
9 RETURNING REF(p) INTO m_ref ;
10 INSERT INTO persons p VALUES app
11 RETURNING REF(p) INTO a_ref ;
12 insert into interviews
13 values (interview_t(1001, sysdate, 45, 5, TREAT(a_ref AS REF manager_t)
, TREAT(m_ref AS REF applicant_t)));
14 end;
15 /
PL/SQL procedure successfully completed.
SQL>
SQL> SELECT i.interviewno, i.is_made_by.surname, i.attended_by.surname
2 FROM interviews i
3 /
INTERVIEWNO IS_MADE_BY.SURNAME ATTENDED_BY.SURNAME
1001
SQL> Kind of, but it's not very satisfactory. Let's use separate tables for MANAGERS and APPLICANTS...
SQL> rollback
2 /
Rollback complete.
SQL>
SQL> CREATE TABLE managers OF manager_t
2 /
Table created.
SQL>
SQL> CREATE TABLE applicants OF applicant_t
2 /
Table created.
SQL> declare
2 mgr manager_t := manager_t(1,'RUNCITER', 'GLEN', sysdate - (42*365), 'x1234');
3 app applicant_t := applicant_t(2, 'CHIP', 'JOE', sysdate - (38*365), 'BSc, MSc');
4 intv interview_t;
5 m_ref REF manager_t;
6 a_ref REF applicant_t;
7 begin
8 INSERT INTO managers m VALUES mgr
9 RETURNING REF(m) INTO m_ref ;
10 INSERT INTO applicants a VALUES app
11 RETURNING REF(a) INTO a_ref ;
12 insert into interviews values (interview_t(1001, sysdate, 45, 5, m_ref, a_ref));
13
14 end;
15 /
PL/SQL procedure successfully completed.
SQL>
SQL> SELECT i.interviewno, i.is_made_by.surname, i.attended_by.surname
2 FROM interviews i
3 /
INTERVIEWNO IS_MADE_BY.SURNAME ATTENDED_BY.SURNAME
1001 RUNCITER CHIP
SQL> rollback
2 /
Rollback complete.
SQL> declare
2 mgr manager_t := manager_t(1,'RUNCITER', 'GLEN', sysdate - (42*365), 'x1234');
3 app applicant_t := applicant_t(2, 'CHIP', 'JOE', sysdate - (38*365), 'BSc, MSc');
4 intv interview_t;
5 m_ref REF manager_t;
6 a_ref REF applicant_t;
7 begin
8 INSERT INTO managers m VALUES mgr
9 RETURNING REF(m) INTO m_ref ;
10 INSERT INTO applicants a VALUES app
11 RETURNING REF(a) INTO a_ref ;
12 insert into interviews values (interview_t(1001, sysdate, 45, 5, a_ref, m_ref));
13
14 end;
15 /
insert into interviews values (interview_t(1001, sysdate, 45, 5, a_ref, m_ref));
ERROR at line 12:
ORA-06550: line 12, column 69:
PL/SQL: ORA-00932: inconsistent datatypes: expected REF APC.APPLICANT_T got REF
APC.MANAGER_T
ORA-06550: line 12, column 4:
PL/SQL: SQL Statement ignored
SQL>I hope that's useful to you.
Cheers, APC
Layout of SQL*Plus session tweaked for readability
Message was edited by:
APC -
[8i] Need help with some workday calculations
At the beginning of the month, I got help with a workday calculation in: [8i] Help with function with parameters (for workday calculation)
Now, as it turns out, I was able to locate a function in the database that does what I want, however, it is much slower to use the function than to join two copies of the CALN table (Please see referenced thread for details. I can copy them to this thread if necessary.) I need to verify that the pre-existing function has 'DETERMINISTIC' in it, as I would guess that if it doesn't, it would be much slower than it could be.
But now, I've come across a situation where I have to do multiple workday calculations in the same query--enough that I have to join 6 copies of my CALN table. I can't imagine that is at all efficient. I believe it was Frank K. who said (in the original thread) that if the function was slow, I should consider alternatives. Can anyone help me identify some of those alternatives? I'm definitely at that point now. (This query is one I'm using as the base for a report in Oracle BI, and let's just say it doesn't like my query, even though my syntax appears to be correct, and I would guess that joining 6 copies of one table is at least partly to blame for this).
Note: I'm working with Oracle 8iOK, I finally have some sample data... I tried to make it thorough. I've included data in the CALN table YTD + tomorrow, so that any workday calculations using SYSDATE will work.
CREATE TABLE caln
( clndr_dt DATE NOT NULL
, clndr_yr NUMBER
, shop_day NUMBER
, shop_dt DATE
, shop_wk NUMBER
, shop_yr NUMBER
, shop_days NUMBER
, clndr_days NUMBER
CONSTRAINT caln_pk PRIMARY KEY (clndr_dt)
INSERT INTO caln
VALUES (To_Date('12/23/2009','mm/dd/yyyy'),2009,247,To_Date('12/23/2009','mm/dd/yyyy'),51,2009,7631,10950);
INSERT INTO caln
VALUES (To_Date('01/01/2010','mm/dd/yyyy'),2010,0,To_Date('12/23/2009','mm/dd/yyyy'),52,2009,7631,10959);
INSERT INTO caln
VALUES (To_Date('01/02/2010','mm/dd/yyyy'),2010,0,To_Date('12/23/2009','mm/dd/yyyy'),52,2009,7631,10960);
INSERT INTO caln
VALUES (To_Date('01/03/2010','mm/dd/yyyy'),2010,0,To_Date('12/23/2009','mm/dd/yyyy'),1,2010,7631,10961);
INSERT INTO caln
VALUES (To_Date('01/04/2010','mm/dd/yyyy'),2010,1,To_Date('01/04/2010','mm/dd/yyyy'),1,2010,7632,10962);
INSERT INTO caln
VALUES (To_Date('01/05/2010','mm/dd/yyyy'),2010,2,To_Date('01/05/2010','mm/dd/yyyy'),1,2010,7633,10963);
INSERT INTO caln
VALUES (To_Date('01/06/2010','mm/dd/yyyy'),2010,3,To_Date('01/06/2010','mm/dd/yyyy'),1,2010,7634,10964);
INSERT INTO caln
VALUES (To_Date('01/07/2010','mm/dd/yyyy'),2010,4,To_Date('01/07/2010','mm/dd/yyyy'),1,2010,7635,10965);
INSERT INTO caln
VALUES (To_Date('01/08/2010','mm/dd/yyyy'),2010,5,To_Date('01/08/2010','mm/dd/yyyy'),1,2010,7636,10966);
INSERT INTO caln
VALUES (To_Date('01/09/2010','mm/dd/yyyy'),2010,0,To_Date('01/08/2010','mm/dd/yyyy'),1,2010,7636,10967);
INSERT INTO caln
VALUES (To_Date('01/10/2010','mm/dd/yyyy'),2010,0,To_Date('01/08/2010','mm/dd/yyyy'),2,2010,7636,10968);
INSERT INTO caln
VALUES (To_Date('01/11/2010','mm/dd/yyyy'),2010,6,To_Date('01/11/2010','mm/dd/yyyy'),2,2010,7637,10969);
INSERT INTO caln
VALUES (To_Date('01/12/2010','mm/dd/yyyy'),2010,7,To_Date('01/12/2010','mm/dd/yyyy'),2,2010,7638,10970);
INSERT INTO caln
VALUES (To_Date('01/13/2010','mm/dd/yyyy'),2010,8,To_Date('01/13/2010','mm/dd/yyyy'),2,2010,7639,10971);
INSERT INTO caln
VALUES (To_Date('01/14/2010','mm/dd/yyyy'),2010,9,To_Date('01/14/2010','mm/dd/yyyy'),2,2010,7640,10972);
INSERT INTO caln
VALUES (To_Date('01/15/2010','mm/dd/yyyy'),2010,10,To_Date('01/15/2010','mm/dd/yyyy'),2,2010,7641,10973);
INSERT INTO caln
VALUES (To_Date('01/16/2010','mm/dd/yyyy'),2010,0,To_Date('01/15/2010','mm/dd/yyyy'),2,2010,7641,10974);
INSERT INTO caln
VALUES (To_Date('01/17/2010','mm/dd/yyyy'),2010,0,To_Date('01/15/2010','mm/dd/yyyy'),3,2010,7641,10975);
INSERT INTO caln
VALUES (To_Date('01/18/2010','mm/dd/yyyy'),2010,11,To_Date('01/18/2010','mm/dd/yyyy'),3,2010,7642,10976);
INSERT INTO caln
VALUES (To_Date('01/19/2010','mm/dd/yyyy'),2010,12,To_Date('01/19/2010','mm/dd/yyyy'),3,2010,7643,10977);
INSERT INTO caln
VALUES (To_Date('01/20/2010','mm/dd/yyyy'),2010,13,To_Date('01/20/2010','mm/dd/yyyy'),3,2010,7644,10978);
INSERT INTO caln
VALUES (To_Date('01/21/2010','mm/dd/yyyy'),2010,14,To_Date('01/21/2010','mm/dd/yyyy'),3,2010,7645,10979);
INSERT INTO caln
VALUES (To_Date('01/22/2010','mm/dd/yyyy'),2010,15,To_Date('01/22/2010','mm/dd/yyyy'),3,2010,7646,10980);
INSERT INTO caln
VALUES (To_Date('01/23/2010','mm/dd/yyyy'),2010,0,To_Date('01/22/2010','mm/dd/yyyy'),3,2010,7646,10981);
INSERT INTO caln
VALUES (To_Date('01/24/2010','mm/dd/yyyy'),2010,0,To_Date('01/22/2010','mm/dd/yyyy'),4,2010,7646,10982);
INSERT INTO caln
VALUES (To_Date('01/25/2010','mm/dd/yyyy'),2010,16,To_Date('01/25/2010','mm/dd/yyyy'),4,2010,7647,10983);
INSERT INTO caln
VALUES (To_Date('01/26/2010','mm/dd/yyyy'),2010,17,To_Date('01/26/2010','mm/dd/yyyy'),4,2010,7648,10984);
INSERT INTO caln
VALUES (To_Date('01/27/2010','mm/dd/yyyy'),2010,18,To_Date('01/27/2010','mm/dd/yyyy'),4,2010,7649,10985);
INSERT INTO caln
VALUES (To_Date('01/28/2010','mm/dd/yyyy'),2010,19,To_Date('01/28/2010','mm/dd/yyyy'),4,2010,7650,10986);
INSERT INTO caln
VALUES (To_Date('01/29/2010','mm/dd/yyyy'),2010,20,To_Date('01/29/2010','mm/dd/yyyy'),4,2010,7651,10987);
INSERT INTO caln
VALUES (To_Date('01/30/2010','mm/dd/yyyy'),2010,0,To_Date('01/29/2010','mm/dd/yyyy'),4,2010,7651,10988);
INSERT INTO caln
VALUES (To_Date('01/31/2010','mm/dd/yyyy'),2010,0,To_Date('01/29/2010','mm/dd/yyyy'),5,2010,7651,10989);
INSERT INTO caln
VALUES (To_Date('02/01/2010','mm/dd/yyyy'),2010,21,To_Date('02/01/2010','mm/dd/yyyy'),5,2010,7652,10990);
INSERT INTO caln
VALUES (To_Date('02/02/2010','mm/dd/yyyy'),2010,22,To_Date('02/02/2010','mm/dd/yyyy'),5,2010,7653,10991);
INSERT INTO caln
VALUES (To_Date('02/03/2010','mm/dd/yyyy'),2010,23,To_Date('02/03/2010','mm/dd/yyyy'),5,2010,7654,10992);
INSERT INTO caln
VALUES (To_Date('02/04/2010','mm/dd/yyyy'),2010,24,To_Date('02/04/2010','mm/dd/yyyy'),5,2010,7655,10993);
INSERT INTO caln
VALUES (To_Date('02/05/2010','mm/dd/yyyy'),2010,25,To_Date('02/05/2010','mm/dd/yyyy'),5,2010,7656,10994);
INSERT INTO caln
VALUES (To_Date('02/06/2010','mm/dd/yyyy'),2010,0,To_Date('02/05/2010','mm/dd/yyyy'),5,2010,7656,10995);
INSERT INTO caln
VALUES (To_Date('02/07/2010','mm/dd/yyyy'),2010,0,To_Date('02/05/2010','mm/dd/yyyy'),6,2010,7656,10996);
INSERT INTO caln
VALUES (To_Date('02/08/2010','mm/dd/yyyy'),2010,26,To_Date('02/08/2010','mm/dd/yyyy'),6,2010,7657,10997);
INSERT INTO caln
VALUES (To_Date('02/09/2010','mm/dd/yyyy'),2010,27,To_Date('02/09/2010','mm/dd/yyyy'),6,2010,7658,10998);
INSERT INTO caln
VALUES (To_Date('02/10/2010','mm/dd/yyyy'),2010,28,To_Date('02/10/2010','mm/dd/yyyy'),6,2010,7659,10999);
INSERT INTO caln
VALUES (To_Date('02/11/2010','mm/dd/yyyy'),2010,29,To_Date('02/11/2010','mm/dd/yyyy'),6,2010,7660,11000);
INSERT INTO caln
VALUES (To_Date('02/12/2010','mm/dd/yyyy'),2010,30,To_Date('02/12/2010','mm/dd/yyyy'),6,2010,7661,11001);
INSERT INTO caln
VALUES (To_Date('02/13/2010','mm/dd/yyyy'),2010,0,To_Date('02/12/2010','mm/dd/yyyy'),6,2010,7661,11002);
INSERT INTO caln
VALUES (To_Date('02/14/2010','mm/dd/yyyy'),2010,0,To_Date('02/12/2010','mm/dd/yyyy'),7,2010,7661,11003);
INSERT INTO caln
VALUES (To_Date('02/15/2010','mm/dd/yyyy'),2010,31,To_Date('02/15/2010','mm/dd/yyyy'),7,2010,7662,11004);
INSERT INTO caln
VALUES (To_Date('02/16/2010','mm/dd/yyyy'),2010,32,To_Date('02/16/2010','mm/dd/yyyy'),7,2010,7663,11005);
INSERT INTO caln
VALUES (To_Date('02/17/2010','mm/dd/yyyy'),2010,33,To_Date('02/17/2010','mm/dd/yyyy'),7,2010,7664,11006);
INSERT INTO caln
VALUES (To_Date('02/18/2010','mm/dd/yyyy'),2010,34,To_Date('02/18/2010','mm/dd/yyyy'),7,2010,7665,11007);
INSERT INTO caln
VALUES (To_Date('02/19/2010','mm/dd/yyyy'),2010,35,To_Date('02/19/2010','mm/dd/yyyy'),7,2010,7666,11008);
INSERT INTO caln
VALUES (To_Date('02/20/2010','mm/dd/yyyy'),2010,0,To_Date('02/19/2010','mm/dd/yyyy'),7,2010,7666,11009);
CREATE TABLE ords
( ord_nbr NUMBER NOT NULL
, sub_nbr NUMBER NOT NULL
, ord_stat VARCHAR2(2)
, ord_qty NUMBER
, part_nbr VARCHAR2(5)
CONSTRAINT ords_pk PRIMARY KEY (ord_nbr, sub_nbr)
INSERT INTO ords
VALUES (1,1,'CL',10,'PART1');
INSERT INTO ords
VALUES (1,2,'CL',5,'PART1');
INSERT INTO ords
VALUES (25,1,'CL',15,'PART2');
INSERT INTO ords
VALUES (14,1,'OP',12,'PART3');
INSERT INTO ords
VALUES (33,1,'CL',25,'PART1');
INSERT INTO ords
VALUES (33,2,'CL',15,'PART1');
INSERT INTO ords
VALUES (33,3,'OP',10,'PART1');
INSERT INTO ords
VALUES (7,1,'PL',18,'PART2');
INSERT INTO ords
VALUES (96,1,'PL',10,'PART3');
INSERT INTO ords
VALUES (31,1,'CL',20,'PART2');
CREATE TABLE oops
( ord_nbr NUMBER NOT NULL
, sub_nbr NUMBER NOT NULL
, op_nbr VARCHAR2(4) NOT NULL
, mach_id VARCHAR2(4)
, oper_stat VARCHAR2(2)
, plan_start_dt DATE
, plsu NUMBER
, plrn NUMBER
CONSTRAINT ords_pk PRIMARY KEY (ord_nbr, sub_nbr, op_nbr)
-- NOTE:
-- for the orders with a status of 'CL' or 'PL' in the 'ords' table, I'm not bothering to put
-- in more than two operations (though in reality more would be there) since they should be
-- ignored in the final result anyway
INSERT INTO oops
VALUES (1,1,'0010','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.2);
INSERT INTO oops
VALUES (1,1,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.15);
INSERT INTO oops
VALUES (1,2,'0010','123A','CP',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.2);
INSERT INTO oops
VALUES (1,2,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.15);
INSERT INTO oops
VALUES (25,1,'0005','123A','CP',TO_DATE('01/18/2010','mm/dd/yyyy'),2,0.25);
INSERT INTO oops
VALUES (25,1,'0030','110C','CL',TO_DATE('01/19/2010','mm/dd/yyyy'),4,0.1);
INSERT INTO oops
VALUES (14,1,'0010','127A','CP',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.25);
INSERT INTO oops
VALUES (14,1,'0025','110C','CL',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
INSERT INTO oops
VALUES (14,1,'0040','050C','CP',TO_DATE('01/13/2010','mm/dd/yyyy'),1.3,0.15);
INSERT INTO oops
VALUES (14,1,'0050','220B','WK',TO_DATE('01/14/2010','mm/dd/yyyy'),4,0.25);
INSERT INTO oops
VALUES (14,1,'0065','242B','AV',TO_DATE('01/18/2010','mm/dd/yyyy'),1.5,0.1);
INSERT INTO oops
VALUES (14,1,'0067','150G','NA',TO_DATE('01/19/2010','mm/dd/yyyy'),2,0.1);
INSERT INTO oops
VALUES (14,1,'0100','250G','NA',TO_DATE('01/20/2010','mm/dd/yyyy'),2.1,0.2);
INSERT INTO oops
VALUES (33,1,'0010','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),1.9,0.2);
INSERT INTO oops
VALUES (33,1,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
INSERT INTO oops
VALUES (33,2,'0010','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),1.9,0.2);
INSERT INTO oops
VALUES (33,2,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
INSERT INTO oops
VALUES (33,3,'0010','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),1.9,0.2);
INSERT INTO oops
VALUES (33,3,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
INSERT INTO oops
VALUES (33,3,'0020','220B','NA',TO_DATE('01/12/2010','mm/dd/yyyy'),1.7,0.15);
INSERT INTO oops
VALUES (33,3,'0030','150G','NA',TO_DATE('01/13/2010','mm/dd/yyyy'),1.3,0.05);
INSERT INTO oops
VALUES (33,3,'0055','150G','NA',TO_DATE('01/15/2010','mm/dd/yyyy'),2.1.,0.1);
INSERT INTO oops
VALUES (7,1,'0005','123A','NA',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.2);
INSERT INTO oops
VALUES (7,1,'0030','110C','NA',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.15);
INSERT INTO oops
VALUES (96,1,'0010','127A','NA',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.25);
INSERT INTO oops
VALUES (96,1,'0025','110C','NA',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
INSERT INTO oops
VALUES (31,1,'0005','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),1.9,0.2);
INSERT INTO oops
VALUES (31,1,'0030','110C','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
CREATE TABLE mach
( mach_id VARCHAR2(4) NOT NULL
, desc_short VARCHAR2(9)
, group VARCHAR2(7)
CONSTRAINT ords_pk PRIMARY KEY (mach_id)
INSERT INTO mach
VALUES ('123A','desc here','GROUPH1');
INSERT INTO mach
VALUES ('259B','desc here','GROUPH2');
INSERT INTO mach
VALUES ('110C','desc here','GROUPJ1');
INSERT INTO mach
VALUES ('050C','desc here','GROUPK2');
INSERT INTO mach
VALUES ('220B','desc here','GROUPH2');
INSERT INTO mach
VALUES ('242B','desc here','GROUPH2');
INSERT INTO mach
VALUES ('150G','desc here','GROUPL1');
INSERT INTO mach
VALUES ('250G','desc here','GROUPL2');
INSERT INTO mach
VALUES ('242B','desc here','GROUPH2'); -
Loading millions of rows using SQL*loader to a table with constraints
I have a table with constraints and I need to load millions of rows in it using SQL*Loader.
What is the best way to do this, means what SQL*Loader options to use, for getting the best loading performance and how to deal with constraints?
Regards- check if your table has check constraints (like column not null)
if you trust the data in the file you have to load you can disable this constrainst and after the loader enable this constrainst.
- Check if you can modify the table and place it in nologging mode (generate less redo but ONLY is SOME Conditions)
Hope it helps
Rui Madaleno -
Help with: java.sql.SQLIntegrityConstraintViolationException
Hi, guys
I need help with the following exception: java.sql.SQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL090403155751200' defined on 'BOOK_ORDER'.
the things is my primary key is unique, so i checked the indexes and i found that i have two 'SQL090403155751200' indexes.
I would like to know:
1. can i delete the index without causing further database problems
2. what causes this problem and how can i avoid it.
By the way im using netbeans 6.5 and derby databaserizza_99 wrote:
I would like to know:
1. can i delete the index without causing further database problems
2. what causes this problem and how can i avoid it.
By understanding what the application/system is supposed to be doing and the correctly creating indexes on the database that reflect the business needs.
Once you do that then the nature of the indexes that are needed are obvious.
You certainly don't delete indexes without that understanding however. -
Newbie - help with homework.
Create a procedure to insert a record into the Bill_Items table. All the fields in the Bill_Items table will be specified as para with the exception of the Selling_Price, which will be the Current_Price, retrieved from the Menu_Items table. Do not allow the insert to finish unless there are enough of all ingredients on hand. If the insert is successfull, the quantity field in the Ingredient table will need to be updated accordingly.
Tables are below.
Thanks,
CREATE TABLE Bill_Items
Bill_Number NUMBER(6,0)
CONSTRAINT FK_Bill_Items_Bill_Number REFERENCES Bills(Bill_Number)
CONSTRAINT NN_Bill_Items_Bill_Number NOT NULL,
Menu_Item_Number NUMBER(5,0)
CONSTRAINT FK_Menu_Item_Num REFERENCES Menu_Items(Menu_Item_Number)
CONSTRAINT NN_Bill_Items_Menu_Item_Num NOT NULL,
Discount NUMBER(5,2)
CONSTRAINT N_Bill_Items_Discount NULL,
Quantity NUMBER(3,0) DEFAULT 1
CONSTRAINT Bills_Items_Quanity_CC CHECK(Quantity > 0)
CONSTRAINT NN_Bill_Items_Quantity NOT NULL,
Selling_Price NUMBER(6,2) DEFAULT 0
CONSTRAINT Bills_Items_SellingPrice_CC CHECK(Selling_Price >= 0)
CONSTRAINT NN_Bill_Items_Selling_Price NOT NULL,
CONSTRAINT PK_Bill_Items PRIMARY KEY(Bill_Number,Menu_Item_Number)
CREATE TABLE Menu_Item_Ingredients
Menu_Item_Number NUMBER(5,0)
CONSTRAINT FK_Menu_Item_Ing_Menu_Item_Num REFERENCES Menu_Items(Menu_Item_Number)
CONSTRAINT NN_Menu_Item_Ing_Meun_Item_Num NOT NULL,
Ingredient_Number NUMBER(5,0)
CONSTRAINT FK_Menu_Item_Ing_IngredientNo REFERENCES Ingredients(Ingredient_Number)
CONSTRAINT NN_Menu_Item_Ing_IngredientNo NOT NULL,
Quantity NUMBER(5,2) DEFAULT 1
CONSTRAINT Menu_Item_Ing_Quanity_CC CHECK(Quantity > 0)
CONSTRAINT NN_Menu_Item_Ing_Quanity NOT NULL,
Constraint PK_Menu_Item_Ing PRIMARY KEY(Menu_Item_Number, Ingredient_Number)
CREATE TABLE Ingredients
Ingredient_Number Number(5,0)
CONSTRAINT PK_Ingredients_IngredientNo PRIMARY KEY
CONSTRAINT NN_Ingredients_IngredientNo NOT NULL,
Ingredient_Name VarChar2(35)
CONSTRAINT NN_Ingredients_Ingredient_Name NOT NULL,
Portion_Code CHAR(2)
CONSTRAINT FK_Ingredients_PortionCode REFERENCES Portions(Portion_Code)
CONSTRAINT NN_Ingredients_PortionCode NOT NULL
REFERENCES Portions(Portion_Code),
On_Hand NUMBER(6,2) DEFAULT 1
CONSTRAINT Ingredients_OnHand_CC CHECK(On_Hand > 0)
CONSTRAINT NN_Ingredients_On_Hand NOT NULL,
Reorder_Point NUMBER(6,2) DEFAULT 1
CONSTRAINT Ingredients_Reorder_Point CHECK(Reorder_Point > 0)
CONSTRAINT NN_Ingredients_Reorder_Point NOT NULL,
Current_Cost NUMBER(5,2) DEFAULT 0
CONSTRAINT Ingredients_CurrentCost_CC CHECK(Current_Cost >= 0)
CONSTRAINT NN_Ingredients_Current_Cost NOT NULL
CREATE TABLE Menu_Items
Menu_Item_Number NUMBER(5,0)
CONSTRAINT PK_Menu_Items_MenuItemsNo PRIMARY KEY
CONSTRAINT NN_Menu_Items_MenuItemsNo NOT NULL,
Menu_Item_Name VARCHAR2(50)
CONSTRAINT NN_Menu_Items_Menu_Item_Name NOT NULL,
Current_Price NUMBER(6,2) DEFAULT 0
CONSTRAINT Menu_Items_CurrentPrice CHECK(Current_Price >=0)
CONSTRAINT NN_Menu_Items_Current_Price NOT NULL,
Production_Cost NUMBER(6,2) DEFAULT 0
CONSTRAINT Menu_Items_ProdCost CHECK(Production_Cost >=0)
CONSTRAINT NN_Menu_Items_Production_Cost NOT NULL
);Newbie to oracle - help with homework.. Letting others do your work is called cheating, where I live.
C. -
Please help with Berkeley DB, desperate student here
I am a student and I have to complete a project within a week. Problem is, I never used Berkeley DB. What I am supposed to do is this...
Basically, in the Berkeley DB, I need to implement a replication scheme for distributed real-time databases.
The replication scheme simply allows a database which needs temporal data from another database to create a local replica of the data needed from the other database, and to receive the data in constant updates for a specified period of time. This scheme is beneficial because it eliminates the transmission delays from asking for the data every time it needs it from the remote datavabase. The recipient database will not need to keep sending a request for the data, it will automatically be sent to the replica in specified time increments, and for a specified period of time depending on what the transaction specifies.
The DB must support transactions. This is ideally meant for real time databases too.
Could you please tell me who could help me implement this? I really need help with this as soon as possible. I don't know where to get started regarding installing the correct DB, starting it up, and putting in sample data. I need a accurate step by step instruction for which DB to install, how to install it, and how to install sample data and how to access the data, and then how to proceed to modify it so that it can support the replication I mentioned above. Everything. I am new to this. ANyone's help would be the best. Thank you.Alan, thanks for chiming in. I am in the process of reading the link you posted. Thank you. At this point, after having installed Berkeley DB 4.5.20, are there some preliminary steps that you can outline for me in terms of setting up a sample database and getting started? Is there a step-by-step somewhere on the site? After I do that, and then study the link you sent, it is my intent to dive into the code and make the adjustments/additions I need to model the algorithm I need to accomplish.
Disregard my time constraint which I mentioned earlier. I simply need to get everything running as a workable DB with data at this point, and then I can dive into the replication material. Let me know, and thanks for your help.
Ron, sorry for the multiple posts. I was initially trying to post in categories which I believed were relevant to my situation. I will stick to this thread. -
Hello everyone this is my first time posting here, i have always find java easy(up to this point), this is my first class in programming java i am just needing help with the "for loops" i cant seem to get the program generate 10 random math questions. if you guys can please help i will appreciate it, i have been working on it for a couple of hours. I am not finished with it yet but thats the only thing i need help with.
import javax.swing.JOptionPane;
public class Lab5
public static void main(String[] args)
int num1 = (int) (Math.random() * 100 + 1);
int num2 = (int) (Math.random() * 100 + 1);
int sum = num1 + num2;
int product = num1 * num2;
int quotient = num1 / num2;
int difference = num1 - num2;
for (int i = 0; i > 11; i++);
int number = (int)(Math.random()*4);
if (number == 0 )
String s1 = JOptionPane.showInputDialog(null, num1 + " + " + num2 + "=" );
if(number == 1)
String s3 = JOptionPane.showInputDialog(null, num1 + " - " + num2 + "=" );
if(number == 2)
String s3 = JOptionPane.showInputDialog(null, num1 + " x " + num2 + "=" );
if(number == 3)
String s4 = JOptionPane.showInputDialog(null, num1 + " ÷ " + num2 + "=" );for (int i = 0; i > 11; i++);Two problems with this line:
1) The second part of a For loop is the constraint. You have said that for the loop to be entered, i must be greater than 11. Well since you've also told i to begin at 0, this will never happen. Thus, the loop will never enter. You may have meant less than?
2) You put a semicolon in the line. Semicolons are used to end statements. The For loop, when used as a block with curly braces, is not a single statement and does not require a semicolon. Here's the two structures of a basic For loop:
for(int i = 0; i <= 100; i++) {
//this is a block. you can put multiple statements in here and they are all part of the loop
int a = 1;
int b = i;
//if your loop only needs to use a single statement, no braces are required
for(int i = 0; i <= 100; i++)
int a = i; -
Help with if statement in cursor and for loop to get output
I have the following cursor and and want to use if else statement to get the output. The cursor is working fine. What i need help with is how to use and if else statement to only get the folderrsn that have not been updated in the last 30 days. If you look at the talbe below my select statement is showing folderrs 291631 was updated only 4 days ago and folderrsn 322160 was also updated 4 days ago.
I do not want these two to appear in my result set. So i need to use if else so that my result only shows all folderrsn that havenot been updated in the last 30 days.
Here is my cursor:
/*Cursor for Email procedure. It is working Shows userid and the string
You need to update these folders*/
DECLARE
a_user varchar2(200) := null;
v_assigneduser varchar2(20);
v_folderrsn varchar2(200);
v_emailaddress varchar2(60);
v_subject varchar2(200);
Cursor c IS
SELECT assigneduser, vu.emailaddress, f.folderrsn, trunc(f.indate) AS "IN DATE",
MAX (trunc(fpa.attemptdate)) AS "LAST UPDATE",
trunc(sysdate) - MAX (trunc(fpa.attemptdate)) AS "DAYS PAST"
--MAX (TRUNC (fpa.attemptdate)) - TRUNC (f.indate) AS "NUMBER OF DAYS"
FROM folder f, folderprocess fp, validuser vu, folderprocessattempt fpa
WHERE f.foldertype = 'HJ'
AND f.statuscode NOT IN (20, 40)
AND f.folderrsn = fp.folderrsn
AND fp.processrsn = fpa.processrsn
AND vu.userid = fp.assigneduser
AND vu.statuscode = 1
GROUP BY assigneduser, vu.emailaddress, f.folderrsn, f.indate
ORDER BY fp.assigneduser;
BEGIN
FOR c1 IN c LOOP
IF (c1.assigneduser = v_assigneduser) THEN
dbms_output.put_line(' ' || c1.folderrsn);
else
dbms_output.put(c1.assigneduser ||': ' || 'Overdue Folders:You need to update these folders: Folderrsn: '||c1.folderrsn);
END IF;
a_user := c1.assigneduser;
v_assigneduser := c1.assigneduser;
v_folderrsn := c1.folderrsn;
v_emailaddress := c1.emailaddress;
v_subject := 'Subject: Project for';
END LOOP;
END;
The reason I have included the folowing table is that I want you to see the output from the select statement. that way you can help me do the if statement in the above cursor so that the result will look like this:
emailaddress
Subject: 'Project for ' || V_email || 'not updated in the last 30 days'
v_folderrsn
v_folderrsn
etc
[email protected]......
Subject: 'Project for: ' Jim...'not updated in the last 30 days'
284087
292709
[email protected].....
Subject: 'Project for: ' Kim...'not updated in the last 30 days'
185083
190121
190132
190133
190159
190237
284109
286647
294631
322922
[email protected]....
Subject: 'Project for: Joe...'not updated in the last 30 days'
183332
183336
[email protected]......
Subject: 'Project for: Sam...'not updated in the last 30 days'
183876
183877
183879
183880
183881
183882
183883
183884
183886
183887
183888
This table is to shwo you the select statement output. I want to eliminnate the two days that that are less than 30 days since the last update in the last column.
Assigneduser....Email.........Folderrsn...........indate.............maxattemptdate...days past since last update
JIM......... jim@ aol.com.... 284087............. 9/28/2006.......10/5/2006...........690
JIM......... jim@ aol.com.... 292709............. 3/20/2007.......3/28/2007............516
KIM......... kim@ aol.com.... 185083............. 8/31/2004.......2/9/2006............. 928
KIM...........kim@ aol.com.... 190121............. 2/9/2006.........2/9/2006.............928
KIM...........kim@ aol.com.... 190132............. 2/9/2006.........2/9/2006.............928
KIM...........kim@ aol.com.... 190133............. 2/9/2006.........2/9/2006.............928
KIM...........kim@ aol.com.... 190159............. 2/13/2006.......2/14/2006............923
KIM...........kim@ aol.com.... 190237............. 2/23/2006.......2/23/2006............914
KIM...........kim@ aol.com.... 284109............. 9/28/2006.......9/28/2006............697
KIM...........kim@ aol.com.... 286647............. 11/7/2006.......12/5/2006............629
KIM...........kim@ aol.com.... 294631............. 4/2/2007.........3/4/2008.............174
KIM...........kim@ aol.com.... 322922............. 7/29/2008.......7/29/2008............27
JOE...........joe@ aol.com.... 183332............. 1/28/2004.......4/23/2004............1585
JOE...........joe@ aol.com.... 183336............. 1/28/2004.......3/9/2004.............1630
SAM...........sam@ aol.com....183876.............3/5/2004.........3/8/2004.............1631
SAM...........sam@ aol.com....183877.............3/5/2004.........3/8/2004.............1631
SAM...........sam@ aol.com....183879.............3/5/2004.........3/8/2004.............1631
SAM...........sam@ aol.com....183880.............3/5/2004.........3/8/2004.............1631
SAM...........sam@ aol.com....183881.............3/5/2004.........3/8/2004.............1631
SAM...........sam@ aol.com....183882.............3/5/2004.........3/8/2004.............1631
SAM...........sam@ aol.com....183883.............3/5/2004.........3/8/2004.............1631
SAM...........sam@ aol.com....183884.............3/5/2004.........3/8/2004............ 1631
SAM...........sam@ aol.com....183886.............3/5/2004.........3/8/2004............ 1631
SAM...........sam@ aol.com....183887.............3/5/2004.........3/8/2004............ 1631
SAM...........sam@ aol.com....183888.............3/5/2004.........3/8/2004............ 1631
PAT...........pat@ aol.com.....291630.............2/23/2007.......7/8/2008............ 48
PAT...........pat@ aol.com.....313990.............2/27/2008.......7/28/2008............28
NED...........ned@ aol.com.....190681.............4/4/2006........8/10/2006............746
NED...........ned@ aol.com......95467.............6/14/2006.......11/6/2006............658
NED...........ned@ aol.com......286688.............11/8/2006.......10/3/2007............327
NED...........ned@ aol.com.....291631.............2/23/2007.......8/21/2008............4
NED...........ned@ aol.com.....292111.............3/7/2007.........2/26/2008............181
NED...........ned@ aol.com.....292410.............3/15/2007.......7/22/2008............34
NED...........ned@ aol.com.....299410.............6/27/2007.......2/27/2008............180
NED...........ned@ aol.com.....303790.............9/19/2007.......9/19/2007............341
NED...........ned@ aol.com.....304268.............9/24/2007.......3/3/2008............ 175
NED...........ned@ aol.com.....308228.............12/6/2007.......12/6/2007............263
NED...........ned@ aol.com.....316689.............3/19/2008.......3/19/2008............159
NED...........ned@ aol.com.....316789.............3/20/2008.......3/20/2008............158
NED...........ned@ aol.com.....317528.............3/25/2008.......3/25/2008............153
NED...........ned@ aol.com.....321476.............6/4/2008.........6/17/2008............69
NED...........ned@ aol.com.....322160.............7/3/2008.........8/21/2008............4
MOE...........moe@ aol.com.....184169.............4/5/2004.......12/5/2006............629
[email protected]/27/2004.......3/8/2004............1631
How do I incorporate a if else statement in the above cursor so the two days less than 30 days since last update are not returned. I do not want to send email if the project have been updated within the last 30 days.
Edited by: user4653174 on Aug 25, 2008 2:40 PManalytical functions: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions2a.htm#81409
CASE
http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#36899
http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/04_struc.htm#5997
Incorporating either of these into your query should assist you in returning the desired results. -
I installed Sunbird in one computer and my calendar has all my infos, events, and task that i would like to see on another computer that i just downloaded Sunbird into. Also, is it possible I can access Sunbird on my iphone?
Thank you in advance,Try the forum here - http://forums.mozillazine.org/viewforum.php?f=46 - for help with Sunbird, this forum is for Firefox support.
-
Hoping for some help with a very frustrating issue!
I have been syncing calendar and contacts on my iPhone 5 and Outlook 2007 using iCloud 2.1.3 (my PC is running Vista). All was well until the events I entered on the phone were showing up in Outlook, but not the other way around. I’ve tried the usual recommended steps: deselecting calendar and contacts in the iCloud control panel and then re-selecting, signing out of the panel and back in, and repairing the Outlook installation in control panel. I even uninstalled iCloud on the PC and downloaded it again (same version).
The furthest I’ve gotten is step 2 (and once, step 3) of 7 while performing “Outlook Setup For iCloud.” At that point I get, “Your setup couldn’t be started because of an unexpected error.” After the first attempt at all this, all my calendar events disappeared from Outlook, although they are still in iCloud calendar and on my phone.
Sound familiar? Any ideas on how to solve this iCloud/Outlook issue? Thanks much in advance!Hoping for some help with a very frustrating issue!
I have been syncing calendar and contacts on my iPhone 5 and Outlook 2007 using iCloud 2.1.3 (my PC is running Vista). All was well until the events I entered on the phone were showing up in Outlook, but not the other way around. I’ve tried the usual recommended steps: deselecting calendar and contacts in the iCloud control panel and then re-selecting, signing out of the panel and back in, and repairing the Outlook installation in control panel. I even uninstalled iCloud on the PC and downloaded it again (same version).
The furthest I’ve gotten is step 2 (and once, step 3) of 7 while performing “Outlook Setup For iCloud.” At that point I get, “Your setup couldn’t be started because of an unexpected error.” After the first attempt at all this, all my calendar events disappeared from Outlook, although they are still in iCloud calendar and on my phone.
Sound familiar? Any ideas on how to solve this iCloud/Outlook issue? Thanks much in advance! -
Help with HP Laser Printer 1200se
HP Support Line,
Really need your assistance. I have tried both contacting HP by phone (told they no longer support our printer via phone help), the tech told me that I needed to contact HP by e-mail for assistance. I then sent an e-mail for assistance and got that reply today, the reply is as follows "Randall, unfortunately, HP does not offer support via e-mail for your product. However many resources are available on the HP web site that may provide the answer to your inquiry. Support is also available via telephone. A list of technical support numbers can be round at the following URL........." The phone numbers listed are the ones I called and the ones that told me I needed to contact the e-mail support for help.
So here I am looking for your help with my issue.
We just bought a new HP Pavillion Slimline Desk Top PC (as our 6 year old HP Pavillion PC died on us). We have 2 HP printers, one (an all-in-one type printer, used maily for copying and printing color, when needed) is connected and it is working fine with the exception of the scanning option (not supported by Windows 7). However we use our Laser Printer for all of our regular prining needs. This is the HP LaserPrinter 1200se, which is about 6 years old but works really well. For this printer we currently only have a parallel connection type cord and there is not a parallel port on the Slimline HP PC. The printer also has the option to connedt a USB cable (we do not currently have this type of cable).
We posed the following two questions:
1. Is the Laser Jet 1200se compatible with Windows 7?
and if this is the case
2. Can we purchase either a) a USC connection cord (generic or do we need a printer specific cord)? or b) is there there a printer cable converter adapater to attach to our parallel cable to convert to a USB connection?
We do not want to purchase the USB cable if Windows 7 will not accept the connection, or if doing this will harm the PC.
We really would appreciate any assitance that you might give us.
Thank you,
Randy and Leslie GibsonSorry, both cannot be enabled by design. That said, devices on a network do not care how others are connected. You can print from a wireless connection to a wired (Ethernet) printer and v/v.
Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
I am employed by HP -
Going to Australia and need help with Power converters
Facts:
US uses 110v on 60hz
Australia 220v on 50hz
Making sure I understood that correctly. Devices I plan on bringing that will use power are PS3 Slim, MacBook Pro 2008 model, and WD 1TB External HDD. My DS, and Cell are charging via USB to save trouble of other cables.
Ideas I've had or thought of:
1. Get a power converter for a US Powerstrip, and then plug in my US items into the strip and then the strip into an AUS Converter into Australian outlet. Not sure if this fixes the voltage/frequency change.
2. Get power converters for all my devices. But, not sure if my devices needs ways of lowering the voltage/increasing frequency or something to help with the adjustment.
3. Buy a universal powerstrip, which is extremely costly and I wouldn't be able to have here in time (I leave Thursday). Unless Best Buy carrys one.godzillafan868 wrote:
Facts:
US uses 110v on 60hz
Australia 220v on 50hz
Making sure I understood that correctly. Devices I plan on bringing that will use power are PS3 Slim, MacBook Pro 2008 model, and WD 1TB External HDD. My DS, and Cell are charging via USB to save trouble of other cables.
Ideas I've had or thought of:
1. Get a power converter for a US Powerstrip, and then plug in my US items into the strip and then the strip into an AUS Converter into Australian outlet. Not sure if this fixes the voltage/frequency change.
2. Get power converters for all my devices. But, not sure if my devices needs ways of lowering the voltage/increasing frequency or something to help with the adjustment.
3. Buy a universal powerstrip, which is extremely costly and I wouldn't be able to have here in time (I leave Thursday). Unless Best Buy carrys one.
Check the specs on input voltage/frequency of your power supplies.
Many laptop power supplies are "universal/global" and are specced something like 80-265 volts AC 50/60 Hz, but not all. These will just need a connector adapter.
Unsure about the PS3 Slim - if it isn't universal it could be difficult as you'll need a 110/220 transformer, one big enough (power-handling wise) for the PS3 will be very bulky.
For the external WD HDD, if it doesn't have a universal supply, you're probably best off just finding a new wallwart for it that is capable of running on 220/50.
*disclaimer* I am not now, nor have I ever been, an employee of Best Buy, Geek Squad, nor of any of their affiliate, parent, or subsidiary companies. -
Creation of context sensitive help with pure FM 12 usage doesn't work
Hi,
I hope somebody is able to help me with a good hint or tip.
I am trying to create a context-sensitive Microsoft Help with FM12 only using the abilities of FM (no RoboHelp). For some reasons, my assigned ID's are not used in the generated chm file and therefore the help does not work context-sensitively.
What did I do?
- I created my FM files and assigned topic aliases to the headers. I did this two ways: a) using the "Special" menue and assigning a CSH marker and/or b) setting a new marker of type "Topic Alias" and typing the ID. I used only numeric IDs like "2000" or "4200",
- I created a .h file (projectname.h) - based on the format of the file projectname_!Generated!.h (I read this in some instructions). So the .h file (text file) looks like this:
#define 2000 2000 /* 4 Anwendungsoberfläche */
#define 2022 2022 /* 4.1.1 Menü Datei */
#define 2030 2030 /* 4.1.3 Menü Parametersatz */
#define 2180 2180 /* 6.6.7 Objektdialog Q-Regler */
#define 2354 2354 /* 6.9.2 Objektdialog Extran Parameter */
#define 2560 2560 /* 6.9.5 Objektdialog Extran2D Parametersatz */
- I published the Microsoft HTML Help. A projectname_!Generated!.h has been created. My IDs were not used in this file:
#define 2000 1
#define 2022 2
#define 2030 3
#define 2180 4
#define 2354 5
#define 2560 6
- When I open the .chm file and look in the source code, the ID even is totally different. It is not the one, I assigned in FM, it is not the one which I assigned in the projectname.h file and it even is not the one, which was put in the projectname_!Generated!.h file. It is a generated name starting with CSH_1 ...n in a consecutive way numbered.
Example:
<p class="FM_Heading1"><a name="XREF_72066_13_Glossar"></a>Gloss<a name="CSH_1"></a>ar</p>
What goes wrong? Why does FM not take my assigned IDs? I need to use these IDs since our programmers are using those already - I had to re-create the whole online help but the programs stay untouched.
Please help!
Many thanks
MohiHi Jeff,
thanks for your note!
The text in my marker is just a number like "2000" or "4200". As said, I created manually a my.h file and used this marker there. E.g.
#define 2000 2000.
Whereby the first 2000 (in my opinion) is the marker text and the second 2000 is the context ID which the programmers are using for the context sensitive call of the help. My definitions in the my.h file were translated to #define 2000 1 (in the my_!Generated!.h file). The source code "translates" the context ID into CSH_8.
I am still confused :-/
Thanks
Mohi -
Need help with Boot Camp and Win 7
I have iMac 27" (iMac11,1) 2.8 GHz, quad core, 8MB of L3, 8GB of Memory, Boot ROM Version IM111.0034.B02 and SMC Version 1.54f36 and can't get this machine to run Windows 7 using Boot Camp. I have successfully loaded Win 7 but when it claims to be starting I only get a black screen after initial start up.
I have checked and rechecked my software updates and have read and reread the instructions, however, I can't update my Boot Camp to 3.1 (my machine says i'm running 3.0.4) and I need 3.1 but can't load 3.1 because it is an exe file that has to be loaded into Windows after I load Windows but can't open Windows because I can't load Boot Camp 3.1. That's my excuse anyway, so I'm missing something I just can't figure out what it is....this is where you come in!
Thanks.
MikeMike,
I'm not going to be much help with Boot Camp however I can direct you to the Boot Camp forum where there are more people that know how to troubleshoot it and Windoze 7. You can find it at:
https://discussions.apple.com/community/windows_software/boot_camp
Roger
Maybe you are looking for
-
Is there a way to check what I had purchased from the itune store to match the charges on my credit card, because there is a charge that I do not recognize
-
How can I edit a video clip in PE and take it out of PE to use elsewhere?
I want to add edited video clips from PE to use in my photoshop slideshow. I would also like to use the edited clips in another programme, but I only get a file that can only be opened in PE. I have PE 4 and Photoshop 6.on a desktop PC using Vista. M
-
My Final Cut Pro X project went missing
I recently downloaded the trial version of Final Cut Pro X to my Macbook Pro and spent eight hours editing a video yesterday in one continuous session. When I tried to share it to my desktop no files ever showed up. I tried a bunch of different forma
-
Using 1 Adobe ID on multiple computers-willing to use 2 license seats
I regularly use 3 different computers: work, home, and laptop. I know that I can play the deactivate/reactivate juggling game to keep only 2 of the 3 active at any time, but that is a major headache (especially if I am on the road with my laptop and
-
Opmnctl status: "bash: opmnctl: command not found"
Hi All, I am working to setup an OBI 11g VM image to my local system. The VM is a linux OS and my local m/c is Windows7. I am able to login to the VM using oracle/oracle. But the thing is, I am not able to start up my BI server over the VM. I checked