Is it possible to declare a column inmutable?
I'm currently trying to design a database model that will support several applications running on top of it. As we may not develop all of them I'm putting a lot of effort in declaring as much constraints as possible in this layer. I've found several tables with columns that should only support inserts but never updates. I know I can manage the updates with triggers (raising exceptions) but that's cumbersome (at least a trigger per table). I was wondering if an easier way exists?
An interesting approach I hadn't thought of. I'm unsure it would work in my case though.
Managing it with a trigger you have fine grained control over the column, that is, you can accept updates on a record even if the immutable column is affected if the value wouldn't change.
Not sure how would it work revoking the privileges. It would be a problem as the updates will be managed via CMP beans.
Similar Messages
-
Is it possible to create a Column with Conditional Mandatory with another Column?
Is it possible to create a Column with Conditional Mandatory with another Column?
For example
In a Table we have column A, B, C.
A is Primary Column.
B is Optional
C is Conditional Mandatory.
A B
C
12345 ABC
OK
12346 NULL
NULL
12347 ABC
OK
Only if the B Column has the value then only C column should be mandatoryI guess you can't create a condtional mandatory column directly. However, you can use check constraint to on the column
create table YourTable
A int primary key,
B char(3),
C int,
constraint ch_con check(
B
is not null
or C is null -
Is it possible to add a column to the Item matrix in the ItemLookup form (C
Hi,
Is it possible to add a column to the Item matrix in the ItemLookup form (CFL or Find Lookup).
I need to display a value in the newly added column if the itemgroup in that row matches a certain value , how can I achieve this.
ThanksHi,
You may check this: Can we add CFL to the system/form defined textbox?
Please close your previous open thread.
Thanks,
Gordon -
Warning - 1241024 - Possible string truncation in column #
I am running the following command in a simple MaxL script, the output of which is sent to a text file:
display variable App.DB.SubVar;
The text file appears to have generated fine, with the substitution variable value displayed. However, the following warnings are returned each time from the stderr output. Should I be concerned? Is there any way to rectify this?
WARNING - 1241024 - Possible string truncation in column 3.
WARNING - 1241028 - Output column defined with warnings.
WARNING - 1241024 - Possible string truncation in column 4.
WARNING - 1241028 - Output column defined with warnings.Hi John,
Many thanks for your response. The problem is a little confusing, as I cannot see how anything is being truncated here - indeed there are characters to spare! Could it be because the potential size of the substitution variable name is 320 bytes and the potential size of the substitution variable value is 256 bytes (11.1.2.1)? Could this be the cause of the warnings here?
Adding "set column_width 10;" does not appear to remove the warnings either unfortunately. Do you please have any other thoughts on how I might remove the warnings? It might allay the fears of the client later on!
James -
Is it possible to add new columns with format "Text" once a table is linked to a form
Is it possible to add new columns with format "Text" once a table is linked to a form in Numbers for iPhone or is it impossible and thus a serious bug?(Rating stars and numeric vales seem to work.)
Those bugs happen both for new speadsheets as well as existing onces, like the demo. When you are in the form only the numeric keyboard shows up.
Pat from the Apple Store Rosenstrasse/Germany approved that it looks like a Bug during the Numbers Workshop I was in: It is not possible to add new columns with format "Text". I reported the error for Version 1.4 but there is no update nor do I get statement of understanding the issue.Hi Knochenhort,
I see what you are talking about now. Without knowing how the program actually works, I think this is what's going on:
When you add a new column to an already existing table (with already existing formats), the new cells come already formatted like the previous column. So when you add a column to the end of the demo table, the cells are already formatted like stars, and when you add a column to the beginning, they're already formatted like number.
I think this is why it's different when if you add columns to a table with blank (unformatted) columns. In that case, the new cells aren't already "tainted" with a set format, so you can change to text format without issue.
It seems like the problem is that you can't format cells that are already formatted as "number" as "text" format (even if it doesn't look like they are, because they are blank). IMO, this is a bug! This is why you don't see this issue when adding columns to a new table, because the new cells don't already come with a format.
To workaround, you can highlight the body cells after adding the new column, and delete the cells. This will "clear" the formatting, so you can then go in the inspector, format them as text, and the correct keyboard will pop up.
Hope that helps! -
Hi.is it possible to add 2 columns and put it in the third calumn thru sqll
Hi.is it possible to add 2 columns and put it in the third calumn thru sqll
Hi i have 3 columns
callstart,duration and callrelease
In the extract i get values only for callstart and duration.
Is possible thru sqlldr to output the sum of callstart and duration into callrelease.May This Can Help You..
SQL> select * from table_a;
ID SCHEDULED MARK PRID
5 07-NOV-10 T05 7
6 18-SEP-10 T06 8
4 31-JAN-11 T02 2
1 18-JAN-11 T01 2
2 18-JAN-11 T02 10
3 18-JAN-11 T03 1
6 rows selected.
SQL> alter table table_a add mix varchar(50);
Table altered.
SQL> select * from table_a;
ID SCHEDULED MARK PRID MIX
5 07-NOV-10 T05 7
6 18-SEP-10 T06 8
4 31-JAN-11 T02 2
1 18-JAN-11 T01 2
2 18-JAN-11 T02 10
3 18-JAN-11 T03 1
6 rows selected.
SQL> update table_a
2 set mix=mark||to_char(id);
6 rows updated.
SQL> commit;
Commit complete.
SQL> select * from table_a;
ID SCHEDULED MARK PRID MIX
5 07-NOV-10 T05 7 T055
6 18-SEP-10 T06 8 T066
4 31-JAN-11 T02 2 T024
1 18-JAN-11 T01 2 T011
2 18-JAN-11 T02 10 T022
3 18-JAN-11 T03 1 T033
6 rows selected.
SQL> Regards
Umesh -
Is it possible to use LONG columns in WHERE clause or ORDER BY?
Is it possible to use LONG columns in WHERE clause or ORDER BY?
Hi,
LONG data type is deprecated, maybe could you change your column type to LOB ?
Nonetheless below is a workaround which may fit your needs if forced to use LONG.
It uses a function which returns you a CLOB. It allows you to use the converted "LONG" column in a WHERE clause.
Then if you want to order by you have to convert the CLOB to a VARCHAR using DBMS_LOB.SUBSTR.
SQL> CREATE TABLE my_table (id NUMBER, description LONG);
Table created.
SQL> INSERT INTO my_table VALUES (1, 'FIRST LONG');
1 row created.
SQL> INSERT INTO my_table VALUES (2, 'ANOTHER LONG');
1 row created.
SQL> COMMIT;
Commit complete.
SQL> CREATE TYPE my_type_row AS OBJECT (id INTEGER, description CLOB);
2 /
Type created.
SQL> CREATE TYPE my_type_table AS TABLE OF my_type_row;
2 /
Type created.
SQL> CREATE OR REPLACE FUNCTION get_my_long
2 RETURN my_type_table
3 PIPELINED
4 AS
5 v_tab my_type_table := my_type_table ();
6 BEGIN
7 FOR cur IN (SELECT id, description FROM my_table)
8 LOOP
9 PIPE ROW (my_type_row (cur.id, cur.description));
10 END LOOP;
11 RETURN;
12 END;
13 /
Function created.
SQL> SELECT
2 id,
3 description
4 FROM
5 TABLE (get_my_long ())
6 WHERE
7 description LIKE '%LONG'
8 ORDER BY
9 DBMS_LOB.SUBSTR(description);
ID DESCRIPTION
2 ANOTHER LONG
1 FIRST LONG
SQL> SELECT
2 id,
3 description
4 FROM
5 TABLE (get_my_long ())
6 WHERE
7 description LIKE 'FI%';
ID DESCRIPTION
1 FIRST LONG
SQL>Kind regards,
Ludovic -
Is it possible to format a column to represent more than one key figure?
Is it possible to have a column called "Forecast" and then position both revenue and cost key figures in the column in BEx?
For example:
type forecast actual
revenue 90,000 95,000
costs 80,000 85,000hi,
if you use structure you cannot have key figures in the column
Ramesh -
Is it possible to declare an interface without any methods?
Hi Guys!
is it possible to declare an interface without any methods?
Thanx
-SasiOf course, Serializable interface of Java is an example.
-
Is it possible to declare method with non-finite argument list ?
Hi, everyone,
Is it possible to declare method with non-finite argument list
and to read values of these arguments inside this method ?
I'm not talking about main() method (i know it can), but
values to this method are passed through array. That won't do
do for me.
If it is possible, could someone show an example how to do this.void method(Object[]o)
for (int i=0; i<o.length; i++)
if (oinstanceof Integer)
System.out.println("is is an integer: "+o[i]);
else if (o[i]instanceof Point)
System.out.println("is is an Point: "+((Point)o[i]).x+"/"+((Point)o[i]).y);
else if (o[i]instanceof String)
System.out.println("is is an String: "+o[i]);
if you call it like
method(new Object[]{new Integer(123), "Hello!", new Point(100, 200), "goodbye!"});then the method will output:
is is an integer: 123
is is an String: Hello!
is is an Point: 100/200
is is an String: Goodbye!
this is as powerful as varible parameter counts like in c, and it it typesafe. -
Is possible to use one column in Excel file as parameter to retrieve data ?
I'm newbie to WEB ADI
is possible to use one column (or worksheet) in Excel file to enter data as parameters and use Web ADI to retrieve data ?
In example - user paste in one column list of items ID's - then press a button and in another columns get data such as description, primary UOM etc.Hi,
I will say no. Oracle WebADI integrators are not meant for such purpose.
HTH,
Nitin jain -
Possible to declare variable on demand?
Hi,
Using Oracle 9i. I am new to PL/SQL (coming from C#), I would like to know if it is possible to declare a variable close to the where it is used. For example, in the Execution block of the procedure, let's assume I want to do:
.. existing code ...
vTest integer;
vTest := 123;
.. existing code (continued) ...
Doing so, the procedure failed to compile. The only way I know so far is to declare the vTest integer; in the declaration block. Can you please let me know how to declare the variable in the body of the procedure?
Thanks in advance.1) The line numbers are added by SQL*Plus as you enter code in order to make it easier to debug (i.e. when the error message says there is an error on line 15, it's much easier if SQL*Plus has added line numbers than if you have to manually count them). They are not intended to be part of the code block.
2) Having nested DECLARE ... BEGIN ... END blocks in a piece of code would certainly strike me as unusual. Much like nested procedure declarations-- they are syntactically legal, and very occasionally useful, but they are sufficiently unusual that I would tend to avoid them if only because they are likely to confuse future developers that come along later. I've personally never seen code that did this in production, though I have seen a handful of folks use nested procedures, i.e.
CREATE PROCEDURE p1
AS
PROCEDURE p2
AS
BEGIN
NULL;
END p2;
BEGIN
p2;
END;I believe Tubby's point is that while it is good in general to declare variables close to where they are being used, if you have small modular code, the variable declaration block of your procedure ought to be very close to where the variable is being used. If you have a procedure that fills multiple pages and has multiple PL/SQL blocks, it is very likely that you should have factored out most of that code into smaller procedures and put everything in a single package.
Justin -
Interactive Report - is it possible to stop a column being hidden?
I have an interactive report region where i have a column that has a link that performs an action, in this case it links to a screen where the user can then add a row. I want to make this column mandatory and not let the user hide it. I can remove other functionality, but cant seem to control the hide/show functionality.
anybody got any ideas?
craig
[oracleapplicationexpress.com|http://www.oracleapplicationexpress.com]Dear Hemanth,
To your question:
"Is it possible to stop a campaign from being cancelled if it has purchase orders attached to it, using standard functionality".
This might be possible with a BADI implementation. In enhancement spot CRM_MKTPL there exist a BAdI CRM_MTKPL_OL_OBJ where the interface method CHECK_BEFORE_DELETE is offered.
Regards,
Anik -
Is it possible to upload few column in table through Apex Data Loading
Hi All,
I have to do upload into the table through a csv file . The table's primary key i have to load the rest through user's uploaded file. Is it possible to do the data loading to the table only to required columns and fill the other columns from backend. Or is there any other way to do this?Hi,
Your query is not really clear.
>
Is it possible to do the data loading to the table only to required columns and fill the other columns from backend. Or is there any other way to do this?
>
How do you plan to "link" the rows from these 2 sets of data in the "backend"? There has to be a way to have a relation between them.
Regards, -
I just have a procedure in which i do have a dynamic query.It has certain parameter on the basis of which different set of columns will be returned in the result set. Now I want a SSRS report which can automatically pick up the columns from the Procedure
result.without declaring column Names at Design Time(As i don't know which columns will come in the result set)
PS:- I can't make separate matrix/table with their respective column names and show/hide them as I don't know which columns will come from procedure.
Thanks
KanwarCan you please give a reference.I want a matrix or table to display the result set as is returned from the procedure.(Lets just say you keep the columns fixed).How without writing the column Names in table/matrix it automatically generates
the columns similar to resultset.
A bit of background for Understanding scenario:
We want to give users the column names, arithmetic operators,etc.(From UI) and then send the query to SSRS. This query will be sent to SQL procedure(which is being used in RDL).What after that ??? . SSRS is not changing the result set dynamically.So as the
result set is not definite i want table/matrix to populate the data returned from procedure automatically (without defining columns at design - time).
Thanks
Kanwar
Maybe you are looking for
-
See my error and my try (ora-12528 ) after try new err ora-00202
try to connect my 10g database but that give me this error ORA-12528: TNS:listener: all appropriate instances are blocking new connections some body give me idea i try this c:\>set oracle_sid=universi c:\>sqlplus sys as sysdba enter password : connec
-
When I click the icon in the dock all that happens is it bounces once
-
Special purpose Ledger - Report writer
Hi, I created a report using report writer. The purpose of the report is to display the margin, business area wise. I have two company codes with different currencies using the same business area. My ledger currency is USD Cocd 1 = USD Cocd 2 = CAD I
-
How can I call ECC 6.0 data as ESS/MSS in to Portal?
Hi One and all, I have ECC 6.0 and portal. How can I Call ECC 6.0 data in to portal? I have questions please clarify these... By using sm59 can I assign RFC connection? how? What is SSO? Is it mandatory to access portal? Should SLD exist? If yes how
-
Strange rendering all the time - not only on Firefox.
The image has strange strypes all over it and they look a little like normal screen for a short time. It happend after I sent my laptop Acer Aspire 4745 Z - 4754. Thanks for your attention.