Retrieve data using not in clause
Hi,
Ihave two temporal tables(temp,temp2) with two columns on each
temp(phone,operator)
temp2(phone,operator)the phone and operator columns are unique key in temp2
what can i do to retrieve the data which are in temp but not in temp2?
thanks in advanced
EZGms wrote:
Hi,
Ihave two temporal tables(temp,temp2) with two columns on each
temp(phone,operator)
temp2(phone,operator)the phone and operator columns are unique key in temp2
what can i do to retrieve the data which are in temp but not in temp2?
thanks in advancedselect * from temp
minus
select * from temp2;
Similar Messages
-
Is it possible to retrieve data using RFC alone with out using BAPI ?
Hi ,
Is it possible to connect SAP to Non-SAP systems to retrieve data using RFC alone with out using BAPI ?
thanks
RamaHello Nelson,
Could you please explain how this can be done. Because my understanding is that only BAPI can be used to connect Non SAP and SAP system not RFC function module.
Regards
Farzan -
How to retrieve data using logical database and custom select options
Hi all,
I have a selection screen which is displayed by logical database PSJ and I have two select options of my own. I need to retrieve data based on both selection screen of logical database and my own select options. How can I do it?
Thanks in advance.Hai Gupta
Check the following Document & Links
1. A logical database is in fact
a program only.
2. This LDB provides two main things :
a) a pre-defined selection screen
which handles all user inputs and validations
b) pre defined set of data
based upon the user selection.
3. So we dont have to worry about from
which tables to fetch data.
4. Moreover, this LDB Program,
handles all user-authorisations
and is efficient in all respects.
5. tcode is SLDB
good info about Logical Database. you can check the link.
http://www.geekinterview.com/question_details/1506
http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
Re: How to Create and Use ldb in reports?
Re: Logical databases
http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
Functions for displaying and changing logical databases:
Call Transaction SE36 or
Choose ABAP Workbench -> Development -> Programming environ. -> Logical databases
Interaction between database program and report:
During program processing, subroutines are performed in the database program and events are executed in the report.
To read data from a database tables we use logical database.
A logical database provides read-only access to a group of related tables to an ABAP/4 program.
advantages:-
The programmer need not worry about the primary key for each table.Because Logical database knows how the different tables relate to each other,and can issue the SELECT command with proper where clause to retrieve the data.
i)An easy-to-use standard user interface.
ii)check functions which check that user input is complete,correct,and plausible.
iii)meaningful data selection.
iv)central authorization checks for database accesses.
v)good read access performance while retaining the hierarchical data view determined by the application logic.
disadvantages:-
i)If you donot specify a logical database in the program attributes,the GET events never occur.
ii)There is no ENDGET command,so the code block associated with an event ends with the next event
statement (such as another GET or an END-OF-SELECTION).
1. transaction code SLDB.
2.enter name z<ldb-name>
3.create
4.short text
5.create
6. name of root node (here Ekko)
7. enter short text (f6)
8.node type -> data base table.
9.create
10 change logical DB
riht click on ekko and insert node
here node name ekpo
11.create
12. click on selections
13. press no Should the changed structure of Z<ldb name> be saved first.
14.select tables which you want to join.
15.transfer
16 now you have to o to coding part.
17. save
activate.
19.click to src code
double click on first include and activate
Regards
Sreeni -
Programatically retrieve data using iterator in oracle ADF Mobile
I want to read programatically data using iterator in ADF mobile. My code is :
try
ValueExpression vex = AdfmfJavaUtilities.getValueExpression("#{bindings.WeatherDescriptionIterator}", Object.class);
AmxIteratorBinding iter = (AmxIteratorBinding)vex.getValue(AdfmfJavaUtilities.getAdfELContext());
GenericType row = null;
BasicIterator bIter = iter.getIterator();
iter.getIterator().first();
ArrayList employees = new ArrayList();
for(int i = 0; i < iter.getIterator().getTotalRowCount(); i++)
row = (GenericType)iter.getCurrentRow();
String phone = "";
String email = "";
if(row.getAttribute("Description") != null)
phone = row.getAttribute("Description").toString();
if(row.getAttribute("WeatherID") != null)
email = row.getAttribute("WeatherID").toString();
setTempValue(phone + " " + email);
iter.getIterator().next();
catch(Exception e1)
AdfException ex = new AdfException(""+e1.getLocalizedMessage(), AdfException.ERROR );
throw ex;
I get error :-> cant not find property bindings
Edited by: user12190920 on May 7, 2013 5:48 AMHi,
You can try the below code. Make sure the WeatherDescription should be of type Tree binding
ValueExpression ve1 =
AdfmfJavaUtilities.getValueExpression("#{bindings.departments.collectionModel}", AmxCollectionModel.class);
AmxCollectionModel model = (AmxCollectionModel)ve1.getValue(AdfmfJavaUtilities.getAdfELContext());
Object[] myArr = model.getKeys();
for (int x = 0; x < myArr.length; x++) {
Object myObj = myArr[x];
Map provider = (Map)model.getProviders().get(myObj);
String deptName = provider.get("deptName").toString();
Hope this article may help you - http://deepakcs.blogspot.in/2013/02/adf-mobile-iterate-through-all-rows-in.html
- Deepak -
Retrieving data using subquery
Hi
I have these tables in my hr schema
SQL> desc employees
Name Null? Type
EMPLOYEE_ID NOT NULL NUMBER(6)
FIRST_NAME VARCHAR2(20)
LAST_NAME NOT NULL VARCHAR2(25)
EMAIL NOT NULL VARCHAR2(25)
PHONE_NUMBER VARCHAR2(20)
HIRE_DATE NOT NULL DATE
JOB_ID NOT NULL VARCHAR2(10)
SALARY NUMBER(8,2)
COMMISSION_PCT NUMBER(2,2)
MANAGER_ID NUMBER(6)
DEPARTMENT_ID NUMBER(4)
SQL> desc departments
Name Null? Type
DEPARTMENT_ID NOT NULL NUMBER(4)
DEPARTMENT_NAME NOT NULL VARCHAR2(30)
MANAGER_ID NUMBER(6)
LOCATION_ID NUMBER(4)
SQL> desc locations
Name Null? Type
LOCATION_ID NOT NULL NUMBER(4)
STREET_ADDRESS VARCHAR2(40)
POSTAL_CODE VARCHAR2(12)
CITY NOT NULL VARCHAR2(30)
STATE_PROVINCE VARCHAR2(25)
COUNTRY_ID CHAR(2)It's required from me as an exercise :-
Display the last_name ,department name and salary of any employee
whose salary and commission match the salary and commission of any
employee located in location ID 1700 .
I wrote the following code
SQL> select e.last_name,d.department_name,e.salary from employees e
2 join departments d using (department_id)
3 where (salary,commission_pct)
4 in (select salary,commission_pct from employees
5 where department_id in
6 (select department_id from departments where location_id=1700));
but no rows selectedCan anyone correct me because some rows should be retrievedHi,
This sounds like homework, so I won't spoil it for you.
What does "match" mean? Does NULL "match" NULL? Remember, in SQL,
NULL = NULLis not true, so
where (salary, commission_pct)
in (select salary, commission_pct
...won't be true if the salaries are the same and both commission_pcts are NULL.
One way to deal with NULLs (when you want to consider NULL as equal to NULL) is to equate NULL with some value that can never exist in that column. For example, if you know that commission_pct is never less than 0, you could test
NVL (commission_pct, -1)instead of just commision_pct.
Can salary be NULL, too?
If you don't know an impossible value, then you're better off not using an IN sub-query with numbers. An EXISTS sub-query would work. -
Retrieve data from Notes with append only attribute using jsom
How can I retrieve the data in a Notes field which has the "Append Only" attribute set to TRUE, using the SharePoint jsom api?
Hi IH20,
You can use SPServices to get the version values of the note field:
http://spservices.codeplex.com/wikipage?title=GetListItems
Thanks,
Qiao Wei
TechNet Community Support -
I am using the "fetch all" vi to do this, but it is retrieving one record at a time, (if you examine the block diagram) How can i retrieve all records in a faster more efficient manner?
If this isn't faster than your previous method, then I think you found the wrong example. If you have the Database Connectivity Toolkit installed, then go to the LabVIEW Help menu and select "Find Examples". It defaults to searching for tasks, so open the "Communicating with External Applications" and "Databases" and open the Read All Data. The List Column names just gives the correct header to the resulting table and is a fast operation. That's not what you are supposed to be looking at ... it's the DBTools Select All Data subVI that is the important one. If you open it and look at its diagram, you'll see that it uses a completely different set of ADO methods and properties to retrieve all the data.
-
Retrieveing data using RH_READ_INFTY_1001 in ECC 6.0
Hi Guys,
I am working on ECC 6.0. I need to fetch data from table HRP1001.
Hence am using the FM RH_READ_INFTY_1001.
This FM retrieves all the records but populates the fields SCLAS &
SOBID with garbage values. These are the main relation fields i need.
Can anyone suggest how to solve this. Below is the code.
CALL FUNCTION 'RH_READ_INFTY_1001'
EXPORTING
PLVAR = C_01
OTYPE = P_OTYPE
OBJID = P_OBJID
ISTAT = '1'
BEGDA = P_BEGDA
ENDDA = P_ENDDA
TABLES
I1001 = P_1001
EXCEPTIONS
NOTHING_FOUND = 1
WRONG_CONDITION = 2
WRONG_PARAMETERS = 3
OTHERS = 4
Regards,
Sandeep.hello
It is waiting for some post processing.
Please check the
Note 930816 - Cond. Maint. group not generated after remote client copy.
971707 , 1176933
This will help you.
Thanks
Amit -
Best practice: Retrieving data using DI server
Hello experts,
We are going to build a web shop using DI server. We are not going to use B1WS, because it is not supported and it seems like a lot of people can't get it to work (and so can't we).
DI Server supports some Data Retrieve Messages, but most of them have a very restricted use. GetItemList for example only returns the item codes and item names. I can't limit the amount of returned values and I can't add columns to the results (if I'm mistaken about this, please tell me so!)
What are best practices for this?
Do I use the ExecuteSQL Data Retrieve Message in those cases (like 90-95% of the time) or do I use combinations of Data Retrieve Messages?
Thanks for your time!
VincentHi Vincent,
What you mentioned are actual problems with current DI API and DI Server. You can't set the amount when using GetItemList both in DI API and DI Server. The design maybe just consider the common requirements in mid/small size companies. So I think it's better to use ExecuteSQL if you have special requirement.
Regards,
MIN Hongjun -
Retrieve Data using SQL Data Reader
Hello Team, I am working on a program where we have to read the data from sql database for specific barcode. Please have a look at the code below.
If SqlConnection.State = ConnectionState.Closed Then
SqlConnection.Open()
End If
Try
Dim SQLCommand As New SqlClient.SqlCommand("SELECT * FROM tblProducts WHERE Barcode= @Barcode", SqlConnection)
SQLCommand.Parameters.AddWithValue("@Barcode", txtPurchaseBarcode.Text)
frmNoBarcode.lblBarcode.Text = txtPurchaseBarcode.Text
Dim SQLReader As SqlClient.SqlDataReader
SQLReader = SQLCommand.ExecuteReader
If SQLReader.Read Then ' Barcode Exist
' Load Product Name
lblFetchProduct.Text = SQLReader.Item("ItemName").ToString
SQLReader.Close()
End If
Catch ex As Exception
End Try
If SqlConnection.State = ConnectionState.Open Then
SqlConnection.Close()
End If
So It display the records, I just want that, in some case, if the program is unable to search for the barcode, then program should give me a message that the Item does not exist and Exit Sub the application. Can somebody help me up ?Sir, can you please help me by giving me a code sample so I can understand in a better way, thanks
If you are referring to me, the way I would write the whole code: (just a suggestion...)
Private Function GetItemNameFromTblProductsByBarcode(ByVal Barcode As String) As String
If SqlConnection.State = ConnectionState.Closed Then
SqlConnection.Open()
End If
Try
Dim SQLCommand As New SqlClient.SqlCommand("SELECT ItemName FROM tblProducts WHERE Barcode= @Barcode", SqlConnection)
Dim Value As Object
SQLCommand.Parameters.AddWithValue("@Barcode", Barcode)
Value = SQLCommand.ExecuteScalar
Return If(Value Is Nothing, Nothing, Value.ToString)
Finally
SqlConnection.Close()
End Try
End Function
'' Call:
Dim Itemname As String
Itemname = GetItemNameFromTblProductsByBarcode(txtPurchaseBarcode.Text)
If Itemname Is Nothing Then
MessageBox.Show( _
"The item with the barcode " & txtPurchaseBarcode.Text & " does not exist.", "", _
MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
lblFetchProduct.Text = Itemname
frmNoBarcode.lblBarcode.Text = Itemname
End If
I do not know whe meaning of lblFetchProduct and frmNoBarcode.lblBarcode, so I just set them both in case the barcode has been found.
Armin -
Problem of retrieving data using JComboBox
I built 6 JComboBoxes for retrieving starting day and end day. They are all in the same panel. I could get correct indexes for 6 JComboBoxes, however, I couldn't get the correct object of the month of the end day. Sometimes, I could n't get the correct object of the month of the starting day too. How could I solve this problem?
Here is part of the code:
JComboBox comboToMonth = new JComboBox();
String month[] = { "-", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"};
comboToMonth = new JComboBox(month);
comboToMonth.setFont(universe_font);
comboToMonth.setMaximumRowCount(3);
comboToMonth.addActionListener(this);
panel.add("Center", comboToMonth);
public void actionPerformed(ActionEvent e) {
if ( e.getSource() == comboFromYear) {
int temp = comboFromYear.getSelectedIndex();
} -
Time frames are not accurate with data used?
Why does the time frame of Data used not correctly reflect the same on my bill?
Hi Critch! Thats a great question. The difference in times may be reflective of difference in time zone or usage not reported while on an extended network. Are the times off by a few minutes or several hours? Does this happen with voice and messaging usage as well?
Thanks,
AdamE_VZW
Follow us on Twitter @VZWSupport -
Can we retrieve Data of Single Dimension in multiplecolumns in Excel Add-in
Hi All,
I have strange requirement of having single dimension in two columns while retrieving data from essbase using Excel Add-In.
Logically I feel it is not possible however we are looking if there is any possibilty of work arround for this requirement.
Whenevr i am trying to retrieve data using a macro on a single column we are able to successfully do it. But in case of multiple columns we are unable to do it.Do let us know if there is any work arround or alternative method to handle this requirement.
Regards,
KrishnaNot completely sure what you mean by "single dimension in two columns". Normally this request comes down to wanting to show multiple levels from a dimension, e.g...
_______________"Sales"
"100" "100-10" 12345
"100" "100-20" 34567...which is definitely not possible.
If you just mean data like this (with multiple columns from the same dimension)...
________"100-10" "100-20"
"Sales" 12345 34567...then that should work fine.
If you could post a sample of what you'd like to see, it would be easier to answer. -
How to Retrieve data from database into another form ?
Good Day!
Am currently new at JSP. I've been studying it for awhile and still getting the hang of it. We are working on a project.
Editing a given data. We have to retrieve the given data and post it to another form "Editing form".
Since we can retrieve data using JSP but how are we going to post it to another form? I mean how are we going to transfer data from one form to another?
Can anyone help me with codes please..The client is a web browser.
The client submits a request (click a link, visit a form)
The server gets to respond to this
- look at request parameters from the client
- access database
- produce resulting html page
- send page back to client.
The standard pattern is to retrieve data from the database in java code, and then load that data into a bean.
You then make that bean available as an attribute
It is then available for use in your JSP - either <jsp:useBean> tag or using ${ELexpressions}
All you can pass from the client to the server is request parameters - which are always strings.
Draw a picture of where the information is, and the information flows. Very rarely does it go directly from one "form" to another.
Cheers,
evnafets -
hi, i just uploaded to our remote host the files with php and
flex combination. here on my local computer, i was able to retrieve
data using my local database, i also tried to connect from my local
using a remote database. but when i uploaded the files, and tried
to connect to a red hat linux host i think, i cant make it to work.
i can see the interface but no data was retrieve. i googled some
possible options and used crossdomain, but still cant get it to
work. im, by the way, new to flex and would like to explore this
great technology. i was thinking the my tags in
<mx:HTTPService> were incorrect, i have url="
http://server/docroot/pages/php/request.php",
i also tried url="php/request.php", but still failed to retrieve
the information.hope u can help me guys. thank you in
advance.If you're loading your SWF from one server, and contacting
another server,
you need place the crossdomain.xml file on the other server
from which you're
requesting data, typically in the webroot.
That is, if you're trying to contact "
http://server/docroot/pages/php/request.php"
then you'd need to have a crossdomain.xml file at "
http://server/crossdomain.xml".
This crossdomain.xml policy file must include the domain from
which your
SWF was loaded in order for it to be allowed to contact this
domain.
Hello arpiyem,
> hi, i just uploaded to our remote host the files with
php and flex
> combination. here on my local computer, i was able to
retrieve data
> using my local database, i also tried to connect from my
local using a
> remote database. but when i uploaded the files, and
tried to connect
> to a red hat linux host i think, i cant make it to work.
i can see the
> interface but no data was retrieve. i googled some
possible options
> and used crossdomain, but still cant get it to work. im,
by the way,
> new to flex and would like to explore this great
technology. i was
> thinking the my tags in <mx:HTTPService> were
incorrect, i have
> url="
http://server/docroot/pages/php/request.php",
i also tried
> url="php/request.php", but still failed to retrieve the
> information.hope u can help me guys. thank you in
advance.
>
Maybe you are looking for
-
Should 1 database in ABAP have one DBMS & one KERNEL&BASIS SERVICES?
Q] Relationgt to ABAP basisc:- Should 1 database in ABAP have one DBMS & one KERNEL&BASIS SERVICES?
-
I am running a web report that just has a query in it (testing). When I run it I get the error: Web template error in specifications for the Web item report The parameter REPORT for the Report Web item in the Web template is empty or missing Add the
-
How can I get a full song to play completely before it stops in the first 20 seconds?
Has this happen to anybody else?
-
Hi!! i´m new in APEX, i´m creating a custom PDF, i have downloaded the Oracle BI, and i generate my *.rtf Archive, all is OK, except when i try to open the PDF file, i get an error that i can't see, but i can read this when i export to *.doc file. i
-
Hi All, Have a possibility to use Tiles with UIX pages? If not, what the better alternative to Tiles facilities with UIX? Thanks