How to use @WHERE?
I want to make 2 predefined filters where one is dependent on the other. For example:
filter one allows to select a class from a list and filter two allows to select names from persons, but only persons from the previous selected class.
I have made a predifined filter(1) in a universe with the whereclause:
@Select(Class\Classlist) IN @Prompt('Select a class','A','Class\Classlist',multi,constrained)
The second filter so far is:
@Select(Names\LastNames) IN @Prompt('Select a name','A','Names\Lastnames',multi,constrained) @WHERE (Class\Classlist)
Unfortunately I got the message 'sql statement not properly ended. Where do I go wrong?
Hi,
As far as I know Conditions won't have any @select clause and they have only where clause. I think for your requirement you can go for Cacading of lov's option.
i.e.Go to Tools-> List of Vlaues-> Create cascading of lov's -> select the required object i.e Classlist and also select lastname object click on generate LOV's and in report query panel create a prompt for lastname object.
Cheers,
Suresh A.
Similar Messages
-
How to use where clause with get statement in LDB programs
Hi All,
I am using logical databse in my report program.I am not getting how to use the where clause in the get statement is it possible to use?or if not possible only option is we should filter it after get statment is right?Can you please some body throw some idea on this?
Regards
MaheshHi,
Reffer these links
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
reward if helpful
Thanks,
Suma. -
How to use WHERE Clause in BPEL
Hi ,
i am trying to use where clause in DB adapter but its not working.
my query is "select empname from employee where empid = &a"
can any body tell me what is the reason its npt working?
and how can i retrive data form DB?Hi,
You are thinking perfectly fine. The solution what I suggested was
select ename from emp where empno=?
And the solution provided by you was
SELECT first_name, last_name FROM per_all_people_f WHERE person_id = #p_person_id
There is no problem with the above mentioned select statements.
I just want to say that if you see closely, internal logic changes #parameter name to ?. So both the logics are right.
Cheers,
Abhi... -
How to use "where" condition when we use update or delete in a dbadapter?
Hi
I want to update/delete a record in a database table based on one of its fields. Which means I have to use "where" condition to check the value of the field and only then I can decide whether or not the record can be updated/deleted.
When I try to use the dbadapter update/delete options, I dont see any provision for writing the "where" condition.(May be I am missing something).
I know that I can use the custom sql option and write an sql command to achieve this.
But I would like to know if this can be done when using the update/delete option itself in the dbadapter.
Thanks in anticipation.
RaviHi,
You can use the logical delete option. In that case you can supply a value for the column that indicates if a record is changed and have it picked up by the db adapter.
Andre -
About how to use WHERE condition in JDBC
Hello,
I met a problem when I wrote my jdbc program.
ResultSet rs1 = stmt1.executeQuery("select Ncategory from ncategory, whsites where whsites.Name = 'Heard and McDonald Islands'and whsites.Id=ncategory.IdWhsites");
ncategory and whsites are my two tables in my database. I try to select some data that conform to the WHERE conditions. Actually I want to input the name of
of whsites.Name, I defined
String sitename = "";
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Please input the site name:");
siteName = in.readLine();
Then I changed the above ResultSet sentence,
ResultSet rs1 = stmt1.executeQuery("select Ncategory from ncategory, whsites where whsites.Name = siteName and whsites.Id=ncategory.IdWhsites");
The program can be compiled. But I found the Resultset sentence has not been executed. How can I modify the executeQuery and make it work?Hi,
Try using a prepared statement as shown below
PreparedStatement ps = connection.prepareStatement( "select Ncategory from ncategory, whsites where whsites.Name = ? and whsites.Id=ncategory.IdWhsites");
// Bind the airline code to the query
ps.setString(1,siteName );
result = ps.executeQuery();
Alternatively you could try the following too :
ResultSet rs1 = stmt1.executeQuery("select Ncategory from ncategory, whsites where whsites.Name = '"+siteName+"' and whsites.Id=ncategory.IdWhsites"); -
How to use "where" clause in modify statement
Hi
can any1 telll me is it possible to use a where clause in a modify statemetn. I want to use modify statemetn to insert a new recoed in a database table.
Regards
Sabahuddin AhmedMODIFY itab - itab_lines
Syntax :
... itab FROM wa TRANSPORTING comp1 comp2 ... WHERE log_exp.
With these additions the MODIFY statement assigns the content of the comp1 comp2 ... components of the wa work area specified after TRANSPORTING to all lines in the itab table that meet the logical condition log_exp. The wa work area must be compatible with the line type of the internal table.
The TRANSPORTING addition has the same effect as changing individual lines. The WHERE addition can only be specified together with the TRANSPORTING addition. After WHERE, any logical expression can be specified in which the first operand of each individual comparison is a component of the internal table. All logical expressions are therefore possible, with the exception of IS ASSIGNED, , and IS SUPPLIED. It is not possible to dynamically specify a component using bracketed character-type data objects.
While for standard tables and hashed tables all lines in the internal table are checked for the logical expression of the WHERE statement, for sorted tables, optimized access can be achieved by checking at least one opening part of the table key for parity using AND linked queries in the logical expression.
Example
Change the contents of the planetype component for all lines in the sflight_tab internal table in which this component contains the value p_plane1 to the value p_plane2.
PARAMETERS: p_carrid TYPE sflight-carrid,
p_connid TYPE sflight-connid,
p_plane1 TYPE sflight-planetype,
p_plane2 TYPE sflight-planetype.
DATA sflight_tab TYPE SORTED TABLE OF sflight
WITH UNIQUE KEY carrid connid fldate.
DATA sflight_wa TYPE sflight.
SELECT *
FROM sflight
INTO TABLE sflight_tab
WHERE carrid = p_carrid AND
connid = p_connid.
sflight_wa-planetype = p_plane2.
MODIFY sflight_tab FROM sflight_wa
TRANSPORTING planetype WHERE planetype = p_plane1.
reward if useful -
Hello,
I am using sapnwrfc for perl to get few information about SAP system. To get the Applications pruning on SAP system i need to use two tables DF14AVD and DF14T to get Application Name and Description. table DF14T contains description of the application.
I want to know using QUERY_TABLE how i can combined it and get desired result.
For ex. FCTR_ID is present in both the table. FCTR_ID which are present in DF14AVD table, i want to retrieve short description from DF14T .
Any idea how i can do this?
AmitHi,
You can refer to the following link.
http://help.sap.com/erp2005_ehp_04/helpdata/EN/4b/38b618068911d295300000e8353423/frameset.htm
Thank You.
Regards,
Dhanalakshmi L -
How to use where exists with a subquery
Hi,
Below is my query
select DISTINCT
-1,
vODS_GLBalance.PageNum,
vODS_GLBalance.FiscalYearId,
vODS_GLBalance.FiscalMonthOfYearId,
GLAmount
From ODS.Staging.vODS_GLBalance
where EXISTS
select *
From ODS.Common.tODS_Date
where dateid not in (-1,99991231)
AND convert(date,convert(varchar,FiscalYearId)+'-'+convert(varchar,FiscalMonthOfYearID)+'-01') between dateadd(month,-2,getdate()) and dateadd(month,-1,getdate())
Order BY FiscalYearId ASC,
FiscalMonthOfYearId ASC
My subquery inside the where exists just brings the date for current month,so i want to limit my whole data only for current month,but if i run the whole query it returns me all the data i have in my staging table.
Any suggestions please?
ThanksYou need to correlate the subquery with the outer query, like in this example:
SELECT *
FROM Customers C
WHERE EXISTS (SELECT *
FROM Orders O
WHERE C.CustomerID = O.CustomerID)
That is, show me all customers who have placed at least one order.
I can't give an example with your queries, because I don't know how they are structured.
Erland Sommarskog, SQL Server MVP, [email protected] -
Using where condition with dynamic internal table
Hi Friends.
How to use where condition with dynamic internal table ?
Regards,
Amit RautHai Amit
REPORT ZDYNAMIC_SELECT .
TABLES: VBAK.
DATA: CONDITION TYPE STRING.
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
END OF ITAB.
SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.
CONCATENATE 'VBELN' 'IN' 'S_VBELN.'
INTO CONDITION SEPARATED BY SPACE.
SELECT VBELN POSNR FROM VBAP INTO TABLE ITAB
WHERE (CONDITION).
LOOP AT ITAB.
WRITE 'hello'.
ENDLOOP.
Thanks & Regards
Sreenivasulu P -
Where do I use my Apple Id to locate workshops in San Antonio, TX on how to use my Iphone 4?
You don't need an AppleID for this. Just visit your neareast retail store and attend a workshop.
-
Where can I find a detailed tutorial on how to use Finder?
Where can I find a detailed tutorial on how to use Finder?
Start with this one:
http://support.apple.com/kb/HT2470?viewlocale=en_US -
Where do I find a tutorial about how to use the new iTunes? I have version 11.1.3 (8). I looked on the Apple web site but only found info extolling the virtues of iTunes, not how to use it.
Use it the same way as previously.
ctrl B shows the menus.
ctrl S shows the sidebar.
What else do you need help with? -
I am a high school teacher. My district purchased the entire CC Suite. Where can I find a tutorial in book form to learn how to use your products? Do you all provide free book samples to teachers?
Good day!
This is a user to user Forum, so you are not really addressing Adobe here, even though some Adobe employees thankfully have been dropping by. (edit: Actually they are more likely to frequent the regular Photoshop Forum.)
Regards,
Pfaffenbichler -
when I see the usage on my iPod touch 4 they have categories for how much space is being used where. What does the "other" category contain? Like what could I delete on my iPod to get rid of the "other" category?
What is the Other on my iPhone and How to Remove It
An "other" larger than about 1 1/2 GB usually indicates that the "other" includes corrupted files.
First try:
"First you go settings/general/usage/music/then left swipe over music and press delete and you would think it deletes your music but it doesn't instead it deletes your other but make sure your ipod is connected to a computer while doing this"
as recommended by:
How do I get rid of "other" storage: Apple Support Communities
Next, usually restoring from backup eliminated the corrupted files. However, sometimes restoring to factory settings/new iPod is required.
To restore from backup see:
iOS: How to back up
To restore to factory settings/new iPod see:
iTunes: Restoring iOS software -
How to use case function in where clause
Hi,
Suppose a table DEMO has columns
DEMO TABLE
user_id
user_name
location
In this table i have 15 users. but out of 15 users i want to use only 5 users for passing as user_name.
then how to achieve the result
1. when i pass the particular 5 user_name in where clause then i should get all the user_name and for other 10 users it will show only the passing user_name.
how to use case functionDo you mean this ?
SQL> var name varchar2(10)
SQL> exec :name := 'ALLEN'
PL/SQL procedure successfully completed.
SQL> select ename from emp where case when :name in ('SMITH','ALLEN') then ename
2 else :name end = ename;
ENAME
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS
JAMES
FORD
MILLER
14 rows selected.
SQL> exec :name := 'SMITH'
PL/SQL procedure successfully completed.
SQL> select ename from emp where case when :name in ('SMITH','ALLEN') then ename
2 else :name end = ename;
ENAME
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS
JAMES
FORD
MILLER
14 rows selected.
SQL> exec :name := 'BLAKE'
PL/SQL procedure successfully completed.
SQL> select ename from emp where case when :name in ('SMITH','ALLEN') then ename
2 else :name end = ename;
ENAME
BLAKERgds.
Maybe you are looking for
-
HT3924 2009 Imac as screen display for MBP retina dosnt work
I got an Imac 2009 - but when i try to connect it with my brand new 15" retina MBP - i dosnt detect the monitor. I use a HDMI cable with adaptors in both ends. Anyone know what to do? Krogh
-
HT1349 I can't get in to my phone anymore
I can't get in to my phone anymore
-
Gnome-open opens urls only in firefox [SOLVED]
Hi, I've been facing a problem since I switched from firefox to chromium, all the apps open urls in firefox. I've been investigating a little to find xdg-open uses gnome-open to open my urls. I've set up custom/chromium %s in Preffered Applications (
-
Sun Federation Manager installation problem
I'm trying to install Sun Federation Manager on a machine running RedHat Linux and Sun Application Server. The installation in itself appears to go ok, and the loginpage appears when i connect to http://x.x.x.x/federation The problem is when I try to
-
So I have this Nano first gen.. These things have a defect and so Apple announced to get you a new Nano if you would send your old one back. Now I was under the impression that when they said they would send me a box for retreiving their product, tha