Type: SQL Query (updated report)
HelloIs it possible by default a value of field in a query SQL (editable report) report region under one form of DML when the user clicks on the button "Add Row"? I want to default of some fields in the value list. It's not as simple as a box of HTML element based on a table, there is a 'Default' tab where the value of the field is going. Any help is appreciated, thanks.
Hello
If you want to use fixed text, and then modify the default Type to: PL/SQL Expression or a function
Then, assign the default setting: 'TEST '.
Including the quotes around the string
Andy
Tags: Database
Similar Questions
-
DA on updatable report items Sql query using the class
Request Express 4.2.5.00.08
10-11 g Oracle
I have a page, so it has a link/button when he clicks then modal region will appear. Modal region has a as a table (Type SQL Query (updateable report)). All work very well so far.
However, I've now added some complex things.
for example. My region is based on the query of SQL Type (editable report).
SELECT id, name of family, Traghetti, area, d_date, start_time, End_time, displacement, role of table where id =: P10_ID;
I can also add a new line of course.
My problem is, (point) Shift display based on the value of Start_Time point) and so I made sure the class for two items.
for example, Start_Time (' class = "st_tm" ') and Maj ('class to = "Shift_time" '). Start_Time is based on (LOV) and shift is off the point in the sql query, but change the Start_Time.
And now, I created the DA.
1. event: change
Selection type: jQuery Selector
jQuery Selector: .st_tm
Condition: No.
1. action: set value
Set type: Expression Javascript
The JavaScript Expression: $(this.triggeringElement) .val ();
The element affected: P10_X1 (it is a hidden item)
2. action: Plsql Code
Code: start to null; end;
Page items to submit: P10_X1
3. action: Plsql Code
Code: start
If: P10_X1 between '03' AND '11' then
: P10_X1: = 'EARLIES ';
elsif: P10_X1 then '12' and '18'
: P10_X1: = 'LATES ';
on the other
: P10_X1: = 'NIGHTS';
end if;
end;
Page items to submit: P10_X1
NOW another DA
Event: change
Article (s) P10_X1
Condition (in list)
value (HASTY, LATES, NIGHTS)
Action:
Set type: Expression Javascript
The JavaScript Expression: $(this.triggeringElement) .val ();
Affected item:
Selection type: jQuery Selector
jQuery Selector:. Shift_time
Well, I look forward all the above work well, but I'm having a problem.
If I have more than 1 lines on a modal region and if I change the Start_Time value for a row then MAJ (point) is changing but he effect on all lines.
I want, if I make the changes on the line line # 2 while only 2 # MAJ (point) must be not performed any other lines?
Help, please!
Kind regards
RI
I found the solution me thank you.
I removed all the DA mentioned above and created a new.
1. event: change
Selection type: jQuery Selector
jQuery Selector: .st_tm
Condition: No.
Scope of the event: dynamic and light on page load.
Action (Javascript code)
ROW_ID = $(this.triggeringElement).attr('id').substr (4);
If ($(this.triggeringElement). val() > = 03 &. val() $(this.triggeringElement))<= 11)="">=>
.Val ('EARLIES') $(«#f11_» + row_id);
}
ElseIf ($(this.triggeringElement). > 11 val() & $(this.triggeringElement). val())<= 18)="">=>
.Val ('LATES') $(«#f11_» + row_id);
}
ElseIf (. val() > $19 (this.triggeringElement)) {}
.Val ('NIGHTS') $(«#f11_» + row_id);
}
also created another DA because I have a disabled report items.
Event: before the page is sent.
$('_:_disabled').removeAttr ("disabled");
and finally created manual process of DML for tabular and everything works fine. (Insert, Update, and delete).
Kind regards.
-
(Updated report) SQL query - may not know how to make one
Hi people,
Can someone tell me how to make a report where the data can be updated? Not an interactive report, SQL report that selects a single row. The only options in the menu dropdown I see are "SQL query" and 'SQL Query (body of function from PL/SQL returning SQL query)', but I have a report elsewhere that says: this type are "SQL Query (updated report)", but I do not remember how :(
Thank you very much
-AdamHi Adam,.
An updated report is a 'tabular form' - see: http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/frm_tabular.htm#CHDFBHDB
Andy
-
Validation of a column in a query SQL-tabular form (updated report)
Hello
I have a tabular form on a table of type SQL Query (editable report). Users can modify/add lines to the table through the form. I would like to have some sort of validation on each column of the report form. Is there a way I can do it by their SUMMIT. Please note that I did not manually create this form... just use the tools in the APEX. Thank you.
SihemIn the same way.
Denes Kubicek
-------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Opal-consulting.de/training
http://Apex.Oracle.com/pls/OTN/f?p=31517:1
------------------------------------------------------------------- -
Top of page justify/format vertical on a region of SQL query report
I have a simple region report, type = SQL query. One of the selected columns is an address in the format which the syntax is shown below:
RTRIM (address_line1| ) "< BR >" || address_line2 || "< BR >" ||
address_line3 || "< BR >" || address_line4 || "< BR >" , "< BR >" )||
"< BR >" || City || ', ' || State || ' ' || Zip_code
It works very well, but he's justifying the vertical center, as is the title of the column. I need both the selected value and the title of the column to be justified high vertical. All the other selected columns are the only line, but it is the only multiline select.
Suggestions on how to achieve this?
Apex v4.2.1.00.08.
Uncle Buck says:
The theme used is "dark blue - 16.
Not a good thing. Very outdated and buggy. Is it a legacy application or one that is (somehow) must take in charge users who use IE6 (or compatibility modes it)? If this isn't the case, strongly recommend that you spend a theme of APEX 4.x standards mode as soon as POSSIBLE.
It would be hard to create a new model, because this model is used by a lot of pages in this application, and they need to all be like.
To get cells aligned at the top using inheritance default: vertical report, watch 1 (exclude null columns) model report in the page CSS Inline property, use the following:
.vertical1 td { vertical-align: top; }
However, I would recommend moving away from using inherited as 'Dark blue - 16' themes and models of integrated by default report. Standards mode APEX 4.x themes and thematic reports patterns will give best results with current browsers.
-
date picker default value appears only not in the sql query
Hello
I have a page as a table with a query similar to the following:
Select emp_name, salary of emp_table where (hire_date) trunc = trunc (to_date (:P42_START_DATE))
where P42_START_DATE is the name of a date picker.
I put the date picker, "only when the current value in session state is null" and the value of being "select trunc (next_day(sysdate,'MON')-7) from dual;"-essentially the Monday of the current week, the type of source. I updated the date to 5 selector and the sequence of the region 10. Now, when I opened this page, no data gets pulled. I checked the source of the page and the value of the entry date picker is used to "November 17, 2008", but is not somehow reflected in the sql query.
Data get retrieved if I put manually the date in the date picker, but I would like that it by default on Monday of this week. What I am doing wrong?
Thank youHello
>
"Article 1 of the Expression value is NULL" where is expression 1
P42_START_DATE
>Yes, that's correct - No. colon is required here as we don't not using the item as a variable binding, just name for the condition. In my tests, I put the calculation for:
Name of article: P31_HIREDATE (put your P42_START_DATE here instead)
Type: SQL query
Point calculation: before header
Calculation: SELECT TO_CHAR (TRUNC (SYSDATE, 'DAY'), 'DD-MON-RR') FROM DUALMy report SQL statement is:
SELECT EMPNO, ENAME, HIREDATE FROM EMP WHERE NVL(HIREDATE, TRUNC(SYSDATE)) < TO_DATE(:P31_HIREDATE,'DD-MON-RR')
My datepicker object has no special parameters - so:
Name: P31_HIREDATE
Display: Date Picker (DD-MON-RR)
Source: Only when...
Source type: static...
The source value or expression: (empty)
Default: (empty)And that's what I did to get: http://htmldb.oracle.com/pls/otn/f?p=55041:31
Change the date that you like or click Reset to clear the cache (the calculation will be then reset the date to the current date and refiltrer the report)
Andy
-
Hello
I have a test_table (col1, col2, col3) on apex.oracle.com.
First of all:
I would like to create report as the type of SQL query:
Select col1, col2, col3 from test_table;
I want to change the properties of the col2 for example the font or color during the generation.
I have to write in the report source code (this is only an example?):
Select col1,
"< span style =" ' make-weight: bold; ' > ' col2 "</span >", "
COL3
from test_table;
I think it's wrong, but I would like to know what are the first principles of the connection between sql and html.
Second:
I create the report in the body of type SQL query return PLSQL function:
Start
return "select col1.
|| "< span style =" ' make-weight: bold; ">" | 'col2' | ' </span >', "
||' COL3
from test_table;';
end;
What is the problem in the two examples? I can't find it in the documentation. Could you tell me something about the principles.
Concerning
Ziut
Hello
One way is to query as
select col1, col2, col3, case when col1 = 'XXX' then 'bold' else 'normal' end as fontweight from test_table;
Column of FONTWEIGHT set as hidden.
Then place the COL2 HTML expression
#COL2#
Kind regards
Jari
-
SQL (body of function from PL/SQL returning the SQL) query when you use to_char
We are trying to build a page of Type SQL Query report (body of function from PL/SQL returning SQL query).
our request is simple, to extract the month of the column recording_date.
declare
l_query varchar2 (1000);
Start
l_query: = 'select to_char (recording_date, 'MM') of re_productive;
Return l_query;
end;
but we would like the following for this query problem
Function returning SQL query: query cannot be parsed in the generator. If you believe that your query is syntactically correct, check the box of generic columns below the source of the region without analysis.
(ORA-06550: line 4, column 42: PLS-00103: encountered the symbol "MY" what awaits one of the following values:.) (* @ % & = - +; <>/ at is mod remains not rem <>or! = or ~ = > = < = <>and or as between | multiset Member SUBMULTISET_ the symbol ".") was inserted before 'MY' to continue.)
Notes:
1 - the request is correct and it has been tested under sqlplus and toad.
2. we tried option use generic name (analysis of query runtime only) column, but we get the same problem.
any quick help please.Hello
You have not escaped your quote in the string. Try this...
DECLARE l_query VARCHAR2(32767); BEGIN l_query:= 'select to_char(recording_date,''MM'') from re_productive'; RETURN l_query; END;
See you soon
Ben
-
Help with APP_USER in SQL query
Hello
I would like to extract a detail of the user in a form of language element DML based on the logged in user and the standard authentication scheme.
I make this request in the element:
The user in the session is equal to the value of the EMAIL. In fact, the value in the session is a capital letter, and the other in the database is tiny. I think that's irrelevant anyway.select ANALYST_FIRST_NAME ||' '|| ANALYST_LAST_NAME d, ANALYST_ID r from QTMT_ANALYST where EMAIL = :APP_USER
The query do not of any value. Could you please let me know what I did wrong?
APEX: 4.2
Item Source type: query SQL (single return value)
Thank you and best regards,
VladimirTo be on the safe side you should uppercase both sides of the equation. It could be that the user name is entered in lowercase.
But if you think that your request is correct, test it by using a literal rather than the user name.
select ANALYST_FIRST_NAME ||' '|| ANALYST_LAST_NAME d from QTMT_ANALYST where upper(EMAIL) = upper(:APP_USER);
for testing purposes, use something like this:
select ANALYST_FIRST_NAME ||' '|| ANALYST_LAST_NAME d from QTMT_ANALYST where upper(EMAIL) = upper('[email protected]');
Published by: Sven w. October 23, 2012 13:30
APEX: 4.2
Item Source type: SQL Query ( return a single value )I just noticed that you use an element that has this as the SQL source. This only works if the sql returns a row and a column only. That's why I removed the second column in your query.
Published by: Sven w. October 23, 2012 13:33
-
Validation of a region defined as a QUERY SQL type (updated report)
Hello
I am trying to perform validation on a region defined as type of QUERY SQL (editable report). The report has two columns.
One of the columns is a Select list and I want to make sure that the user can select the same value twice
in the report. For example, if the selection list has 5 values A, B, C, D, E, I don't want a user to be able to select
B twice in the report. Will it use javascript to perform validation? If Yes, could someone provide some guidance on
where to embed the javascript? Are there other alternatives than javascript? I create an element that came from a sql query
counts the number of lines where the value of the column is the same. I then used the item in my validation logic. The problem with this logic
is that a user can enter the same value and it is not until the 3rd attempt to select the same value that the validation works using the number of lines which is why I think that I need to somehow capture the value of the selection list when a user selects and then compare it to what is already in the database column Select.
I hope that my question and explanations are clear.
Thanks in advance for your help,
MichaelHello
This can be managed using javascript or a validation of the page. Here is an example of use of javascript: [http://htmldb.oracle.com/pls/otn/f?p=267:7]
To do this, I have:
1 - a model of button which does not send the page but just runs javascript. The model will depend on your theme, but should include:
<a href="#BUTTON_ATTRIBUTES#">#LABEL#</a>
If #BUTTON_ATTRIBUTES # appears on the template, delete it as we need it only once. You must create a new button model based on a copy of your existing across models, shared components. Normally, he would show href = "" #LINK # "-we do not want that this would become doSubmit('buttonname')." If your model does not use tags for buttons, you might need to create one from scratch.
2 - I have updated the button on my page to use this template and then assign the setting button attributes:
javascript:check();
3. in the header of the HTML page, I added:
<script type="text/javascript"> function check() { var e = 0; var f = document.getElementsByName("f02"); var k1; var k2; var v1; var v2; if (f) { for (k1 = 0; k1 < (f.length - 1); k1++) { v1 = f[k1].value; for (k2 = (k1 + 1); k2 < f.length; k2++) { v2 = f[k2].value; if (v1 == v2) { e = 1; } } } } if (e > 0) { alert("Duplicates found!"); } else { doSubmit("SUBMIT"); } } </script>
In this example, SUBMIT is the name of the button and "f02" is the name attribute of the select list items that we want to check - change these needs by your page.
Now, when the Submit button is clicked, instead of directly submit the page, the javascript function is called. This function loops through each selection list and gets its value. Then, he compared it to the remaining items. If there is a match, the e flag is set to 1. After all the items have been verified, if e is not 0, then a message appears. Otherwise, the page is sent.
Andy
-
Hey guys,.
I'm using version 4.2.6 apex. The theme is 26.
IM also using Listener Oracle APEX.
I can print my classic report in PDF or CSV format.
But I need to export it as a .xls extension.
Report type: SQL (body of function from PL/SQL returning the SQL) query
I need is like this cause my 'where' clause type is dynamic.
Look at using this method: Tom's Blog: a non-standard export excel 2010 (.xlsx)
I do something similar for downloads to excel in my projects...
Thank you
Tony Miller
Software LuvMuffin
Ruckersville, WILL -
Report of update SQL query with line selector. Update process.
I have a report of update SQL query with the selectors in line.
How to identify line selector in a process update on the page.
I want to update some columns with a value of an area of selection on the page.
With the help of the base:
UPDATE table_name
SET Column1 = value
WHERE some_column = some_value
I would need to do:
UPDATE table_name
SET column1 =: P1_select
WHERE [line selector] =?
Now sure how to identify [line selector] and/or validate it is checked.
Thank you
BobIdentify the name of the checkbox of the source of the page element, it should be of the fxx format (f01, f02... f50).
Suppose that we f01.for i in 1 .. apex_application.g_f01.count loop UPDATE CONTRACTS SET SIP_LOAD_FLAG = :P16_STATUS where
= apex_application.g_f01(i); --i'th checked record' primary key end loop; -
(Updated report) SQL query
Is it possible to convert an existing SQL query report area to an "application SQL (editable report)? If not, where should we do to create a SQL (editable report) region?I had the same problem.
The way I ended up converting my sql to a (editable report) SQL query was:
Create a new page with the type of form and tabular presentation, run through all the steps required Wizard.
Once done, you can go back and modify the report and paste in your original sql code.
Worked for me.
It will be useful.
Jen
Published by: munsej on August 7, 2009 08:42
-
Column headings on PL/SQL return SQL Query report using <; br >;
Hello
I want to create a report region based on a function that returns a SQL query. As a dem oI created the following:
I want to be able to insert a line break in the column heading so that it wraps to two lines. I tried this:create or replace function xxjk_retsql return varchar2 as begin return 'select i "column header" from wwv_flow_dual100'; end;
However, when the region is rendered, it seems to strip on the HTML tag. I also tried another tag, < i > < / i >, as a test and it is deleted also.create or replace function xxjk_retsql return varchar2 as begin return 'select i "column<br>header" from wwv_flow_dual100'; end;
Is it possible to include a pause in a header of column in this way?
Thank youHello:
On the attributes page choose "pl/sql" for the field type.
For the pl/sql function, write something likereturn 'top1
bottom:top2
bottom2:.........';CITY
-
After migrating my APEX 4.1 application to a new environment, one classic report displays a "cannot parse the SQL query: ORA-00942: table or view does not exist" error when the page is displayed. Change the region to report SQL source to somehow (e.g., remove spaces, changing the order of the variables in the WHERE clause) immediately solves the problem, but by returning to the source of the region causes the report error again (the source region valid code without error, however).
Throw the error message:
Select v.id,
v.Col1
of view_vw v
where (: P1_FILTER is null or)
v.col2 = :P1_FILTER)
Do not throw error:
Select v.id,
v.Col1
of view_vw v
where (:P1_FILTER is null or)
v.col2 = :P1_FILTER)
Changing the order of column in the report has the same effect; i.e. He arranges, but return back to the original column order causes the error to display.
It's as if a cached result for the correct select statement used by the report is displayed. However, the application does not use the caching of page/region. Any ideas of what could be the cause?
He solved. Ultimately, all that was necessary was to clear the DB cache using:
alter system flush shared_pool;
Maybe you are looking for
-
IPhone SE cannot receive calls
My Iphone SE just bought 2 days ago may not receive most of the calls, I send back to the city of mac, they replace a new iphone for me but to keep problem. I then contacted my provider, changed my sim card, but the same problem to continue. Any solu
-
Upgrade satellite C670 Pro to win 8 question
I'm confused. On a part of the Toshiba site it says that my laptop is supported for upgrade, but somewhere else, it is not listed. Can someone tell me if I can upgrade safely and that, if necessary, drivers Toshiba, I need to reload. I'm technically
-
Passage of PC portable HP 2000 administrator?
Hello! Please help me if you can, administrator password locks after 3 failed attempts, screen shows: System disabled [85324786] Thank you in advance!
-
Blue screen when using wireless network
Hi, I had a problem with the wireless network. I use the laptop and when I turn it on, blue screen after a few seconds. Here is the info on my comp. (small old model) OS: Windows XP-84 x CPU: Pentium M Graphics: ATI Radeon 200M Network card: 802. 11b
-
Problemas con tarjeta grafica vga
Tengo problemas con tarjeta grafica vga only the wiwndows instale 7 en mi pc tapeworm anteriomente xp ups instale el windows only 7 y al hacerlo el monitor will ve very bad ago incrementar trate the resolución Pero solo me of Québec are 600 * 800 res