Logical operator in datatemplate query
Hi,
I'm having trouble writing my queries in a datatemplate. The problem is, when I have to use the logical operators <>. More specific, my sql query has a less than condition, but when I try to save the datatemplate with my query, I get an error message saying that the datatemplate is invalid.
It's obvious that the characters < and > will result in non well formed xml, but is there any solution to this?
Thx in advance
Kim
Edited by: mulder82 on Mar 30, 2009 1:33 AM
Hi,
Can you post your data template please?
< and > don't pose a problem for the xml structure because they should be inside a "CDATA" element.
Like this:
<dataTemplate name="dataTemp">
<parameters>
<parameter name="P_PARAM" dataType="character" defaultValue=""/>
<parameter name="P_PYS_ID" dataType="character" defaultValue=""/>
</parameters>
<dataQuery>
<sqlStatement name="Query1">
<![CDATA[
SELECT name
FROM dept
WHERE dept_no > 10
]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="G_Dept" source="Query1">
<element name="dep_name" value="name"/>
</group>
</dataStructure>
</dataTemplate>
Similar Messages
-
How to use varaible in place of logical operator in query
Hi Experts,
How can we use a variable in place of logical operator (OR, AND) ?
For ex:
select * from sflight where carrid = 'LH' AND connid = 100.
data x type string.
x = 'AND'.
Now, I want to replace AND with the variable x.
Query will be:
select * from sflight where carrid = 'LH' x connid = 100.
I am doing this because user can select any logical operator while creating the search criteria at run time .
I already tried this but i am getting following compilation error:
Error: Incorrect expression used in place of logical expression.hi,
Check out this sample code
Display of flight connections after input of airline and flight number:
PARAMETERS: carr_id TYPE spfli-carrid,
conn_id TYPE spfli-connid.
DATA: where_clause TYPE STRING,
and(4),
wa_spfli TYPE spfli.
IF carr_id IS NOT INITIAL.
CONCATENATE 'CARRID = ''' carr_id '''' INTO where_clause.
and = ' AND'.
ENDIF.
IF conn_id IS NOT INITIAL.
CONCATENATE where_clause and ' CONNID = ''' conn_id ''''
INTO where_clause.
ENDIF.
SELECT * FROM spfli INTO wa_spfli WHERE (where_clause).
WRITE: / wa_spfli-carrid, wa_spfli-connid, wa_spfli-cityfrom,
wa_spfli-cityto, wa_spfli-deptime.
ENDSELECT.
Regards,
Santosh -
Nqs error 59001: Binary logical operation error in OBIEE 11g
Hi,
Requirement: Need to calculate YTD for invoiced amount and Prior YTD for invoiced amount and last year total invoiced amount.
Logic we used: For YTD Invoiced amount we used “Year To Date” time series function in rpd.
For Prior YTD we used “Ago function on Calculated YTD column”.
For Last Year Invoiced amount we used “ CASE function and dynamic variables” as:
CASE WHEN year=valueOf(previous_year) THEN invoiced_amount END;
Now, when I’m creating a report, I’m getting the following error as:
*[nQSError: 43119] Query Failed: [nQSError: 59001] Binary Logical operation is not permitted on VARBINARY, INTEGER operand(s). (HY000)*
Please help me to solve this, i need to release the instance by EODHi,
As per my understanding the ValueOf(previous_year) is double precesion so it wont allow to use binary logical operator.Change to integer becos we can manage year with interger data type.
[nQSError: 59001] Binary Logical operation is not permitted on DOUBLE PRECISION, VARBINARY operand(s).
mark if helpful/correct
thanks,
prassu -
Logical Operator list to end users
Hi,
Is there any way that we can provide Logical operator also in the filter/prompt, for the end user in WebI on top of a SAP BW universe?
Ex: User has to select a logical operator(like <,<=,>,>=,= etc) and value for a 'Net Due Date' filter
Tried searching the forum, but did not get the proper work around.
Thank you in advance.
---Veeraare you talking about adding filters in webi reports?
i think its easy,
just in the query itself you can add filter and make it as prompt.
but you have to select the operator, case this is something you have to do into the query itself.
users can not do this when they are running the report.
but there is another option which is "Quick Filter" in there users can add quick filters and select operators as they like.
good luck -
I have a small query where I have to retrieve vendor details not including the vendors starting with '9'.
I have written the below query for that.
select b~lifnr " Vendor number
into corresponding fields of table gi_output_vendors
from lfa1
where lifnr not like '9%'.
But the output I am getting contains vendor numbers '0000950000' where I wanted to eliminate these type of numbers also. i.e, I don't want to consider leading zeroes.
So, the below code I have written for that.
The problem is with if condition or delete statement 'like' logical operator is not being allowed.
loop at gi_output_vendors into wa_output_vendors.
shift wa_output_vendors-lifnr left deleting leading '0'.
if wa_output_vendors-lifnr like '9%' " didn't work delete gi_output_vendors from wa_output_vendors where
lifnr like '9%'. "didn't work
endif.
endloop.
When I use 'like' with 'if' condition or 'delete' statement, I am getting error saying that 'Like operator is not allowed'.
How could I deal with this situation.
Thanks in advance.
Vishnu PriyaIf you can guarantee the 9 will always be in the same place then it would be better to use offset logic or something like 'lifnr NOT LIKE '00009'' - incidentally, I believe the % wildcard only replaces one character so '9%' will be looking for a 2 char string containing a 9 followed by ONE other character. Using '9' will look for a 9 followed by any number of other characters. Since lifnr is a 10 char field (according to your example) '9%' will always fail. I would suggest using the Data Browser (SE11) selection screens to try out some of the possibilities and see what works.
Hope that's of some help!
Andy
By the way, I wouldn't recommend using '9' becasue this will look for a 9 <b>anywhere</b> in the lifnr field i.e. it could exclude a perfectly valid number just because it ends in a 9!
Message was edited by: Andrew Wright
Sorry, ignore me, in SQL you should use % and not * for multiple characters. However, the same applies if you can guarantee the position of the 9.
Message was edited by: Andrew Wright -
[nQSError: 59001] Binary Logical operation is not permitted
Hi All,
I am querying 3 columns in a report.
E.g.
Sales -> Directly pulled from the database column
Prior Month Sales -> AGO("Sales subject area"."Key Measures"."sales", "Sales subject area".Time_Dimension."Month", 1)
Current YTD ->
(CASE WHEN "Sales subject area".Time_Dimension."Year" = VALUEOF("CURRENT_YEAR") AND "Sales subject area".Time_Dimension."Month Number" <= VALUEOF("CURRENT_MONTH") THEN "Sales subject area"."Key Measures"."Sales" ELSE 0 END )
I get the following error:
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 59001] Binary Logical operation is not permitted on VARBINARY, INTEGER operand(s). (HY000)
Please let me know how to go about this.The Data types are as follows:
1. Sales = Double
2. Month = Varchar
3. Month Num is calculated column from -> MOD("Sales Subject Area".Calendar.TimeID, 100) and time id is "Int"
The Rpd variables are:
1. Current Year = CAST(SUBSTRING(CAST(MAX(YEARMONTH) AS VARCHAR),1,4) AS INTEGER)
2. Current Month = CAST(SUBSTRING(CAST(MAX(YEARMONTH) AS VARCHAR),,6) AS INTEGER)
3. Prior Year = CAST(SUBSTRING(CAST(MAX(YEARMONTH) AS VARCHAR),1,4)-1 AS INTEGER)
Basically we dont want to use TODATE function as it is not working properly for Prior YTD. -
cm:search is not returning any result when logical operator '!' is used.
<cm:search is not returning any result when logical operator '!' is used.
I am using BEA 9.1 content management services API. When I run the following query I am not receiving any results. Also no error or exceptions are seen in the weblogic or cmspi log.
The query is <cm:search id="docs" query="!(object_name like 'Sport*')" />HI cam
Thanks for your reply, but i found the problem it was because my server administrator password has changed by network guys... and because of it crawler unable to access the content
I wrote my solution here i hope it will help other people
http://bvs-sharepoint.blogspot.com/2015/03/sharepoint-search-is-not-returning.html
RB -
Basic view/stream join problem (Logical Operator LO_CROSS error)
Hi -
I am writing a CQL processor which processes a stream of events. It translates them 1:1 to another type of event, and also assigns a calculated Version field to the output events.
The inbound events have an ID field which may contain duplicates. The version is an internal sequence starting at 1 for each ID, and incrementing by ID each time another instance of that ID is seen.
Sample input (schema: ID, Payload):
1, abc
2, abc
3, abc
1, def
4, abc
2, defDesired output (schema: ID, Version, Payload):
1, 1, abc
2, 1, abc
3, 1, abc
1, 2, def
4, 1, def
2, 2, defI have defined a processor with a view that aggregates the inbound events in a fixed depth relation (I receive fewer than 1000 events/versions per ID), and try to join that to a transform query:
<view id="Versioner">
select id, count(*)+1 as version
from inboundEvents [partition by id rows 1000]
group by id
</view>
<query id="Translator">
select payload, ..., f.id, v.version
from inboundEvents as f, Versioner as v
where f.id=v.id
</query>Question 1 - when deploying, CEP gives this error, which I don't understand. What basic error am I making?
Description: unbound stream not allowed
Cause: A stream input was applied to Logical Operator LO_CROSS
Action: Do not use stream input for Logical Operator LO_CROSS> Question 2 - is there a better CQL pattern for this - it is ugly to need to fix the partition depth to 1000.
-thanks, Barney
Edited by: Barney on 10-Aug-2011 10:59Q1 -"inboundEvents" is a Stream and a Stream without a window cannot be used in a Join
You could instead use the query
<query id="Translator">
RSTREAM (
select payload, ..., f.id, v.version
from inboundEvents[NOW] as f, Versioner as v
where f.id=v.id
</query>Q2 - You do not need the PARTITION window. Instead, just use
<view id="Versioner">
select id, count(*)+1 as version
from inboundEvents
group by id
</view> -
Logical database in adhoc query
Hello All,
Can anyone tell me what is the logical database in adhoc query?Hi
When you create a query , you have to select an infoset. Infoset can be considered as a source from which data is populated in the Query Fields.
Infosets are created from Transaction SQ02.
There can be four methods through which an Infoset can become a source of data:
1. Table join ( By joining two or more tables from Data dictionary)
example: Joining tables PA0001 and PA0006 on Pernr to get a one resultant dataset
2. Direct read of Basis Table ( Like PA0001 as a source for data in Infoset )
3. Logical Database ( A Pre-written Program by SAP that extract data from clusters, tables taking care of authorizations and validity periods)
Example : Logical database PNP, PNPCE (Concurrent Employement),PCH ( LDB for Personnel Development Data)
Custom Logical DBs can be created in T_Code SE-36.
4. Data Retrieval by a Program ( Custom code written by ABAP developers which will collect and process data) . This program has a corresponding Structure in data dictionary and the fields of this structure will be used in query)
Reward Points, if helpful.
Regards
Waseem Imran -
Logical Operations in SQL decode function ?
Hi,
Is it possible to do Logical Operations in SQL decode function
like
'>'
'<'
'>='
'<='
'<>'
not in
in
not null
is null
eg...
select col1 ,order_by,decode ( col1 , > 10 , 0 , 1)
from tab;
select col1 ,order_by,decode ( col1 , <> 10 , 0 , 1)
from tab;
select col1 ,order_by,decode ( col1 , not in (10,11,12) , 0 , 1)
from tab;
select col1 ,order_by,decode ( col1 ,is null , 0 , 1)
from tab;
Regards,
infan
Edited by: user780731 on Apr 30, 2009 12:07 AM
Edited by: user780731 on Apr 30, 2009 12:07 AM
Edited by: user780731 on Apr 30, 2009 12:08 AM
Edited by: user780731 on Apr 30, 2009 12:08 AM
Edited by: user780731 on Apr 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;As for testing for null, decode handles that by default anyway so you can have 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; -
Set operations in AdHoc Query - user settings
Hi
I am checking out the Set operations in AdHoc Query. The documentation says you should save the setting "Set operations shown" as a user setting. Could anyone advise me where this is set? I can't find a parameter for it, and can't find it in the regular settings.
Any help appreciated.
KirstenThe save is automatic upon exiting Ad Hoc query. Once you do "Show Set Operations", work on a query, save and exit, the next time you open Ad Hoc query, Set Operations tab is displayed by default.
Regards,
RN. -
hi Experts,
while running SQL Query i am getting an error as
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query
select T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
T2.LineText
from OQUT T0 INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN
QUT10 T2 ON T1.DocEntry = T2.DocEntry where T1.DocEntry='590'
group by T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
,T2.LineText
how to resolve the issueDear Meghanath,
Please use the following query, Hope your purpose will serve.
select T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
CAST(T2.LineText as nvarchar (MAX))[LineText]
from OQUT T0 INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
QUT10 T2 ON T1.DocEntry = T2.DocEntry --where T1.DocEntry='590'
group by T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
,CAST(T2.LineText as nvarchar (MAX))
Regards,
Amit -
Error when using "inlist operator" in the query filter of Webi 3.1
Hi,
We are currently in the process of migrating Deski to webi (BOXI 3.1).
The problem is, Deski is using the "inlist" operator which is working fine but after migrating to webi the inlist operator in the query filter is throwing the below error,
*Error Message :*
A database error occured. The database error text is: ORA-00907: missing right parenthesis. (WIS 10901)
Appreciate your assistance on this.
Thanks !
Regards,
PerialtKarthik ,
Yes I am seeing an additional paranthesis in Webi SQL query.
For example plz consider the product table below,
SELECT
Product.ID,
Product.Name
FROM Product
WHERE
Product.Name IN ( @Prompt('4) Name:','C','Product\Name-M',multi,free) )
As a work around in Custom SQL, If I remove the paranthesis the below query is running fine in webi
SELECT
Product.ID,
Product.Name
FROM Product
WHERE
Product.Name IN @Prompt('4) Name:','C','Product\Name-M',multi,free)
But I want a permanent solution. -
Hello,
I have a lightswitch web-application in development, which I need to copy from one computer to the other. I have tried doing it both through Git and by simply copying the solution and opening the project on another machine. The project builds without errors,
but when I try to debug it, it opens a web-browser, loads to 100% and pops up an error - Load operation failed for query 'GetAuthenticationInfo'. The remote server returned an error: NotFound.
Now, I have tried repairing Visual Studio on my machine, reinstalling .NET framework and setting <basicAuthentication enabled="false" /> in web.config, yet it still does not run.
When using Fiddler, it shows an error while loading the application - "HTTP/1.1 500 Internal Server Error" , which I honestly don't know what it means.
The application uses ComponentOne and Telerik modules, but they are both installed on both machines.
The application does run perfectly on the original machine, but it is not working on any other one.
Both machines are using Win 8.1 and Visual Studio 2013 Update 4.
I have tried to look this up online, but most people's problem are when they are deploying the app, not just debugging. I would be really happy for any help with this issue.
Thanks!I have the same problem on one of my development machines. Whenever I create a new project, the System.IdentityModel.Tokens.Jwt nuget package is not referenced properly. The project compiles correctly but you are not able to debug as I get the same error
as you.
If you open up your references and there is an error next to any of your references make sure that you correct them. In the case of the jwt reference error, I have to remove the jwt reference and then add it back from the packages folder.
This may not be your problem but could point you in a direction? -
How to apply different Logical operations to N.of Signals
Hello all,
Please help me if anyone have idea about this.
I have “N” number of signals. I want to apply different Logical operations for this.
For Example:
(((SigA >= 30 && SigB <=55) || (SigC = 42)) && (SigD > 45))
((((SigD >= 89.25 && SigF <=55.568) ||(SigG = 156.89)) && (SigA >= 45)) || ((SigF – Sig A) >25))
Here Conditions will change every time. User can input different conditions (like Excel calculations). I need to check signals as per these type of conditions. Is there is any tool kits available in LabVIEW / we need to develop?
Currently I’m thinking about string manipulations to extract the each condition . Once first condition is finished then check this results with next conditions (so on..)
MunnaHi GerdW,
After long time again I stated doing this task. Could you please help me in this.
As per my snippet, at 1st making array based on given String. From that string I need to check where open & closed brackets are coming to do logical operations.
For Example: (2 OR ((1 AND 2) OR 3))
Index
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
String
2
O
R
1
A
N
D
2
O
R
3
Please give me any idea/sample VI for the same.
Here, 1,2 & 3 are Indices of Boolean 2D Array.
Munna
Maybe you are looking for
-
How can I receive an invoice from Adobe instead of using a credit card?
I would like to contiunue to use Photoshop, I have only aprrox 20 days left. I need to receive an invoice to the company where I work. I cannot be taken from my credit card. How can I do? /Sofi
-
0REVERSEDOC, 0VERSION, 0INFO_REC and 0INFO_TYPE
Hy experts, I'm using cubes 0PUR_C01 and 0PUR_C04, thta receive data from DS 2LIS_02_HDR, 2LIS_02_ITM and 2LIS_02_SCL. I'm having some data inconsitencies in the queries. I've looked to the update rules, and realized 0REVERSEDOC, 0VERSION, 0INFO_REC
-
I have already asked my question on the previous page! == User Agent == Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4
-
SCCM 2012 R2 MDT 2013 Install Features after OS Install
I have a question in regards to installing Features on Windows Servers Post OS Install/OSD. I have MDT 2013 integrated with SCCM 2012 R2. I have created a MDT TS doing the following: Microsoft Deployment Custom Task Sequence (All other ones were for
-
Creating a Management plugin archive.
Hello Frineds, i want to create Management plugin archive which is included java source code. actullay when i have copied the source code and all xml file manually that is working fine. but i want import my code using OEM . pls help we how can i crea