Logical operator in datatemplate query
HelloI have trouble writing my questions in a datatemplate. The problem is, when I use the operators logic <>. More precise, my sql query has a condition of inferiority, but when I try to save the datatemplate with my application, I get an error message saying that the datatemplate is invalid.
It is obvious that the characters & lt; and & gt; will result in wells not correct xml, but is there a solution to this?
THX in advance
Kim
Published by: mulder82 on March 30, 2009 01:33
Hello
You can post your data model please?
< and="">not a problem for the xml structure, as they should be inside an element "CDATA".
Like this:
SELECT name
OF THE Department
WHERE dept_no > 10
]]>
Tags: Business Intelligence
Similar Questions
-
Logical operations on a string of bits
Hi, I have a very simple question that I can't seem to understand. I'd just like to perform logical operations (AND, GOLD, etc.) on 2 strings of bits that are 24 bits long each, however I can't find in the palette of functions a function that acts as a binary constant. I see that constant digital and hex functions. You can somone please let me know where I can find it. For example, I would AND ' 111111111111111111111111 '& ' 000000000000000000000000'.
You know the difference between numeric and string data types in LabVIEW? Blue = digital = integer. Pink = string. In the example you linked to, they use an integer constant when the display format is set to "binary". The 'b' of the constant indicates the radix, which in this case is 'binary '. Right-click on a digital constant and you can change its display format. You can select one of the predefined formats or you can specify a by clicking on the option "Advanced Editing Mode. Eligible formats are defined by using LabVIEW. For example
%b = binary
% 8 b = binary, using the width of minimum field of 8, fills spaces (for example, '1101')
% 08 = binary, using 8 minimum field width, filled with zeros (for example, "00001101")
-
Why I don't have the error: ORA-14551: cannot perform a DML operation inside a query
Hello
create table table_1 (phone number)
create or replace function function_a return number is l_rv number; begin l_rv := dbms_random.value(); insert into table_1 values(l_rv); return l_rv; end;
Select double function_a
Now, I get the error:
ORA-14551: cannot perform a DML operation inside a query
ORA-06512: at "FUNCTION_A", line 6
create the table table_2 (phone number)
insert into table_2 select function_a from dual
Now, I make the same mistake. It is to insert records into table_2
Can someone please clarify this?
Database Oracle 12 c Enterprise Edition Release 12.1.0.1.0 - 64 bit Production
Post edited by: O - O added: (select double function_a)
O - O wrote:
To be called from instructions SQL, stored function must obey "purity" following rules, which are intended to control the side effects:
- rule1) When it is called from a
SELECT
statement or a parallelizedINSERT
,UPDATE
, orDELETE
statement, the function cannot change database tables. - rule2) When it is called from a
INSERT
,UPDATE
, orDELETE
statement, the function cannot query or modify database tables modified by that statement.
Can you please explain this? I think that these statements are contradicted with
insert into select double function_a table_2
Now, I make the same mistake. It is to insert records into table_2
When your function is called by a select statement, an error is triggered because of rule1).
When your function is called in an insert statement, no error is raised. The insert does not work in parallel (this is an insert row after all). So rule1) is also not infringed. The insert is on the table2, change table1. Because it does not modify the same table rule2) is not violated. So no reason to trigger an error.
- rule1) When it is called from a
-
Hi all
your help is greatly appreciated...
Calling B.fucntion inside an A.fonctions to insert data into a table.
Here when you call the B.fucntion to insert data in the table... receiver AM a mistakeOmitted in B - SQL Error: ORA-14551: cannot perform a DML operation inside a query...
Can someone please help me to clarify this...
The FUNCTION A(varUPD_TYPE IN VARCHAR2) RETURN VARCHAR2 IS
varRETURN_VALUE VARCHAR2 (25): = NULL;numALLOWED_COUNT PROD. PROCESS_COUNTER. TYPE % ALLOWED_COUNT;
numLAST_COUNT_ADDED PROD. PROCESS_COUNTER. TYPE % LAST_COUNT_ADDED;
dtCHANGE_DATE DATE: = NULL;
varSTMT VARCHAR2 (2000);
bln_Allowed BOOLEAN;
myVar VARCHAR2 (32767).
BEGINIF varUPD_TYPE = "A" THEN
BEGIN
SELECT CH_DATE, LAST_COUNT_ADDED, ALLOWED_COUNT
IN dtCH_DATE, numLAST_COUNT_ADDED, numALLOWED_COUNT
PROD. PROCESS_COUNTER
WHERE NOM_PROCESSUS = "DAILY".
AND COUNTER_IND = A 'IF dtCH_DATE < = trunc (sysdate) THEN
numLAST_COUNT_ADDED: = 0;
END IF;EXCEPTION
WHILE OTHERS THEN
numLAST_COUNT_ADDED: = 0;
numALLOWED_COUNT: = 1;
END;
IF numALLOWED_COUNT > = numLAST_COUNT_ADDED + 1 THEN
bln_Allowed: = True;
varSTMT: = "UPDATE PROD. TMS_PROCESS_COUNTER ';
varSTMT: = varSTMT | ' SET last_count_added = ' | (numLAST_COUNT_ADDED + 1);
varSTMT: = varSTMT | "WHERE nom_processus =" DAILY "';
varSTMT: = varSTMT | "AND COUNTER_IND ="D"';
IF varSTMT IS NOT NULL
THEN
MyVar: = B(96,varSTMT);
PROC_LOG (' CALL B ': myVar);
IF myvar > 0 THEN
NULL;
END IF;
END IF;
On the other
End if;END IF;
EXCEPTION WHEN OTHERS THEN
PROC_LOG ("A failed '");
PROC_LOG (' SQL error: ' |) SUBSTR (SQLERRM, 1, 1000));
RETURNS A NULL VALUE.
PUT AN END TO;The FUNCTION B(numTABLE_ID IN NUMBER, varSQL_STATEMENT IN VARCHAR2) RETURNS NUMBER IS
varINSERT_BATCH_STMT VARCHAR2 (32767): = NULL;
varADD_REC_TYPE BATCH_TABLES. TYPE % ADD_REC_TYPE;BEGIN
INSERT INTO BATCH_STATEMENT (ID, TABLE_ID, STATEMENT, QUEUE_SEQUENCE_ID)
VALUES (Numidian, numTABLE_ID, varSQL_STATEMENT, 1);EXCEPTION WHEN OTHERS THEN
PROC_LOG ('B failed');
PROC_LOG (' SQL error: ' |) SUBSTR (SQLERRM, 1, 1000));
RETURNS - 1;
END B;
Structure of the Batch_statement table:
ID Number (15) not null
number (2) not null table_id
Statement varchar2 (4000) not null
Queue_sequence_id number (5) not nullWhy do you do such coding mess full of bad practices.
Remove the exceptions WHEN OTHERS, you're a turing a mistake in this way, they are bugs and (never) use functions to perform DML.
Functions are not intended for DML. Period.
-
Evaluation of the regular expression with logical operator
Hi all
I am little confused with expression with logical operator evaluation. I'm trying to understand the in expression.
-----
eXa.getTrue () & & eXa.getFalse () | eXa.getFalse () & & eXa.getTrue () | eXa.getFalse () is false and True Count: 1 False Count: 3
According to the agreement, it should be true with True Count: 1 False Count: 3
It must run the 1 getTrue() then 1stGetFalse() and getfalse() then 2nd jump 2nd getTrue() and must run 3rd fetFalse()
-----
eXa.getTrue () & & eXa.getTrue () | eXa.getFalse () & & eXa.getTrue () | eXa.getFalse () is true and true count: 2 False Count: 0
According to the agreement, it should be true with True Count: 3 False Count: 0
He must run getTrue() 2 1 1 getFalse() jump and run 3rd getTrue() and jump the last getFalse().
-----
eXa.getTrue () | eXa.getFalse () & & eXa.getFalse () | eXa.getTrue () & & eXa.getFalse () presents itself as true and true count: 1 False Count: 0
According to the agreement, it should be true with True Count: 2 False Count: 2
It must run 1 getTrue() and jump getFalse() 1st run 2nd getFalse() and then run getTrue() 2nd and 3rd then getFalse()
Please, help me understand above expressions.
Here is the definition of methods:
Private boolean getTrue() {}
trueCount ++;
Boolean retrunValue = 4 > 3;
Return retrunValue;
}
Private boolean getFalse() {}
falseCount ++;
Boolean retrunValue = 3 > 4;
Return retrunValue;
}
Thanks for your help>
added parentheses to make order of the most obvious BSP. adding a "?" to show calls not executed.
(eXa.getTrue() && eXa.getFalse()) || (eXa.getFalse() && eXa.getTrue()) || eXa.getFalse() comes as false and True Count: 1 False Count: 3 (T && F) = F (F && ?) = F (F) = F F || F || F = F (eXa.getTrue() && eXa.getTrue()) || (eXa.getFalse() && eXa.getTrue()) || eXa.getFalse() comes as true and True Count: 2 False Count: 0 (T && T) = T (? && ?) = ? (?) = ? T || ? || ? = T eXa.getTrue() || (eXa.getFalse() && eXa.getFalse()) || (eXa.getTrue() && eXa.getFalse()) comes as true and True Count: 1 False Count: 0 (T) = T (? && ?) = ? (? && ?) = ? T || ? || ? = T
-
Logical operators in the query select Oracle
Hi all
Can I use the logical operators in queries select oracle?
for 1 and 0 = 0; 1 or 0 = 0
If I have a 1010 value two fields in a table COL1 and COL2 have a value of 0001.
Is it possible to use select col1 or col2 from table? where or is a logical operator.
Kind regardsselect bitand(6,8) from dual; BITAND(6,8) -------- 0
-
Cannot perform a DML operation inside a query
I want to run this SQL Developer
Set serveroutput on;
Select * from table (DOKUMENTACIJA.izvedi_import ('IID', 'ZKET', 'ZKET_BANKE', 'ZKES'));
but I get "rowid: AAAmigAAEAAAI/Vrammmm ZKET_BANKE DATUM_SPREMEMBE-14551 ORA-14551: cannot perform a DML operation within a query.
I read I need variable var, but I don't know how.
concerningdeclare v EMPARRAY_BV; begin v := DOKUMENTACIJA.izvedi_import('ZKET_BANKE', 'IID', 'ZKET', 'ZKES'); end;
According to the definition of EMPARRAY_BV, you could write something to show content...
-
Logical operations in SQL decode function?
Hello
Is it possible to perform logical operations in SQL decode function
as
' > '
' < '
' > ='
' < ='
'<>'.
not in
in
non-null
a null value
for example...
Select col1, order_by, decode (col1, > 10, 0, 1)
tab;
Select col1, order_by, decode (col1, <>0, 10, 1)
tab;
Select col1, order_by, decode (col1, not in (10,11,12), 0, 1)
tab;
Select col1, order_by, decode (col1, is set to null, 0, 1).
tab;
Kind regards
infantry
Published by: user780731 on April 30, 2009 12:07 AM
Published by: user780731 on April 30, 2009 12:07 AM
Published by: user780731 on April 30, 2009 12:08 AM
Published by: user780731 on April 30, 2009 12:08 AM
Published by: user780731 on April 30, 2009 12:09 AMexample:
select col1 ,order_by,case when col1 > 10 then 0 else 1 end from tab; select col1 ,order_by,case when col1 <> 10 then 0 else 1 end from tab; select col1 ,order_by,case when col1 not in (10,11,12) then 0 else 1 end from tab;
Regarding testing for null, decode the handles which, by default, anyway, so that you can get decode or case easily...
select col1 ,order_by,decode (col1, null , 0 , 1) from tab; select col1 ,order_by,case when col1 is null then 0 else 1 end from tab;
-
Hello! Recently, at work, I was responsible for creating the code that returns something on two Boolean State. Something like: If Boolean has and Boolean B, return if Boolean is and B no Boolean etc something else.
At first I thought that the best way to do it would be a formula node with the return value is passed through a bunch of if else statements. Then I discovered that Booleans are not supported in notes formulas and forms knots are designed for writing formulas, and not for current programming, that makes sense.
I came with two ways to do it, but I felt that they were both quite stocky and they suck if I had more than 2 Boolean values my logic on the basis. Here is the code with the two different methods.
I feel like this is an operation that would be much better to do it in an if else statement in code and I would like to know if there is a better way to do this in LabVIEW.
Typical in LabVIEW is to combine Boolean both in a table, then use of the boolean to number table. This will give you a value between 0 and 3 (included). You can use a single case statement, or you can create a table of values of output desired and use it as an index in the table, or if there is a direct mapping of the enum, you can simply convert that number to the enumeration type.
-
String separated by commas to 'IN' operator in SQL query
Hello
The issue is that the "In" operator in the report query accepts values contained in the element of page Apex... 221,332,542.
Is there a common solution for this problem?
Thank you
Patrick
984146 wrote:
The issue is that the "In" operator in the report query accepts values contained in the element of page Apex... 221,332,542.
It's the common "variable list" model [anti-]. In
select * from table where columnvalue in (7788, 7839, 7876)
(7788, 7839, 7876)
is a list of expressions and the predicate is evaluated as a membership condition.In
select * from table where columnvalue in :P1_X
:P1_X
is a scalar string, unable to contain multiple values.In a report of type APEX, a source report of the body of the PL/SQL function returning a SQL query with lexical substitution can be used to produce a "variable list:
return 'select * from table where columnvalue in (' || :P1_X || ')';
where
P1_X
contains less than 1000 values, has been disinfected to code SQL injectionand string values are properly cited.Some people suggest the following approach, that will work also in interactive APEX reports:
select * from table where instr(':' || :P1_X || ':', ':' || columnvalue || ':') > 0
However, it is underperforming because it eliminates the possibility of using the index optimizer or the size of the partition in the execution plan.
See various elements in the list to ask Tom and imitating the channel to the table using sql features for effective solutions.
-
Accounts question: logical operator
Hi all
When I select 'Function' in the menu drop-down menu in the drop-down list box operator on the screen of the logical group of FDM 11.1.3, I get the following error:
The operator must be between 1 and 5 characters.
Why this error is coming?
I use a type of simple logical group.
I created a simple logic account to map to an account only source in my file to the input source.
Is this a bug?
Anyone of you has this encountered as well?
Thank you
ColDFireRead this article KM. The solution is here:
https://support.Oracle.com/CSP/main/article?cmd=show&type=not&DOCTYPE=problem&ID=963032.1
-
date function with logical operator does not...
Hi all
I saw table FINYEAR that having all the details of the fiscal year of the company. I have in my procedure according to user input identify current fiscal.
Data in table FINYEAR...
PATHDESC FDATE LDATE CID CLOSING YEAR April 1, 2010 to March 31, 2011 01/04/2010 31/03/2011 BCDTRA0003 H April 1, 2011 to March 31, 2012 01/04/2011 31/03/2012 BCDTRA0003 H April 1, 2012 to March 31, 2013 01/04/2012 03/31/2013 BCDTRA0003 H April 1, 2013 to 31 March 2014 01/04/2013 31/03/2014 BCDTRA0003 S March 31, 2015, 1 April 2014 01/04/2014 31/03/2015 BCDTRA0003 "I have two parameter in the procedure F_DATE = January 1, 2013 ', L_DATE = March 30, 2013.
Above the entrance I must identify period are what financial year.
Result must be this line... bcz F_DATE and L_DATE are with the fiscal year 2012-2013...
April 1, 2012 to March 31, 2013 01/04/2012 03/31/2013 BCDTRA0003 H I try with the query below, but no luck... Please help in this regard
Select * from finyear where
Fdate < to_date('01/01/2013','DD/MM/RRRR')
and ldate < to_date('30/03/2013','DD/MM/RRRR') and cid = "BCDTRA0003";
Try this:
SELECT * FROM finyear
WHERE the to_date('01/01/2013','DD/MM/YYYY') BETWEEN fdate ldate AND
AND to_date('30/03/2013','DD/MM/YYYY') BETWEEN fdate ldate AND
AND cid = "BCDTRA0003";
-
Hello
Why there is no way to set or logical restrictions for generic types?
public class MyClass{ //you can add to this set only integers or strings, at runtime this set contains objects private Set<? extends integer || String> mySet; }
Why there is no way to set or logical restrictions for generic types?
Because there is no way to use the resulting code, unless there is an interface or a common, whereby base class case is what you specify, is why the language gives you only a means to do so.
-
Hi all
I have a table with columns
LUN MAR SEA GAME FRI SAT SUN
-----------------------------------------------------------
Y................ ........ Y..................
I need selected the SUN column, which is Sunday.
Along with this, I need to select columns, Tue
THU a value so I do not need that
If I select the SEA then I needed game, sat, Sam also
pls can u help on this.
Published by: 881121 on April 5, 2013 23:13This seems the most populous wire, only the moderator suggested to stick. Related: {: identifier of the thread = 2522286}
with the_table as (select id_,sun,mon,tue,wed,thu,fri,sat from (select 1 id_,'Y' sun,'N' mon,'N' tue,'Y' wed,'N' thu,'N' fri,'N' sat from dual union all select 2 id_,'N' sun,'Y' mon,'N' tue,'Y' wed,'N' thu,'N' fri,'N' sat from dual union all select 3 id_,'N' sun,'N' mon,'N' tue,'N' wed,'N' thu,'Y' fri,'N' sat from dual union all select 4 id_,'N' sun,'N' mon,'Y' tue,'Y' wed,'N' thu,'N' fri,'Y' sat from dual ) ) select id_,the_day,dow, nvl(lead(dow,1) over (partition by id_ order by dow), first_value(dow) over (partition by id_ order by dow) ) next_dow from (select id_,the_day,day_value,dow from (select id_,'sun' the_day,sun day_value,1 dow from the_table union all select id_,'mon' the_day,mon day_value,2 dow from the_table union all select id_,'tue' the_day,tue day_value,3 dow from the_table union all select id_,'wed' the_day,wed day_value,4 dow from the_table union all select id_,'thu' the_day,thu day_value,5 dow from the_table union all select id_,'fri' the_day,fri day_value,6 dow from the_table union all select id_,'sat' the_day,sat day_value,7 dow from the_table ) start with day_value = 'Y' connect by dow = prior case when dow + 1 > 7 then dow - 6 else dow + 1 end and id_ = prior id_ and day_value = 'N' and level <= 7 ) where day_value = 'Y' order by id_,dow
Concerning
Etbin
-
Explain the operation of the query
Select * from student where 1 = (select count (*) from student b where b.age > a.age) .kindly explain the workings of the application. I don't understand the use where the clause (where 1 =)Select count (*) from...
should return 1. Thus, the student, you are looking for has only an older student.
Maybe you are looking for
-
Apps will not download or update
Recently, I had problems with the download and update applications with the air of my ipad 2 (iOS 9.2.1). Before that I have to wait a few hours until an app going to start update but now nothing does will be update or download. My internet is quite
-
Problems with drivers ATI 5650
Well, here are my questions: What were the latest official drivers for the Radeon Mobility from ATI/AMD are not supported with the HD 5650 on laptops Toshiba (Win 7 Pro x 64). It says it on the download page on the AMS website. I also tried the insta
-
Hello While doing the update for Power DVD media player that came with my system I accidentally deleted the program! How can I get that back? Thank you. B lueskygal
-
HP Officejet Pro 8600 Premium: change email address on eprint
I received a used HP Officejet Pro 8600 Premium as a gift. How can I change the email to th ePrint adreess, without knowing the old password?
-
Power supply is turned on, but not fans.
I have a Gateway with Vista Home 5478. My power supply is on, but the vista system will not start. The power light is on, but that's all. I also noticed that all fans, including the fans inside my diet, are dead. I changed power supplies, increased f