Verify if a report has a null column value with JavaScript ?
Hi,
I have report. User can add new rows through a form. Before the user leaves the application I would like to use JavaScript to check if a certain column has some null values. I built my JavaScript for the before logout and it's working properly, but I need to retrieve if that column has some null values, how can I do that ? This field isn't a mandatory one, but I would just like to alert the user.
Thank you.
You can also use a TRIM function in Answers. Go to the column in question, click on the fx button and then on the Function button. Click on String and you will see TrimLeading, TrimTrailing and TrimBoth. Use TrimTrailing on your column and you should be good to go.
Similar Messages
-
Column values with invalid characters
How to find the column values with invalid chararcters
meaning value upper(col) not in ('ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890')
For ex.
1. CDAssyKit,DragonNaturallySpeaking�Preferred7.0,USEnglish
2. CDAssyKit,DragonNaturallySpeaking Preferred7.0,USEnglish
Query should retrieve only the first row, since it has extra � character in the column value.
Thanks for your help.Convert all letters and numbers to an arbitrary letter and then remove that letter. If there are any characters left, they are invalid according to your rules.
select *
from t
where replace(translate(lower(column_name), 'abcdefghijklmnopqrstuvwxyz0123456789', 'a'), 'a') is not null; -
Return two columns values through Javascript
In the same goal as:
onclick="$s('P1_DEPTNO', #DEPTNO#); return false;"
to return a column value through javascript, is it possible to return 2 values? Example:
onclick="$s('P1_DEPTNO', #DEPTNO#); $s('P1_EMP, #EMPLOYEE#);return false;"
Thanks all :)
MaxMaxime Carrier wrote:
In the same goal as:"Goal"?
onclick="$s('P1_DEPTNO', #DEPTNO#); return false;"
to return a column value through javascript, is it possible to return 2 values? Example:
onclick="$s('P1_DEPTNO', #DEPTNO#); $s('P1_EMP, #EMPLOYEE#);return false;"Have you tried it?
This code contains a syntax error in the form of a missing quote. It should be:
onclick="$s('P1_DEPTNO', #DEPTNO#); $s('P1_EMP', #EMPLOYEE#);return false;"It might also produce JS syntax errors if the <tt>#DEPTNO#</tt> and/or <tt>#EMPLOYEE#</tt> values are not numbers.
onclick="$s('P1_DEPTNO', '#DEPTNO#'); $s('P1_EMP', '#EMPLOYEE#'); return false;"would therefore be safer (assuming the code is somewhere that <tt>#DEPTNO#</tt> and <tt>#EMPLOYEE#</tt> will be substituted).
Your post is spectacularly lacking in context. Why do you want to do this? Where?
When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
<li>Full APEX version
<li>Full DB/version/edition/host OS
<li>Web server architecture (EPG, OHS or APEX listener/host OS)
<li>Browser(s) and version(s) used
<li>Theme
<li>Template(s)
<li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
Following the guidelines in these documents will also help to explain the problem in much more detail and with sufficient background for it to be understood:
<li>+How to ask questions+
<li>+{message:id=9360002}+ -
How can I replace column value with a particular value in SQL
Hi All,
Can anyone please tell me how can I format my output with replacing a column value with a specific value which actually depends on the present value of the column
I am executing the following SQL statement
select state,count(id) from <table_name> where composite_dn= <composite_dn_name> group by state;
My Present output is:
State No.Of Instance
1 3
3 28
I want to replace the value in the column state as follows
State No.OfInstances
Completed 3
Faulted 28
I want "1" to be reppaced by "Completed" and "3" to be replaced by "Faulted"
Is is possible with SQL or PL/SQL , if it is then how can I achieve this required result. Please help!!
Thanks in Advance!!
Edited by: Roshni Shankar on Oct 27, 2012 12:38 AMHi Roshni,
I guess this CASE clause can be simulated by a DECODE and also it is very easy to use.
Refer -- http://www.techonthenet.com/oracle/functions/decode.php
select decode(t1.state,t2.state_id,t2.state_name), t1.count_id
from <table_2> t2, (select state,count(id) count_id
from <table_name>
where composite_dn= <composite_dn_name>
group by state) t1
where t1.state = t2.state_id;HTH
Ranit B.
Edited by: ranit B on Oct 27, 2012 2:02 PM
-- link added
Edited by: ranit B on Oct 27, 2012 2:19 PM
-- sample code added -
Reg : Concatenation of a column value with multiple rows... URGENT
Hello,
Could any of u help me in concatenating a column value with
multiple rows ???
For ex : I've the following data from emp table :
DEPTNO ENAME
10 KING'S
30 BLAKE
10 CLARK
10 TOM JONES
30 ALLEN
30 JAMES
20 SMITH
20 SCOTT
20 MILLER
10 MILLER
20 rajeev
I want the following output :
deptno Concat_value
10 KING'S,CLARK,TOM JONES,MILLER
20 Rajeev,MILLER,SMITH,SCOTT
30 BLAKE,ALLEN,JAMES
Thanks in Advance,
SriniHello Naveen,
Thanks for ur answer. But I need a single SQL query for getting
what I want. I know the solution in PL/SQL.
Please try it in a single SQL....
Thanks again,
Srini -
XMLGEN: Produce XML dump of a table WITH tags for null column values
I am new to generating XML so bear with me....
We have a customer who needs an XML extract of data, including tags for any column that is null.
I created a simple test case below using DBMS_XMLGEN.getXML. The first row (A1) has no null values and thus tags for columns A, BEE and CEE are produced. The second row (A2) has null in column BEE and thus tags for only columns A and CEE are produced.
Is there a way to force a tag for null column BEE in the second row?
create table foo (A varchar2(10), BEE number, CEE date);
insert into foo values ('A1',1,sysdate);
insert into foo values ('A2',null,sysdate);
SELECT DBMS_XMLGEN.getXML('SELECT * FROM foo') FROM dual;
<ROWSET>
<ROW>
<A>A1</A>
<BEE>1</BEE>
<CEE>27-SEP-12</CEE>
</ROW>
<ROW>
<A>A2</A>
<CEE>27-SEP-12</CEE>
</ROW>
</ROWSET>What's the database version? (SELECT * FROM v$version)
Could you use this instead :
SQL> select xmlserialize(document
2 xmlelement("ROWSET",
3 xmlagg(
4 xmlelement("ROW",
5 xmlelement("A", a)
6 , xmlelement("BEE", bee)
7 , xmlelement("CEE", cee)
8 )
9 )
10 )
11 -- for display purpose only :
12 as clob indent
13 )
14 from foo
15 ;
XMLSERIALIZE(DOCUMENTXMLELEMEN
<ROWSET>
<ROW>
<A>A1</A>
<BEE>1</BEE>
<CEE>2012-09-27</CEE>
</ROW>
<ROW>
<A>A2</A>
<BEE/>
<CEE>2012-09-27</CEE>
</ROW>
</ROWSET>
Or,
SQL> select xmlserialize(document
2 xmlquery(
3 '(#ora:view_on_null empty #)
4 {
5 <ROWSET>{fn:collection("oradb:/DEV/FOO")}</ROWSET>
6 }'
7 returning content
8 )
9 as clob indent
10 )
11 from dual;
XMLSERIALIZE(DOCUMENTXMLQUERY(
<ROWSET>
<ROW>
<A>A1</A>
<BEE>1</BEE>
<CEE>2012-09-27</CEE>
</ROW>
<ROW>
<A>A2</A>
<BEE/>
<CEE>2012-09-27</CEE>
</ROW>
</ROWSET>
(where "DEV" is my test schema)
If you want to stick with DBMS_XMLGEN, you're gonna have to use PL/SQL and setNullHandling procedure.
Edited by: odie_63 on 27 sept. 2012 17:14 -
Crystal Reports XI - How to pull same column value with different select...
I have a report with many (around 30) sub reports and it is giving serious performance issue. I am currently finding out a strategy to improve the performance. I see that most of the sub reports are taking same parameters from main report except for one parameter which is different for each sub report and hard coded in them and pulling up the same column value from a oracle database with a different select criterion. I am trying to find out a way using either of command/crystal formula/SQL expression which can do the same job for me and give me performance improvement. I tried to take the parameters from the main report in one sub report and mapped them to parameters being transferred to the command and then drag and drop the field for which I need to display the value but due to some reason it is not returning values when I am trying multiple commands...I need some help in selecting a strategy for this issue resolution and some guidance....Any help would be highly appreciated....
My version is 11.5.8.826. First of all I need to make it clear that I have 6 set of sub reports and each set has 5 sub reports. So if I can resolve the issue for one set, I resolve it for all. The sub reports are doing nothing but fetching a column value using a simple SQL SELECT query and appending to the right of a box in main report. The issue is that all these queries embedded into the sub reports are using same SQL except for one parameter in the "where" clause and they are fetching same column value from the database and fortunately all of them are returning same number of results. So at the end these results create a table when run. The only way I can stop using sub reports is by creating a table in the main report and use some object(formula/command/SQL expression or whatever) to fetch that column value using the same filter conditions. But please take a note that I need to use and append the same column value from a database table and use different filter conditions and append them to the right so that at the end they create a table...as long as I get the table in the output with a decent performance , anyone will be least bothered about what I used inside the report.....please ask me as many questions to get more lights on the issue....
-
Using '=' to check for NULL column value
We are currently encountering an issue where 10.1.0.5 is happily accepting a check on a column for a null value with what I have always known to be an invalid syntax.
For instance:
select col1 from my table where col1=null
Although this is wrong and we are working on locating the queries formatted as such, what I am wondering is why is it working on the 10.1.0.5 version but we cannot get the same query to execute on 8i, 9i, 10.2.0...? Is there a flag that can be enabled to allow this compare?I am familiar with the correct syntax to be using. What I am looking for is a possible explanation as to why the query below returns the correct results on 10.1.0.5 and returns nothing in all other versions. I would expect the same behavior across all instances. See the two lines in bold "AREA=NULL" and "SUBAREA=NULL"
SELECT DISTINCT
UNIQID,
MGRCOMMENT,
REQ.CREATED_BY CREATED,
C2.CNAME DEVELOPER,
C5.CNAME PRODMGR,
C3.CNAME ASSIGNED,
C4.CONTACTID CURRENTUSER,
ID,
STATUSNAME,
REQ.STATUS STATUSID,
PRIORITYNAME,
TITLE,
MAS1.MODULENAME,
MAS1.AREANAME,
MAS1.SUBAREANAME,
MIN1.MODULE,
MIN2.AREA,
MIN3.SUBAREA
FROM REQ,
PRIORITY,
STATUS,
(SELECT FIRST_VALUE(M1.MODULENAME)
OVER (PARTITION BY REQUNIQID ORDER BY MODULENAME ROWS UNBOUNDED PRECEDING) MODULENAME, FIRST_VALUE(A1.AREANAME)
OVER (PARTITION BY REQUNIQID ORDER BY AREA ROWS UNBOUNDED PRECEDING) AREANAME, FIRST_VALUE(SA1.SUBAREANAME)
OVER (PARTITION BY REQUNIQID ORDER BY SUBAREANAME ROWS UNBOUNDED PRECEDING) SUBAREANAME, REQUNIQID
FROM REQMOD, MOD M1, ARA A1, SBARA SA1
WHERE M1.MODULEID = REQMOD.MODULE
AND A1.AREAID = REQMOD.AREA
AND SA1.SUBAREAID = REQMOD.SUBAREA) MAS1,
(SELECT FIRST_VALUE(C2.CNAME) OVER (PARTITION BY REQUNIQID ORDER BY CNAME ROWS UNBOUNDED PRECEDING) CNAME, REQUNIQID
FROM REQ_ASSIGN, CONTACT C2
WHERE C2.CONTACTID = REQ_ASSIGN.CONTACTID
AND ASSIGNMENT_TYPE=2) C2,
(SELECT FIRST_VALUE(C5.CNAME) OVER (PARTITION BY REQUNIQID ORDER BY CNAME ROWS UNBOUNDED PRECEDING) CNAME, REQUNIQID
FROM REQ_ASSIGN, CONTACT C5
WHERE C5.CONTACTID = REQ_ASSIGN.CONTACTID
AND ASSIGNMENT_TYPE=1) C5,
(SELECT FIRST_VALUE(C3.CNAME)
OVER (PARTITION BY REQUNIQID ORDER BY CNAME ROWS UNBOUNDED PRECEDING) CNAME, REQUNIQID
FROM REQ_ASSIGN, CONTACT C3
WHERE C3.CONTACTID = REQ_ASSIGN.CONTACTID
AND ASSIGNMENT_TYPE<>2
AND ASSIGNMENT_TYPE<>1) C3,
(SELECT DISTINCT REQUNIQID, CONTACTID FROM REQ_ASSIGN WHERE CONTACTID=5) C4,
(SELECT DISTINCT REQUNIQID, MODULE FROM REQMOD WHERE MODULE=1) MIN1,
*(SELECT DISTINCT REQUNIQID, AREA FROM REQMOD WHERE AREA=NULL) MIN2,*
*(SELECT DISTINCT REQUNIQID, SUBAREA FROM REQMOD WHERE SUBAREA=NULL) MIN3,*
REQCOMMENTS
WHERE PRIORITY.PRIORITYID = REQ.PRIORITY
AND STATUS.STATUSID = REQ.STATUS
AND MAS1.REQUNIQID = REQ.UNIQID
AND C2.REQUNIQID = REQ.UNIQID
AND C5.REQUNIQID = REQ.UNIQID
AND C3.REQUNIQID = REQ.UNIQID
AND C4.REQUNIQID = REQ.UNIQID
AND MIN1.REQUNIQID = REQ.UNIQID
AND MIN2.REQUNIQID = REQ.UNIQID
AND MIN3.REQUNIQID = REQ.UNIQID
AND REQCOMMENTS.REQUNIQID = REQ.UNIQID
AND REQ.PROJECTID = 3; -
I want to display one column values with multiple symbols
i am created one report.
my column name is offshore & on shore i want display 3 values with % symbol, then i want show 4 th value as $ 2000,
but it was allowing only one format $ or % but i need to display symbols with my values.Try the following :
give a name to the following formula like @getvalue
Numbervar x;
if
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("ANI"), CurrentSummaryIndex) = 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Offshore Other"), CurrentSummaryIndex) = 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Syntel"), CurrentSummaryIndex)= 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Employee"), CurrentSummaryIndex) = 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Contractor"), CurrentSummaryIndex) = 0 and
//(GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Mgt consult"), CurrentSummaryIndex) = 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Clerical"), CurrentSummaryIndex) = 0 and
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Other"), CurrentSummaryIndex) = 0
then
x:=0
else
x:=(GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("ANI"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Offshore Other"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Syntel"), CurrentSummaryIndex))
(GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("ANI"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Offshore Other"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Syntel"), CurrentSummaryIndex)+
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Employee"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Contractor"), CurrentSummaryIndex) +
//GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Mgt consult"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Clerical"), CurrentSummaryIndex) +
GridValueAt(CurrentRowIndex, GetColumnPathIndexOf("Other"), CurrentSummaryIndex)
) * 100
Now create a new formula and check the value of the above formula :
if {@getvalue} > 50 Then
"$"&{@getvalue}
else
{@getvalue}&"%"
Hope this will resove the issue.
Thanks,
Sastry -
Filter column value with special characters
HI,
I have a table table1 with a varchar column column1 having a value(ASW'JK'TH)(the column value itself has special charater'').Please help me with a quwery to filter this value
Regards
ASwathydb version is 11g:
in_identifer VARCHAR2 (200) := q'[RM'2007'29]';
I need where condition for a tabel coumn with teh above value -
Comparing two column values with multiple Parameter in VC (Indicator)
Hello VC experts,
GM
I would like to know about how to indicate multiple parameter with different colour in same column and also comparing value with adjucent column.
Eg.
Parameters ,, Column1 ,, Column 2 ,, Indicator (Image)
Parameter 1 ,, a1 ,, b1 ,, RED
Parameter 2 ,, a2 ,, b2 ,, GREEN
Parameter 3 ,, a3 ,, b3 ,,
Parameter 4 ,, a4 ,, b4 ,,
In case I : Parameter -1 Column 1 ( value) = more is better compared to Column 2
In case II : Parameter -2 Column 1 ( value) = Less is better compared to Column 2
How to acheive this INDICATOR based value comparison.
Edited by: Sunil B. Mundhe on Mar 7, 2009 6:30 AM
Edited by: Sunil B. Mundhe on Mar 7, 2009 6:38 AMHi
This is possible in VC. You have to insert 'Image' UI in the required table. Add images of alert through 'Image manager' (Tools tab). Select relevant images of alert in 'Image' UI. In display there is option for 'visibility condition' there you enter condition (like if greater than ,true,false).
Like wise you can add multiple 'Image' UIs in that table & based on visibility conditions you will get these alert images in table.
Regards
Sandeep -
Create multiple sheets in report based on distinct column values
Hello all,
We are using BOXI 3.1. I have a request from my users for which i cannot find a solution. The problem is i have a query and in a a column i have lets say 10 distinct values. For each of those values i need to generate a report within a report (a new sheet in report) that has data for only this value and schedule this to the users so they get excel file with many sheets.
Is that even possible with BO? How can i approach this problem?
My current solution is I generate 1 report and schedule it to excel file which gets delivered to users. Then i have a macro in excel that is on a network. The user then runs this VBA macro and it generates new sheets in excel. They are not satisfied with this solution :S .
I know webi doesnt use VBA and deski is EOL. Is there any other solution?
Regards, MartinHi,
From the first view this is not what i had in mind. But i will take a look at this too.
Any other suggestions?
tnx. M. -
Display rows which has only unique column values
One of my table has the following data in it.
ORDER_NO IND_CODE
1002 DNA
1004 GEN
1005
1007 DNA
1008 DNA
1009 GEN
1010
1000 NULL
1001 NULL
1003 NULL
1006 NULL
1000 ZZZ
1005 ZZZ
I just want to display the rows with unique ORDER_NO.
SarvanYou have 1000 as duplicate values in the column. But both have different indcode.
Select distinct order_no from [table name]
If you need combination of order_no and ind_code as unique then .
Select distinct order_no, ind_code from [table name] -
Print a PDF report having a field(column table) with a HTML code
hello every one,
I have a table where a column(varchar2) have HTML code inside it.
Because all my reports are in PDF format, how can I print this column, when I print in PDF I see all HTML tag and it isn't formatted.
Have Anyone same problem, could I convert in PDf before I print it?
Thanks in advance for helpYou need to set "Contains HTML tags" to YES, so that the HTML code is formated in the report.
It is a property of the field. -
Update all null columns value in single row statement
4) Write a single SQL statement to update all the columns of a table to have -9 instead of null value
e.g:
Before update:
C1 C2 C3
null 9 null
10 null 88
12 8 0
After update:
C1 C2 C3
-9 9 -9
10 -9 88
12 8 0
ThanksHi,
Update < table name >
set column name = nvl(column name, -9),
column name = nvl(column name, -9)
Regards
Message was edited by:
Seshu
Maybe you are looking for
-
I accidentally uninstalled Quicktime from my computer so my Itunes was not functioning. It told me to uninstall my Itunes, then reinstall it. Which I did. Trouble is, now it comes up with 'THE FILE "ITUNES LIBRARY.ITL" CANNOT BE READ BECAUSE IT WAS C
-
Cannot install software for printer m521dn
Hello! I have a problem, trying to install software for HP lj pro m521dn. Tried to use both Full Solution and basic print and scan drivers installer. OS is Win7 enterprise x64. Connection with printer is network. When installing, progress bar reaches
-
Does tangasol provide some setting to restrict response datasize of a query
We are are using tangasol caching in our application, we have around 10-15 GB of data. My cache cluster consists of 7 nodes (7 linux box, each box has 10 jvms). Some of the clients application connect to our cache as a remote client and query data (u
-
Photosmart 3110 scanning software on Windows 8.1
hiya. I can get the printer side of it working but I'm unable to install the scanning software for this device. I've tried running it in compatibility mode to no avail. Is there some way of getting it working otherwise I can't use it as a scanner?
-
I tried to download the game and it said the following disk images couldn't open
the following disk images couldn't be opened TOT_Mac_installer_HI- not recognized what i need to install to open this program ? this game i bought as download but i am not able to open it thanks, madeline