Help me to dedupe table
On Oracle 11G, 11.2.0.2.0 / 64-bit
I have a situation like this, one example...
for all duplicate rows: cust_key and the city are always the same, duplication is always in L1, L2 or L3, due to a variation zero in one of them:
select * from ( select 123 as cust_key, 5 as L1, 6 as L2, null as L3, 'Seattle' as City from dual union select 123 as cust_key, null as L1, null as L2, 7 as L3, 'Seattle' as City from dual )
CUST_SKEY L1 L2 L3 CITY
6 5 123 Seattle
123 Seattle 7
Basically, I want to spend 7 from L3 to nowhere above and eliminate a line - this is how the data is, previous games
someone did probably (for some reason any)... How is that possible?
So basically I want to select a non-null value of L1, L2, or L3, and for the rest of the column, select their singular values, throw them
I hope this makes sense...
Try this:
WITH My_Tab (Cust_Key, L1, L2, L3, City)
AS (SELECT 123, 5, 6, NULL, "Seattle" of UNION DOUBLE
CHOOSE 123, NULL, NULL, 7, 'Seattle' TO DOUBLE)
SELECT Cust_Key
L1 (L1) MAX
L2 (L2) MAX
MAX (L3) L3
MAX City (City)
OF My_Tab
Cust_Key GROUP
ORDER BY Cust_Key
/
Tags: Database
Similar Questions
-
Help! Logical physical Table table - imported as fact table
I am trying to create a logical table. When I drag the alias of the physical layer in the MDB, logic is created with the sign #. I think that it indicates as a fact table. I can't create a logical dimension of this table. How can I make the table come in a logic instead of a fact?
Thank you for your help.
1 > drag the physical Table in MDB. It will create a logical fact table in MDB Test for example.
2 > duplicate this logical fact table. Another fact logical Test #1 table will be created.
3 > select Test / Test No. 1 logical tables, and then right-click and select model for Business diagram.
4 > create a new logical join between the Test and the Test #1 in MDB. Make sure that this Test: Test #1 cardinality is 1:M.
5 > This will make the Test as a logical dimension table. Double-click the logical size Test table, go to the tab key and create a primary key.
-
help join you a table nested with ordinary table
IM creating a nested table object prtcnpt_info codelist. In a block anonymous im saying t_code as type nested table codelist.
Now when I try to join the table nested to ordinary table oracle DB and I get the error: PL/SQL: ORA-00904: "COLUMN_VALUE": invalid identifier.
Please help me on this and provide link tutorial about this concepts... Here is the code I wrote
-Start code.
create or replace type prtcnpt_info as an object (identification number
, name varchar2 (200)
(, code varchar2 (30));
create type codelist is the prtcnpt_info table;
declare
t_code codelist.
Start
Select prtcnpt_info (b.pid, b.name, pt.code) in bulk collect into t_code
party pt
mc_code b
where pt.cd in ("AAA", "BBB")
and pt.ptype_id = b.pt_type_id;
INSERT INTO table (ID
RUN_ID
DATA
P_ID
)
SELECT id
run_id
data
prtct.id-> 1
IN table_2 t2
, (by selecting column_value in table (t_code)) prtct
WHERE prtct.id = t2. P_ID; -> 2
end;
-End code;
also of the anonymous block
1 = > is this right until you get the id value (b.pid) of the tablet_code nested as prtct alias?
2 = > is this right until you reach the nested with ordinary table table? I want to join the id column in the tables.
Published by: 914912 on April 30, 2012 02:11Write the insert like this and try
insert into table ( id , run_id , data , p_id ) select id, run_id, data, prtct.id from table_2 t2 table(t_code) prtct where prtct.id = t2.p_id;
-
need help writing records in tables multipul delete trigger
I am trying to write a trigger that might help me to delete the record from 3 different tables
Let's say I table a, b and c
I have one is trying to write a trigger that might help me to delete the record of table has and c.
Drop trigger az_zzz_trigger;
create trigger az_zzz_trigger
before INSERT or update or DELETE ON az_employ
FOR EACH LINE
BEGIN
IF REMOVE then
remove from za_payroll
remove from az_salary_audit
end if;
end;
/
during the execution of this trigger is delete all the data in the za_payroll table.
What should I do so that only the record that I delete az_employ is removed from az_payroll and az_salary_audit872959 wrote:
I am trying to write a trigger that might help me to delete the record from 3 different tablesLet's say I table a, b and c
I have one is trying to write a trigger that might help me to delete the record of table has and c.
Drop trigger az_zzz_trigger;
create trigger az_zzz_trigger
before INSERT or update or DELETE ON az_employ
FOR EACH LINEBEGIN
IF REMOVE then
remove from za_payroll
remove from az_salary_audit
end if;
end;
/during the execution of this trigger is delete all the data in the za_payroll table.
What should I do so that only the record that I delete az_employ is removed from az_payroll and az_salary_audit
use the appropriate WHERE clause
-
I'm looking for a way to create a dynamic table / grid somewhat like a sheet or spread html table. but I want to create all the cells via a loop.
The following diagram was created using php to execute a loop and writing on the cells and the duration for each cell in the grid/table. But I have no idea where to start in flash builder to build something like this.
Some cells will last 2 to 4 columns as shown in the following diagram.
Any suggestions on how to create this type of table or grid in Flash Builder?
I looked through most of the components, but I'm not sure which component to use.
Help in this would be greatly appreciated.
Thank you to
Maurice
It's ok, I thought about it.
just by using containers grid Flash builder 4.5
-
looking for help with this query. can't do things.
4 tables.
doc_master
doc_folder_master
project_master
doc_relations
quick overview of tables
doc_master has all the documents in the files
doc_folder_master has all the names of folders (documents are in folders)
project_master has all the names of project
doc_relations has the relationship between records and documents by file ID and ID of Document.
try to get all the documents of the doc_master where the project name is '% provider %' I can do it without problem.
Like this...
Select * from document_master where proj_id IN
(select proj_id from project_master where status = 'A' and upper (proj_title) like '% PROVIDER %')
but now I must also name the folder in each document.
Try like this, but does not.
get the same name documents
Select doc_file_name, name, proj_title from)
Select * from
(select * from document_master where proj_id IN)
(select proj_id from project_master where status = 'A' and upper (proj_title) like '% PROVIDER %')
),
(select * from document_relations) b.
(select * from doc_folder_master) c,.
(select * from project_master) d
where a.doc_id = b.child_doc_id
and d.proj_id = a.proj_id
)
I apologize if I am missing any info. If you need more please let me know.
Published by: Jay on November 18, 2010 05:26So if I understand you
select a.doc_file_name, c.name, d.proj_title from document_master a, document_relations b, doc_folder_master c, project_master d where c.doc_folder_id = b.parent_doc_id and b.child_doc_id = a.doc_id and d.proj_id= a.proj_id and d.status='A' and upper(d.proj_title) like '%SUPPLIER%'
If every relationship exists, the query will work.
If not try an outer join to find the error asselect a.doc_file_name, c.name, d.proj_title from document_master a, document_relations b, doc_folder_master c, project_master d where c.doc_folder_id(+) = b.parent_doc_id and b.child_doc_id(+) = a.doc_id and d.proj_id(+) = a.proj_id
-
Need help request! 2 tables
Using Coldfusion 8 and MySQL. I have 2 tables, one called products (100 points) and another table called Clearance (5 items).
I see all 100 products and need to insert the discounted_price of the 5 elements of the game table in the query below.
(* write it down field discounted_price only exists in the table).
Also, how the returned below list can mark the checkboxes of the 5 elements of the game table.
(* note-productid is used in both tables. I guess you could call it the foreign key between tables).
I am a newbie and not sure how to write queries. Any help would be appreciated. Thanks in advance.
< cfoutput query ="getProducts">
< tr< cfif currentrow mod 2> class = 'weird'< / cfif >>
< td >< div align ="left">< entry type ="checkbox" name ="promo" value ="#">< table >
< td > (#getProducts.modelnumber #) #getProducts.modelnumber #< table >
< td >#getProducts.modeldescription #< table >
< td >#getProducts.category #< table >
< td >#getProducts.subcategory #< table >
< td > < input type ="text" name ="discounted_price" Value ="">< table >
< /tr >
< / cfoutput >
Select p.modelnumber, p.modeldescription, p.category, p.subcategory, C.discounted_price
left join products P C release on C.productid = P.productid
<>
class = 'weird' >checked >#getProducts.modelnumber # (#getProducts.modelnumber #) #getProducts.modeldescription #. #getProducts.category #. #getProducts.subcategory #. I hope this helps...
-
Help setting up the table/list of choices
Hello:
I create an application where I use a custom authentication scheme and captures all user information in a separate table. When the user logs in he will refer to the table to identify a user name and password stored in the table.
I am allowing users to create their own user accounts that will be default to basic access levels. Further along in the process, users will need to select a person to approve something. I want to use a list of choices so that the name of the approver is entered regularly every time. The user table has the following format:
Default primary key Type Nullable data column name
Username VARCHAR2 (8) No - 1
PASSWORD VARCHAR2 (8) No. -
FNAME VARCHAR2 (30) - No.
LNAME VARCHAR2 (30) - No.
E-MAIL VARCHAR2 (50) - No.
ADMIN VARCHAR2 (1) Yes.
APPROVER VARCHAR2 (1) Yes.
I would like users to be able to choose from a list of choices that displays LNAME, FNAME. I don't know how to make the two fields appear in a list of choices.
Furthermore, I would like to (if possible) to keep the two separate fields for the creation of user accounts so that I can get a coherent LNAME, FNAME format and people are not go backwards (e.g., Smith, Joe c. Joe Smith).
If I can't show the two fields in the drop-down list, is there a way where I could add a free calculation filed to the table that will concatenate LNAME"," FNAME?
Thanks for any help you can provide.RKD,
Create a dynamic list of values.
select lname||', '||fname displayed, username returned from user order by 1
You can view what you want, regardless of the value returned. And that includes the concatenation of elements together (or do other calculations/manipulations).
-David
-
Here is what I need help... I need to go through a few lines of code and
Add values in a pl sql table. Then I must get these values I added in a different section.
But when I try to retrieve the values it gives me only the last value. So I think I write about the values that I am incrementing. Could someone please help?
How do I retrieve these values to be added to an existing table? When I run it it seems to have only the last value?
All comments appreciated!
DECALRE
TYPE app_cnt_type IS TABLE OF THE priority_countries.country_code%TYPE
INDEX OF DIRECTORY;
app_table app_cnt_type;
v_capp_index directory.
BEGIN
-the counter of the country continues to go to different countries as 'US', 'UK', 'MX '...
IF v_section_name = "country" THEN
app_table (1): = v_input_value;
v_capp_index: = app_table.first;
LOOP
MESSAGE (app_table (v_capp_index));
EXIT WHEN v_capp_index = app_table. LAST;
v_capp_index: = app_table. Next (v_capp_index);
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
MESSAGE ("no country more");
END;You're always one value of loading and then a loop in a collection that is never more than one value. Whenever you call the code block, the collection is re-initialized.
How about something like that, by passing the values one by one.
create or replace package p is procedure clear_collection; procedure add_value(p_value in varchar2); procedure show_values; end;
create or replace package body p is type t is table of varchar2(100); a t; procedure clear_collection is begin a.delete; end; procedure add_value(p_value in varchar2) is begin a.extend; a(a.last) := p_value; end; procedure show_values is begin if a.exists(a.first) then for i in a.first .. a.last loop dbms_output.put_line(i||' '||a(i)); end loop; end if; end; begin a := t(); end;
begin p.clear_collection; p.add_value('US'); p.add_value('UK'); p.add_value('MX'); p.show_values; end;
1 US 2 UK 3 MX
-
help with quierying, a table with varchar as dates
the guys need a little help im close, but I can't just close the deal.
I have a table that the field is dataytped as varchar2, but she holds a date as such date of today '20100615'.
I know that the first thing that you guys are going to say is that this must be formatted as a date but it is not my table and I do deal with this.
Here's how the problem im trying to query for a range of dates, and im having a hell of a time to do.
as you cannot say my query below im trying to bring back only 15 days worth of data by date.
can someone please point out what is obvious. I was home for a day now to try to get this working.
SELECT DISTINCT to_date (fwvitals_date, 'YYYYMMDD') "fwvitals_date".
OF fwvitals
where fwvitals_date
between (((SELECT MAX (fwvitals_date) OF FWVITALS)))
Double ((SÉLECTIONNEZ to_CHAR (sysdate-15, «AAAAMMJJ»)))Hello
user633029 wrote:
the guys need a little help im close, but I can't just close the deal.
I have a table that the field is dataytped as varchar2, but she holds a date as such date of today '20100615'.
I know that the first thing that you guys are going to say is that this must be formatted as a date but it is not my table and I do deal with this.You are absolutely right!
Here's how the problem im trying to query for a range of dates, and im having a hell of a time to do.
as you cannot say my query below im trying to bring back only 15 days worth of data by date.
can someone please point out what is obvious. I was home for a day now to try to get this working.SELECT DISTINCT to_date (fwvitals_date, 'YYYYMMDD') "fwvitals_date".
OF fwvitals
where fwvitals_date
between (((SELECT MAX (fwvitals_date) OF FWVITALS)))
Double ((SÉLECTIONNEZ to_CHAR (sysdate-15, «AAAAMMJJ»)))"WHERE x BETWEEN y AND z" is equivalent to
"WHERE x > = y AND x.<=>=>
If y > z, no line will never be allowed, and if there is the great artist of value in your table, then lines (probably) very little, perhaps only 1 will satisfy the same if condition z > y.What exactly are you trying to do?
It helps if post you a small example of data (CREATE TABLE and INSERT statements) and the results desired from these data. If the results are conditional, give some examples, for example, "if I run the query at any time on 15 June, I want to... but if it's June 16, so I want to..." »If you want the most recent 15 days, including today (that is, when run on 15 June, you want from 1 June until 15 June) then:
SELECT DISTINCT fwvitals_date FROM fwvitals WHERE fwvitals_date BETWEEN TO_CHAR (SYSDATE - 14, 'YYYYMMDD') AND TO_CHAR (SYSDATE, 'YYYYMMDD') ;
Fortunately, the strings are in a format such as sorting is explicit, so you don't have to run TO_DATE on each of them and get conversion errors.
Published by: Frank Kulash, June 15, 2010 21:52
-
Need help on query - psaccesslog table URGENET please.
I have a test I want to calculate
Active users are classified as light, medium and heavy. Based on industry standards, of light/medium/heavy users log sales 2/4/6 (connections) respectively per user and per hour. Now how to find light, medium and heavy users successful according to the criteria?
I need your help to find the result of the psaccesslog table. I'm not good at sql but I started with it that I could not go further.
SELECT count (oprid), to_char (LOGINDTTM, 'MON dd yyyy hh AM') LOGINDTTM of sysadm.psaccesslog group of to_char (LOGINDTTM, 'MON dd yyyy hh AM')
I really appreciate your help.
Badinselect count(*), category from (select case when count(*) < 4 then 'Light' when count(*) < 6 then 'Medium' else 'Hight' end category, oprid, to_char(logindttm,'dd-MON-yyyy hh AM') from psaccesslog group by oprid, to_char(logindttm,'dd-MON-yyyy hh AM') having count(*)>=2) group by category;
Nicolas.
-
Please help me in creating table
Hi all
I want to create a table for TKT_CONJ TKT_CONJ., it's the main table and TKT_MAIN is the reference table.
SQL > create table TKT_CONJ (iss_arln, number 4)
2 doc_no Number (12).
3 serial_no Number (2),
4 conj_doc_no Number (12).
5 cpn_status char (4),
primary key for constraint 6 PK_TKT_CONJ (iss_arln, doc_no, serial_no),
7 number references 4 iss_arln TKT_MAIN (iss_arln),
8 doc_no Number (12) references TKT_MAIN (doc_no));
iss_arln number 4 references TKT_MAIN (iss_arln),
*
ERROR on line 7:
ORA-00957: duplicate column name
Name column name Type Nullable constraints reference Table reference data column of the table
TKT_CONJ iss_arln number 4 not null PK_TKT_CONJ TKT_MAIN iss_arln
doc_no Number (12) not null PK_TKT_CONJ TKT_MAIN doc_no
serial_no Number (2) PK_TKT_CONJ
conj_doc_no Number (12)
cpn_status char (4)
TKT_MAIN iss_arln number 4 not null PK_TKT_MAIN
doc_no Number (12) not null PK_TKT_MAIN
doc_type tank (3)
issue_agent tank (8) Not null
Please help in this issue
Thank you and best regards,
Vijay,
Published by: user5456635 on July 7, 2009 06:42Delete references (twice) and Add (at the botom):
constraint bla foreign key (iss_arln,doc_no) references TKT_MAIN(iss_arln,doc_no)
-
Can someone help me with the table layout please
www.hunterstables.co.UK/pricelist1.html
I am trying to create a table with an ordered list in my table.
I have three rows and three columns. The first is my 'specifications' title that is correct. The second row, I would like to have the titles of the product in bold, but as in the 'td' If make sure that "BOLD" then all the text will be "BOLD".
My third row, trying to get my products in a list, so IE
3 X 2 CLS TANALISED FRAMING
4 X 2 TANALISED PERLINS TANALISED
FINISHES of RABBETS of T & G 16MM, 12MM
PROFILE BOX GALVANIZED STEEL ROOF
2PI OVERLOOK STANDARD WITH SHED ROOF
Can someone please!
Thank you in advance.
Copy and paste the css code and table:
Specification table .specifications {
font-family: helvetica, sans-serif;
font-size: 14px;
border: 1px solid #000;
border-collapse: collapse;
}
.specifications .header-text {
text-align: center;
font-size: 20px;
background-color: #ccc;
}
.specifications th {
text-align: left;
padding: 20px 15px;
font-size: 17px;
border-bottom: 1px solid #000;
border-right: 1px solid #000;
}
.specifications th span {
font-size: 14px;
display: block;
padding: 5px 0 0 0;
}
.specifications td {
border-right: 1px solid #000;
background-color: #f5f5f5;
}
.specifications td {
padding: 20px 15px;
}
.specifications ul {
font-family: helvetica, sans-serif;
font-size: 14px;
margin: 0;
padding: 0 0 0 15px;
}
.specifications li {
margin: 0 0 8px 0;
padding: 0;
}
SPECIFICATIONS BUDGET 16mm T & G rabbets, ends 12mm (treated)
STANDARD 19mm T & G rabbets, finishes 15mm (treated)
PREMIUM 22mm T & G rabbets, ends 19mm (treated)
- 3 x 2 CLS Tanalised framing
- 4 x 2 Tanalised Perlins Tanalised
- 16mm T & G rabbets, ends 12mm
- 2 pi in standard with shed roof overhang
- 3 x 2 CLS Tanalised framing
- 4 x 2 Tanalised Perlins Tanalised
- 16mm T & G rabbets, ends 12mm
- 2 pi in standard with shed roof overhang
- 3 x 2 CLS Tanalised framing
- 4 x 2 Tanalised Perlins Tanalised
- 16mm T & G rabbets, ends 12mm
- 2 pi in standard with shed roof overhang
-
Help please with nested tables
I'm fighting to properly set up the levels of my play on words.
I have 30 levels
var wordLevels:Array = [wordsL01, wordsL02, wordsL03, wordsL04, wordsL05, wordsL06, wordsL07, wordsL08, wordsL09, wordsL1, 0]
wordsL11, wordsL12, wordsL13, wordsL14, wordsL15, wordsL16, wordsL17, wordsL18, wordsL19, wordsL20,
wordsL21, wordsL22, wordsL23, wordsL24, wordsL25, wordsL26, wordsL27, wordsL28, wordsL29, wordsL30]
Each level has 10 words
public var wordsL01:Array = [wordsL1W1, wordsL1W2, wordsL1W3, wordsL1W4, wordsL1W5, wordsL1W6, wordsL1W7, wordsL1W8, wordsL1W 9, wordsL1W10];
Every word is divided into sounds.
public var wordsL2W9:Array = ["th', 'r', 'ee'];
I want to display the score etc. after each level. I think for this I will have to write a loop to generate ten words in a current level and then after each level is completed displays the score etc. before moving on to the next level.
I tried to write the loop for this (see code below), but instead of retracing the 10 words I expected, I had the following in the output panel: Function() {} function
What's wrong in my code? I have marked the relevant bits in red:
package
{
import flash.display.MovieClip;
import flash.text.TextField;
import flash.events.Event;
import flash.utils.Timer;
import flash.events. *;
import flash.events.MouseEvent;
/ public dynamic class WordArray extends MovieClip
{
public var wordtext:wordText = new wordText;
var activeWordArray:Array;
var activeLevelofTenWordsArray:Array;
public var wordsL1:Array = ['elephant', 'a', 'of', 'off', 'walk', 'no', 'got', 'in', 'East', 'it']; This was for testing only, be removed as soon as al levels can be broken up
public var wordsL1W1:Array = ['a'];
public var wordsL1W2:Array = ["h", "a","s"];
public var wordsL1W3:Array = ['o', 'f'];
public var wordsL1W4:Array = ['o', 'f', 'f'];
public var wordsL1W5:Array = ["o", "n"]; / / year so on until wordsL30W10:
public var wordsL01:Array = [wordsL1W1, wordsL1W2, wordsL1W3, wordsL1W4, wordsL1W5, wordsL1W6, wordsL1W7, wordsL1W8, wordsL1W 9, wordsL1W10];
public var wordsL02 //etc up to wordsL30.
public var wordLevels:Array = [wordsL01, wordsL02, wordsL03, wordsL04, wordsL05, wordsL06, wordsL07, wordsL08, wordsL09, wordsL1, 0]
wordsL11, wordsL12, wordsL13, wordsL14, wordsL15, wordsL16, wordsL17, wordsL18, wordsL19, wordsL20,
wordsL21, wordsL22, wordsL23, wordsL24, wordsL25, wordsL26, wordsL27, wordsL28, wordsL29, wordsL30]
private var tf:TextField;
public var letterArray:LetterArray;
public var tileTimer = new Timer (500,384);
the constructor code
public void WordArray(_tf:TextField)
{
TF = _tf;
levelGenerator();
}
function levelGenerator (): void
{
* To obtain a higher level of 10 words
if(wordLevels.Length>0)
{
activeLevelofTenWords(); / / to get the next word
runTiles();
trace ("' level generator works '");
}
on the other
{
Game is complete
}
}
function activeLevelofTenWords (): void
{
activeLevelofTenWordsArray = wordLevels.shift (); //should I add a split here?
trace ("current level of ten words to follow directly reference");
trace (activeLevelofTenWords);
worked up to here, next steps and tests to follow
nextWordF();
}
function runTiles (): void
{
* Run letter tiles Start *.
letterArray = new LetterArray();
addChild (letterArray);
tileTimer.addEventListener (TimerEvent.TIMER, gameLoop);
tileTimer.start ();
/ * function gameLoop(timerEvent:TimerEvent):void public
{
trace ("tile timer started");
letterArray.gameLoop ();
}*/
* end *.
}
function nextWordF (): void
{
if(wordsL1.Length>0)
{
activeWordF();
populateMyWordBox();
}
}
private function activeWordF (): void
{
activeWordArray = wordsL1.shift ().split("");
This table must be sent to the class that checks which letters are clicked (used in this class, if that's where the letters clicked are handled) so the letters clicked can be compared to the elements of activeWordArray.
When clicked letters are completed for that Word, call nextWordF().
}
public void populateMyWordBox()
{
trace ("my Word box place works");
trace (wordsL01);
trace(wordsL1[0]);
trace (wordsL1W1);
TF. Text = activeWordArray.join("");
}
}
}
I saw a typo in:
trace (activeLevelofTenWords);
should be
trace (activeLevelofTenWordsArray);
-
Hi all
Newbie when it comes to PL/SQL tables...
Can someone explain to me why it works and how exactly I can do the following without triggering an error?
I have a function that accepts a PL/SQL table like in parameter.
The PL/SQL table is defined as...
the xxtzg_otl_iface_stg table has many columns including error_message and error_flag. If I find an error, I want to update the error_message and error_flag function. If I can get it works I will then modify the function to return to the table of PL/SQL instead of BOOLEANType TTimeTable is table of xxtzg_otl_iface_stg%rowtype index by binary_integer;
FUNCTION validate_timecard (pTimeTable IN TTimeTable ) RETURN BOOLEAN IS lc_module CONSTANT VARCHAR2(25) := 'validate_timecard'; lEmployeeCount PLS_INTEGER; lEmployeeError VARCHAR2(1000); lErrorCount PLS_INTEGER :=0; BEGIN FOR i IN 1 .. NVL(pTimeTable.COUNT,0) LOOP xxtzg_concurrent_utils_pkg.write_log( p_package => gc_package , p_module => lc_module , p_text => 'Processing timecard for employee_number: '||pTimeTable(1).employee_number ); -- Call validations before submitting the timecard to the API --validate employee begin select count(*) into lEmployeeCount from per_all_people_f where employee_number = pTimeTable(1).employee_number; if lEmployeeCount = 0 then -- Set the errors -- This assignment below does not work, I get an error message saying... --[Error] PLS-00363 (137: 27): PLS-00363: expression 'PTIMETABLE.ERROR_MESSAGE' cannot be used as an assignment target PTimeTable(i).error_message := 'Employee Number '||pTimeTable(1).employee_number||' is not a valid employee'; PTimeTable(i).error_flag := 'Y'; end if; end; END LOOP; IF lErrorCount = 0 THEN RETURN TRUE; ELSE RETURN FALSE; END IF; END;
blue72TA wrote:
FUNCTION validate_timecard (pTimeTable IN TTimeTable ) RETURN BOOLEAN IS ... -- This assignment below does not work, I get an error message saying... --[Error] PLS-00363 (137: 27): PLS-00363: expression 'PTIMETABLE.ERROR_MESSAGE' cannot be used as an assignment target PTimeTable(i).error_message := 'Employee Number '||pTimeTable(1).employee_number||' is not a valid employee'; PTimeTable(i).error_flag := 'Y';
Your table is declared as IN only (the default if you do not explicitly set it), so you are not allowed to change its attributes in all respects, IN = read-only.
If you want to be able to modify the values of a parameter, it must be declared as OUT parameters.
Maybe you are looking for
-
Tecra M4 S435 US Version Bluetooth antenna
Hello This is my first message here. I decided to write, because I'm not sure I'm supposed to use my Bluetooth antenna for. It's a mystery to me. I bought a pre-configured Tecra M4 with a Bluetooth antenna (I don't think it's the same as the Bluetoot
-
Pavilion P7-1510: Get to the bios to enable impossible to reinstall
I had a failed HARD drive and put a new one in but cant boot legacy options (DVD) I guess because the inheritance is not enabled in the bios. It is, all that I can see the bios info is not true bios. The f2/f10/ffffff type shows only information. Eve
-
Outlook Express 6 when you pass the preview pane of mail identities is empty
I use Outlook Express 6 with 2 identities. I use these identities for months. Now, when I pass the identity I open with, I see the list of e-mail messages, but when I click on one, the preview pane is empty and if I double click to open the message
-
WRT160N V2 physical ports seem to be dead... * beep *.
I got this router installed in my home network for about a year. The firmware is updated. Brief description of the home network: Comcast Cable Modem WRT160N v2 2 wireless laptops connected to the router HP Business Inkjet wireless connected to the
-
Waterproofing of Z3 XPERIA failed on me.
Plain and simple, bought my XPERIA Z3 on March 2015. The October 2015 a struct my shorts with my "waterproof" Z3 waves Beach in my pocket. Now, the screen does not turn on and I'm stuck without a phone. Sony ads clearly show scenes underwater ocean o