Query Filter JDBC
I had the following problem: I had to do queries with JDBC but if the user insert sql reserved word or commas, the system trows an error becose de sql sentence is incorrect. Somebody know any filter for this question.
Thank you.
And be sure you read up on how to set bind variables in the PreparedStatement. It will do you no good whatsoever to simply change the type of Statement. There are dozens of JDBC PreparedStatement examples. Be sure all your bind variables in your SQL statement are replaced with '?'.
- Saish
Similar Messages
-
How can I use a variable in webi query filter
I created a webi report using the fiscal year/month(period) field as a filter to show a window of 18 periods. The report works just as requested using a between filter on fiscal period with prompts for both the start and ending periods. Now I'd like to calculate the start period based on what was entered in the prompt for the ending period (e.g. enter 201106 for the TO prompt on the between statement and have the FROM statement filled in as 201001.) I can create variables in the report to display both the user response to the ending period prompt and the calculated starting period, but I cannot figure out how to incorporate that calculated starting date into the FROM side of the between query filter.
Any suggestions?
Thanks,
Doug
Sorry I got my froms and to's mixed up in the first draft. Edited by: Doug Roswold on Mar 4, 2011 6:27 PMLet me understand what you want to do. You don't want to use two prompts, just one, insn't it?
I mean, instead of:
Filter area:
Date between "From prompt" to "To Prompt"
You want something like:.
Filter area:
Date between Variable to "To Prompt"
if I'm not wrong that's not possible to achieve in Webi Query Panel.
Can you modify your universe? The only way to achieve it is modifying your universe, creating your formula in the universe and assigning it to an object, so you can use this new object in your filter area like this:
Date between MyUniverseObject to "To Prompt"
Edited by: PadawanGirl on Mar 4, 2011 8:15 PM -
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. -
Adding a list in Service Mananger Query Filter
In this post:
http://www.concurrency.com/blog/service-manager-request-query-result-filtering/
" The trick was to setup the simple list to include no initial results, which provided very fast form load and quick search
result return speeds. "
They have a list or a prompt in their query filter. Is there a site anywhere that explains what this is, or where to do this? I'm absolutely baffled and searching provides no documentation but sky-high level overviews.Lets say you want to filter users based on department. You'll end up with two questions in your service offiering
Department to search in. refresh the next question after changing this value.
User.
the first question contains a simple list (see the table at
This Blog Post for more details on that)
[null]
LegitDepartment1
LegitDepartment2
LegitDepartment3
ETC...
the second question is your actual query result question. The Criteria on this is going to compare the user's department to the results of the first question. >when the form loads, it going to run the following query:
System.User where Department = [Null]
Since there are no users with a null department, this result will be empty and return immediately.
Then, the user goes down, hits the right department, and then hits refresh on the second question and gets the correct users, clicks the right one, and goes on with their life. -
Hi guys help me with this
1) What is the use of update query in jdbc adapter?
2) Why do we use the flag field in jdbc table ?Hi,
1) What is the use of update query in jdbc adapter?
The purpose of the Update Query in JDBC is to change the status of the processed records in the table.
That is when JDBC query is executed it select the records from the table in the Database and it sends to the Receiver.
After that it executes the Update query to change the status of the processed records in the Table.
2) Why do we use the flag field in jdbc table ?
Flag field in the table is used to identify which record is processed by Jdbc adapter. Initial stage it will have the status as 0 , if it is successfully processed then it will updated to 1.
Based on this we can identify processed records which is done by update query.
Regards
Sridhar Goli -
Bex Query Filter Page in BSP - Urgent Please...
I have seen many threads about Bex query in BSP, but can any one tell me how can i display the default Bex Query Filter page in BSP.
I created a query in Bex Query Designer and added few filters and when i execute i get a popup where i can enter the input values for which the report would be generated, can i get the same functionality or similar functionality if i have the same Bex query in BSP.
Also apart from the filters specified in the Bex, all the columns displayed in the report appears in the filter section how can get the same functionality BSP.
Note: I do not want to use Bex Web Application Designer
Please tell me the steps for the same.
Atleast please give me the steps at a high level. Please...Hi,
1. Create a CKF, inside the CKF window create a new Formula Variable --> Right click in left side window on var and say create new Variable
2. Create new variable of replacement path type and reference Characteristic as the TO DATE value which you want to be max.
3. Now drag this new created var to CKF and save.
4. Now create condition with follwoing deatils:
Key Figure Operator Value
Max Date(CKF) TOP N 1
Save and execute your query. This will give you max value for the To Date field.
Hope it works .
Regards
Raj Rai -
Use Yesterday as variable for Query Filter
Post Author: rrburton
CA Forum: WebIntelligence Reporting
I want to have a query filter that refers to the previous day. In regular SQL I would use something like "= trunc(sysdate)-1". I don't see any option for doing it this way in web intelligence, the closest it comes is selecting object and then assigning the Beginning of Last Week item from the System Date table. What am I missing?Post Author: rrburton
CA Forum: WebIntelligence Reporting
Nevermind - I figured it out just now. It isn't very intuitive. In the Objects and Variables dialog in the SystemDate table there are a bunch of items like 1 day, 2 days, etc. and you select one of those and then in the code it looks like:
WHERE PKG_NTD_CONV.TO_ORCL_DATE(TROUBLE_TICKET_ARCHIVE.CREATE_DATE) = ( sysdate )-1
It should say something like 1 day ago, 2 days ago, etc. -
Rich Client Query Filter Pane question
I've browsed through various forums without finding an answer to my problem. I'm frustrated and hope someone else has been there/done that and can offer a suggestion to ease my pain.
We're using BOXI 3.0, and my question is specifically about deciphering/maintaining the contents of the query filter pane in InfoView and/or Web Intelligence Rich Client.
We have some complicated reports with numerous optional prompts. We realize this is not optimal, but need to maintain this reports until we can replace them.
The filter panes are very complicated, since there are so many prompts, ANDs, and ORs and nested statements.
Is there a way to see which universe component a query filter field is connected to? In the query results pane (on top), I can click on a field and it's source is highlighted in the universe tree view on the left. That doesn't happen when you click a field in the query filter pane.
Is there some way I've not found yet, or is this an enhancement request for BOE? Thanks in advance.I guess this an enhancement request for BOE because I've never seen an option like that. And I really wish that option existed.
The only way I could think of to solve this problem is renaming all the objects of your universe. This way you may know what class any object is related to when using the query filter panel.
For example: You have 3 classes in the universe: Users, Quotes, Invoices. Rename them with a prefix, let's say:
U-Users
Q-Quotes
I-Invoices
Then all the objects belonging to Users must be renamed with the U- prefix:
U-User name
U-User id
And the same applies for the other classes objects:
Q-Quotes:
Q-quote id
Q-User id
Q-Amount
I-Invoices:
I-Invoice id
I-Quote id
I-Amount
So if in one query filter panel you have a filter using the object Quote id, you'll see if this Quote id comes from Quotes or Invoices, because of the prefix Q- or I-.
I don't know if it is a good practice but I hope it helps.
Regards,
Erika Atencio Harris
Edited by: PadawanGirl on Jan 19, 2011 10:10 PM -
WEBI Substraction of two classes in query filter
Please tell me how could i implement the following query in the WEBI rich client query filter.
and ( one."/BIC/ZORIG_DAT" - one.me_itmvalf ) < 364
AND ( abs(one."/BIC/ZINV_VAL") - abs(one."/BIC/ZSD_AFYV") > 1 )First, you should know that there is a set of updateXXX() methods in Java 2.0. So, when you have the correct row of the resultSet in hand you can use:
updateString(3,"Hello world!")method to update the field in the column 3 to a String with value "Hello world!". This is just an example of course.
To make this example complete see this:
// assume you have the right row from the resultSet in hand.
// assume rs is your resultSet
int foo = rs.getInt(1);
foo += foo*0.05;
// and other calculations here
rs.updateInt(1,foo);
rs.updateRow(); // This line is here so as to make the changes
// permanent.
// No need to mention that you cannot change primary
// keys...Second, I think I've given you a very clear example of what you can do. And since this is a Java assignment you don't want to be spoon-feeded, do you? :)
Hope this helped.
afotoglidis -
"Select All" option in Multiselect Query Filter
Hi,
Is there a way to select all values in a multiselect filter option in a query. currently i have created a variable or a mandatory filter which allows me to select all values one by one and then move it to right side, but its very painful option in certain cases where in i need to select all values. Is there a way where in one can select all values with a single click in Query Filter in Web Analyzer.
Thanks
Akila. RHi,
You can give range values in the Query designer.
You can include variable selection where user can enter the selections with their own selections.
Let us know if you still have any issues.
Reg
Pra -
Uni on Bex-Query: filter on Structure - Without Keyfigures as column: error
Hi All,
I have a 'Without Key Figure structure' as a column called Version in which (amoung others) the values 'Actual' and 'Last Year' .
Thus
Version
- Actual
- Last Year
Now i want to create a filter in my universe which pre-selects Actual.
When I use the tool for that this is my standard definition of the filter:
<FILTER KEY="@Select(Version\Version)">
<CONDITION OPERATORCONDITION="Equal">
<CONSTANT VALUE="Actual"/>
</CONDITION>
</FILTER>
However it results in error: 'A database error occured. The database error text is: (CS) "Error on BindCol". (WIS 10901)'
Meaning(i guess) that somehow i'm not getting the correct selection-command to the database,
When i use the version-dimension itself in the reports as part of the query filter it works fine and LOV displays both versions for selection.
We are using XI3.1 fp3.1; BW 701-sp5 on oracle 11
I've look through the forum, but couldnt find an answer.
If there is point me into that direction and i'll close this one
Any other information on how filters etc should be specified in an Universe on a BW query is also greatly appreciated.
I already have found some info but any information is welcome.
Your help is greatly appreciated.I found my answer.
Create a caption dimension for your keyfigures and filter on thath
Dimension:
[xxkeycharacteristicxx].[caption]
Filter:
<FILTER KEY="@Select(Key Figures\Key Figures Caption For predefined filters)"><CONDITION OPERATORCONDITION="Equal"><CONSTANT CAPTION="VERSIONS like Actual"></CONSTANT></CONDITION></FILTER> -
Sub query filter may not reference current Report
Hi,
I've 2 reports, i'm calling one from the another report by navigate methode(Column Propertives--> Value-->Navigate). 2nd report is having narrative veiw in title of the report .
Getting Error:
Sub query filter may not reference current Reporthi,
have u seen this ?
http://siebel.ittoolbox.com/groups/technical-functional/siebel-analytics-l/issue-with-drill-down-1710714
thanks,
Saichand.v -
Query Filter not working - Lookup Community ID based on Community name
I want to lookup Community ID based on the Community name. I tried the following code to filter the results and got a PTException. I'd appreciate any insight on to what I am doing wrong or a any other pointers to better implement this.
// Build a filter for querying the community id by name
Object[][] arrFilter = newObject[3][1];
arrFilter[0][0] = newInteger(PT_PROPIDS.PT_PROPID_NAME); //Operand
arrFilter[1][0] = newInteger(PT_FILTEROPS.PT_FILTEROP_EQ_NOCASE); //Operator
arrFilter[2][0] = newXPStringBuilder(_strCommName); //Value
IPTQueryResult qrCommunities = _ptSession.GetCommunities().Query(
PT_PROPIDS.PT_PROPID_OBJECTID | PT_PROPIDS.PT_PROPID_NAME, //Props
-1, //Folder to look in, -1 for "all"
PT_PROPIDS.PT_PROPID_NAME, //Property to order by
0, //Number of rows to skip, used for pagination
-1, //Max rows to return, used for pagination. -1 means no limit
arrFilter); //Filter to apply to results
Thanks.
Vanita
StaplesAlso if you dont want to use the server API you can use the code below with the SOAP interface
privatestringGetCommunityName(intiCommunityID)
stringsCommunityName = "";
//try to establish the remote session
try
if(log.IsDebugEnabled)
log.Debug("Start remote session attempt");
PortletRemoteSession = PortletContext.GetRemotePortalSession();
catch(Exception ex)
ErrorLabel.Visible = true;
ErrorLabel.Text = "Error esablishing remote session";
log.Error("Error esablishing remote session" + ex.Message);
if(log.IsDebugEnabled)
log.Debug(ex.Source);
log.Debug(ex.StackTrace);
//init the ObjectManager api to get the community name
IObjectManager oObjectManager = null;
try
if(log.IsDebugEnabled)
log.Debug("Start OBJ Man build");
//create the search request
oObjectManager = PortletRemoteSession.GetObjectManager(ObjectClass.Community);
//deine the admin folders to search
intfolderID = -1;
intstartRow = 0;
intmaxRows = -1;
//define the return result sort order a bit invalid in this case
ObjectProperty sortProperty = CommunityProperty.Name; ;//sort on the unique name
boolascending = true;
//what do we want back from this search
ObjectProperty[] propsToReturn = newObjectProperty[1];//choose to return specific properties
propsToReturn[0] = CommunityProperty.Name;
//build the query filter we only want the community name from the passed id
QueryFilter[] filters = newQueryFilter[1];//filter the results
filters[0] = newIntQueryFilter(CommunityProperty.ObjectID, Operator.Equals, iCommunityID);//filter results on community id
if(log.IsDebugEnabled)
log.Debug("Start OBJ Man query");
//do the search
IObjectQuery queryResults = oObjectManager.QueryObjects(folderID, startRow, maxRows, sortProperty, ascending, propsToReturn, filters);
if(log.IsDebugEnabled)
log.Debug("results returned = " + queryResults.GetRowCount());
//we should only ever get one result here
if(queryResults.GetRowCount() != 1)
log.Fatal("We have more than one community name result - warning Will Robinson warning");
thrownewException("We have more than one community name result");
//assign the name to the return var
IObjectQueryRow queryObject = queryResults.GetRow(0);
sCommunityName = queryObject.GetStringValue(CommunityProperty.Name);
catch(Exception ex)
if(log.IsDebugEnabled)
log.Debug("Search error - " + ex.Message);
ErrorLabel.Visible = true;
ErrorLabel.Text = ex.Message.ToString();
finally
//clean up
if(oObjectManager != null)
oObjectManager = null;
//and return the community name
returnsCommunityName; -
Business Objects query filter issue
Hi all,
In BO reporting, it is not displaying all the rows in the report when a query filter is applied.
The same report works when filter is applied on the report level.User needs to apply filter on query level in order to create several tabs or reports on the same query.
Please help me to overcome from this issue.
Thanks
AjayHi Ajay
Check the "Limit size of result set" property of your universe,
1. Launch Universe Designer & open/import your universe.
2. Go to File --> Parameters
3. Select "controls" tab, Under "Query Limits", select/deselect the options based on your requirements
4. Export it to repository.
Note: Here you can "Limit size of result set", By default it is set to 5000 rows.
Hope this may be the cause
Regards
Ashwini -
Problems about query filter (BEx).
Hello there,
I have some problems about query filter (BEx).
I have master data and I want to use attribute in this master data to dynamic filter in query(BEx).
But this attribute is key figure. I can't done it now. TT
Is this possible? If yes, could anyone advise how this is to be done?
Thanks in advance.Hi
In BEx there is option as 'Exceptions' & 'Conditions'. If you go in condition, you can specify range for key figure output. This is either predefined or by user selection. You create the condition as per your requirement & it will show you filtered data.
How to create conditions you will find easily on this site.
You can create as many conditions as no of filters you want. You can create these at query level also at report output level.
Maybe you are looking for
-
HT4759 My photo stream is on but i don't see any photos when i log onto icloud
My photo stream is shown on my iphone and ipad but when i log into icloud on my pc i dont see photos as an option.
-
Help needed for Virtual Key Figure BADI
I am trying to implement Virtual Key Figures via BADI. Here is what I have done Define Method method IF_EX_RSR_OLAP_BADI~DEFINE. DATA: l_s_chanm TYPE rrke_s_chanm, l_kyfnm TYPE rsd_kyfnm. FIELD-SYMBOLS: <l_s_chanm> TYPE rrke_s_chanm. Insert Code CASE
-
Unexpected start node "Insert" with namespace...
Hi, I have a simple Biztalk app which receives an XML and sends to oracle DB using WCF-custom adapter. I generated schema from Visual Studio, created a map for inbound XSD to generated XSD mapping, deployed the app. Send port is configured to
-
Hi, Is there a particular setting to apply on Cisco Catalyst 2960 / 3750X switches if the DNS role is dedicated to a windows 2003 server ? Catalyst 3750X is used as core switch and Catalyst 2960 is used as acces switch - Is it better to transfer the
-
Is connector server for AD and Exchange under the same license of their corresponding connectors or explicit?