Selection of data
hi friend's,
I need one logical help. I having a database table there are some fields .
Three Fields are: Year, Employee Code(Pernr), Employee Name(Ename).
I m using query as following:
SELECT PERNR ENAME FROM ZTRUST INTO (YEAR_ITAB-PERNR, YEAR_ITAB-ENAME)
WHERE WORKAREA = 'CON'.
Through this query i m extracting all data and repeated employee namen and emp. code , but i want any employee name or code only one time.
I hope i clear my point. Plz send me logic for that.
Regards,
Swapnika
HI
U r req is : u may have multipul records in the table for one PERNR but while selecting u need only one record per PERNR.
Sol:
select distinct PERNR ENAME FROM ZTRUST INTO (YEAR_ITAB-PERNR, YEAR_ITAB-ENAME)
WHERE WORKAREA = 'CON'.
Kiran
Similar Messages
-
How to select the data from a Maintainance View into an internal table
Hi All,
Can anybody tell me how to select the data from a Maintainance View into an internal table.
Thanks,
srinivas.HI,
You can not retrieve data from A mentenance view.
For detail check this link,
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm
Regards,
Anirban -
Selecting all data from employee where foreign key = null and show it in view
Hi guys i have view like following :
SELECT dbo.Nationality.NationalityName, dbo.Employee.DriverName, dbo.Employee.DriverID, dbo.Employee.NationalityID, dbo.Employee.ResidentNo,
dbo.Country.CountryName, dbo.Employee.CountryID, dbo.Branch.BranchName, dbo.Employee.BranchID, dbo.Employee.JoinDate,
dbo.Employee.ResignDate, dbo.Employee.HealthCarNo, dbo.Employee.JobID, dbo.Jobs.JobName, dbo.Department.DepartmentName,
dbo.Jobs.DepartmentID, dbo.Employee.PlaceIssue, dbo.Employee.Deduction, dbo.Employee.ExpireDateMedical, dbo.Employee.PolicyNumber,
dbo.Employee.Owner, dbo.Employee.Version, dbo.Employee.ExpireDateResident, dbo.Employee.Salary, dbo.Employee.SexID, dbo.Sex.SexType,
dbo.Sex.FlagSex, dbo.Employee.MiritialID, dbo.Miritial.MiritualStatus, dbo.Status.StatusType, dbo.Employee.StatusID, dbo.Employee.UnactiveReason,
dbo.Employee.BirthDate, dbo.Employee.DateToday, dbo.Employee.UserID, dbo.Employee.PassportNo, dbo.Employee.Period,
dbo.Employee.AccountNo, dbo.Employee.Bonus, dbo.Employee.AccountType, dbo.Employee.PlaceOfBirth, dbo.Employee.EmplyeeName,
dbo.Employee.ExpireDateresidentHijri, dbo.Employee.PassportDateStart, dbo.Employee.PassportDateExpire, dbo.Religon.ReligonName,
dbo.Employee.ReligonID
FROM dbo.Nationality INNER JOIN
dbo.Employee ON dbo.Nationality.NationalityID = dbo.Employee.NationalityID INNER JOIN
dbo.Country ON dbo.Employee.CountryID = dbo.Country.CountryID INNER JOIN
dbo.Branch ON dbo.Employee.BranchID = dbo.Branch.BranchID INNER JOIN
dbo.Jobs ON dbo.Employee.JobID = dbo.Jobs.JobID INNER JOIN
dbo.Department ON dbo.Jobs.DepartmentID = dbo.Department.DepartmentID INNER JOIN
dbo.Sex ON dbo.Employee.SexID = dbo.Sex.SexID INNER JOIN
dbo.Miritial ON dbo.Employee.MiritialID = dbo.Miritial.MiritialID INNER JOIN
dbo.Status ON dbo.Employee.StatusID = dbo.Status.StatusID INNER JOIN
dbo.Religon ON dbo.Employee.ReligonID = dbo.Religon.ReligonID
suppose i need to show all data from Employee table (NationalityName,BranchName,JobName) where
NationalityID =NULL OR BranchID=NULL OR JobID=NULL
WHAT I DO
Notes : I mean in topic(selecting all data from view not table
meaning i need to show all data in employee table by view
in case of forign key(any forign key)equal nullI think you need to change
FROM dbo.Nationality INNER JOIN
dbo.Employee ON dbo.Nationality.NationalityID = dbo.Employee.NationalityID
to
FROM dbo.Nationality
LEFT JOIN
dbo.Employee ON dbo.Nationality.NationalityID = dbo.Employee.NationalityID
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Cannot select a Date in the 2nd week of any month from "Month View"
Looking for some help with a strange problem that has started within the last day or 2. In Calendar, under the Month view, it will not allow me to select a date in the current week (or the second Week dates in ANY Month for that matter i.e. 6-8-08 thru 6-14-08, 8-3-08 thru 8-9-08, 4-6-08 thru 4-12-08). It skips from the 1st week of June (6-1-08 thru 6-7-08), to the 3rd and 4th weeks of June (6-15-08 thru the end of the month). It is like it is not recognizing where my finger is pointing. I can access the current week through the list view and day view, and it will allow me to post an event by choosing the current week in the add option, but will not let me pick that date to view it once it has been scheduled. The dot shows up, and it shows on list view, but cannot get to the date by selecting it in month view. That section of my phone screen will let me access other applications and recognize where I am touching, so I don't believe it is a sensor issue. I have tried rebooting, but it has not helped. Any ideas out there? Please let me know. Thank You! for any guidance.
Clearwater Randy,
If the screen is only not responding in that particular application, you may want to first do a reset. To reset, press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears.
If that does not resolve your issue, try restoring in iTunes. To restore, connect your iPhone into iTunes and click Restore on the Summary page. Note: All of your information will be erased from the iPhone, so make sure to have a backup of important information on your computer before restoring.
Hope this helps,
Jennifer B. -
How to select maximum date in report
i have tried to select maximum date in my report by this way:
select max(date) from a
but the result came out same as "select date from a"
there is no different whether i put a max or not. is anyone there can help me on this please....
Thank you....Hi Sharon,
Since you cannot execute this query from SQL, I assume that the DB does not support the function MAX(expr). Am not sure which DB versions support this function, probably the Database forum will be a better place to ask that.
As a workaround, what you could try is to use this statement
select hire_date from employees order by hire_date desc
and in the report data model, you make a summary column and choose Function > First, Source > Hire_Date, and Reset At > Report.
Hope that helps.
Navneet. -
Hello , I need your help , to access to every date in an interval of the select option , in order to execute a function module that use date in one of its parameters .
select-options : dat for sy-datum .
CALL FUNCTION 'ZPRUEBA''
EXPORTING
offic =
chdsk =
inicio_periodo =
FIM_PERIODO = dat "but i need here every date of the interval
NO_UPDATE =
IMPORTING
NR_COBRANCAS =
ENDSELECT.
How can I do that ? , tnhx.hi
put the function module in the loop.
data : date like sy-datum.
select-options : s_date for date.
while ( s_date-low LE s_date-high ).
CALL FUNCTION 'ZPRUEBA''
EXPORTING
offic =
chdsk =
inicio_periodo =
FIM_PERIODO = s_date-low
NO_UPDATE =
IMPORTING
NR_COBRANCAS =
add 1 to s_date-low.
endwhile.
reward if helpful
prasanth -
How to display null values in the graphs, when i select a date range?
Hi,
Can you please help me in achieving the below requirement:
We have a date promt, i have selected the date range from 12-Oct-2009 to 15-Oct-2009 and clicked on the go button.
In the above date range, data is only availabe on 14-Oct-2009. here the requirement is to display as all the records (12th, 13th , 14th & 15th) in the bar graph.
Currently the graph view is displaying the data only for 14-Oct-2009 in the bar graph.
If data is not available it should display in the bar graph as empty for that particular dates.
Help is highly apprieciated.
Thanks in Advance.Check out [this post|http://obiee101.blogspot.com/2009/04/obiee-showing-zero-in-bargraph.html].
-
How can I select a date to view in Calendar while I am in month view?
I am looking at month view in Calendar on my iPad. I touch a date. Intuitively, I expect that date to open up in Day or Week view, but it doesn't! On my iphone, it works just fine. Am I missing something?
How can I select a date to view while in Month view and have it go to Day or Week view?
Thanks for any help.I would try this:
In Lr import one photo into a different folder that you can see in the list.
Then in your OS (mac Finder / Win Explorer) move the photo to the folder that you cannot see.
In Lr the photo will now appear with a question mark on its frame. Click directly on the question mark and select <Locate photo>. Navigate to the folder, open it, and click on the photo.
Maybe this will help Lr to recognize the folder.
If this doesn't help try renaming the folder in your OS. -
How to get selected row data of an ADF table in HashMap?
Hi,
Can anyone please tell me how to selected row data of an ADF table in HashMap like :
Object obj = pageTable.getSelectedRowData();
JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)obj;
Now in above code I want the convert rowData in HashMap.
Can anyone please tell me how to do that? Its urgent.
Thanks,
VikVik,
No need to ask the same question 3 times...
In [url http://forums.oracle.com/forums/message.jspa?messageID=4590586]this post, Nick showed you how to get the Row.
If it were so urgent, you could have done a little reading of the javadocs to come up with code like this (not tested, up to you to do that)
HashMap m = new HashMap();
Row r = get it like Nick showed you to;
Object values[]=r.getAttributeValues();
String names[]=r.getAttributeNames();
for (int i=0; i<r.getAttributeCount(); i++)
m.put(names, values[i]); -
To Select the data from two table one is transp table and onther is cluster
Hi All,
I want to select the data from two tables
Here i am giving with an example.
Fileds: kunnr belnr from bseg. table bseg
fields: adrnr from kna1 table: kna1.
Know i want to put these into one internal table based on kunnr and belnr.
Thanks in advance.
RameshHi,
U cant use joins on cluster table and BSEG is a cluster table so use FOR ALL ENTRIES for taht
refer this code
*& Form sub_read_bsak
text
--> p1 text
<-- p2 text
FORM sub_read_bsak.
*--Select data from BSAK Table
SELECT lifnr
augdt
augbl
gjahr
belnr
xblnr
blart
dmbtr
mwskz
mwsts
sgtxt
FROM bsak
INTO CORRESPONDING FIELDS OF TABLE it_bsak
WHERE belnr IN s_belnr
AND augdt IN s_augdt.
IF sy-subrc EQ 0.
*--Sort table by accounting document and vendor number
SORT it_bsak BY belnr lifnr.
ENDIF.
ENDFORM. " sub_read_bsak
*& Form sub_read_bseg
text
--> p1 text
<-- p2 text
FORM sub_read_bseg.
IF NOT it_bsak[] IS INITIAL.
*--Select data from BSEG table
SELECT belnr
gjahr
shkzg
kostl
hkont
ebeln
ebelp
FROM bseg
INTO CORRESPONDING FIELDS OF TABLE it_bseg
FOR ALL ENTRIES IN it_bsak
WHERE belnr EQ it_bsak-belnr
AND gjahr EQ it_bsak-gjahr
AND shkzg EQ 'S'.
IF sy-subrc EQ 0.
*--Sort table by accounting document
SORT it_bseg BY belnr.
ENDIF.
ENDIF.
ENDFORM. " sub_read_bseg -
How do I select a date column and display the millesecond along with it.
I am trying to select a date column from database and want to
display millesecond with it. How do I do this. I am aware of
the "alter session set NLS_DATE_FORMAT = 'MM/DD/YY HH:MI:SS'"
command. However, I do not know how to display this with the
millesecond.
Thanks for all the help.Example:
SQL> CREATE OR REPLACE JAVA SOURCE
2 NAMED "MyTimestamp"
3 AS
4 import java.lang.String;
5 import java.sql.Timestamp;
6
7 public class MyTimestamp
8 {
9 public static String getTimestamp()
10 {
11 return (new
12 Timestamp(System.currentTimeMillis())).toString();
13 }
14 };
15 /
Java created.
SQL> CREATE OR REPLACE FUNCTION my_timestamp
2 RETURN VARCHAR2
3 AS LANGUAGE JAVA
4 NAME 'MyTimestamp.getTimestamp() return java.lang.String';
5 /
Function created.
SQL> CREATE TABLE test_time
2 (date_col VARCHAR2 (23))
3 /
Table created.
SQL> INSERT INTO test_time (date_col)
2 SELECT my_timestamp
3 FROM dual
4 /
1 row created.
SQL> SELECT date_col
2 FROM test_time
3 /
DATE_COL
2001-11-02 14:58:51.766 -
How to make users to select the date from calendar control only, by my making the date text field read only (don't want to let users type the date) in date time control in external list in sharepoint 2010. I am looking for a solution which can
be done through sharepoint desginer / out of the box.
thanks.Congratulate you got the solution by yourself. I am new to a
WinForms calendar component, I feel so helpless on many problems even I'd read many tutorials. This question on the
calendar date selection did me a great favor. Cheers. -
Unable to select Quantitative data during creation of MIC while using Clas
*Unable to select Quantitative data during creation of MIC while using Class characterstics*
Dear All,
I want to transfer MIC Result recording to Batch class.
For that, i am trying to create MIC & giving class characteristic name in QS21, and then under control data, I am unable to select, Quantitative. By default system is selecting Qualitative. But I want to create that MIC as Quantitative.
Is there any setting for this?
Please help...
Thanks in advance
Edited by: Sitarami Reddy Kummeta on Nov 30, 2009 6:44 PMHi
to have master inspection characteristic quantitative ,the class characteristic must be of format "NUM":
Regards
Sujit -
Select RTF Data and display in PDF Document
Hi all,
I have a simple table:
CONTENT_ID - NUMBER
CONTENT - VARCHAR2(4000)
On top of this table I have a form that allows the user to enter / update data. The 'CONTENT' field is a Rich Text Editor (ApEx 4.0 - CKEditor 3). This allows the user to enter and format their text as they require.
I need to be able to select this data and display it in a PDF Document (via BI Publisher).
I therefore have a simple query
select content from content_table where content_id = 1;and a simple template that processes the resulting xml:
<?xml version="1.0" encoding="UTF-8"?>
<ROWSET>
<ROW>
<CONTENT>& lt;h2& gt;
This is a heading& lt;/h2& gt;
& lt;p& gt;
This is the text& lt;/p& gt;
</CONTENT>
</ROW>
</ROWSET>(There is not really a space between the & and 'lt' etc but I had to add this to get it to display correctly here).
Where I run this past my template I get a PDF with:
<h2>
This is a heading</h2>
<p>
This is the text</p>I get the same if I generate HTML.
but what I want to see is the text formatted as the user has entered in the RTF editor.
Can this be done?
Many thanks,
MartinI think your mixing 2 technologies.
At 1 side you have xml in combination with xsl (style sheets used in BI Publisher and FOP) to generate your pdf. And at the other side you have HTML...
XML and HTML are 2 entirely different technologies which you can not mix this simple. I investigated the same problem as you had, and in the end I ended up using jasperreports instead of FOP.
Maybe BI Publisher has some html regions which you could insert into your word document but I doubt it cause more people have asked the same question on this board...
So my advice: use jasperreports (also it is free for commercial usage)
Success
Br,
Nico -
Selectively transfer data to new ipad from backup
My 64gb 1st generation ipad was recently stolen. I do, however, have a recent backup stored on my macbook pro. I would like to replace my ipad and restore my old data, however I am cheap and feel that 16gb should be sufficient for my needs. I was wondering whether restoring from the backup will work, given the difference in the hard drive size (the size of the backup folder on my mac pro is 46gb). Most of the old data is movies which I don't need. However, there is <1gb of critical data (personal notes) which I desperately want to see again. Is there any way to selectively recover this data? Thanks!
Sounds like I'm stuck then. I found one forum thread that suggested you could trick the ipad into selectively overlooking data from certain apps during restore by deleting them from itunes (https://discussions.apple.com/message/23622388?searchText=Selectively%20transfer %20data%20to%20new%20ipad%20from%20backup#23622388). If true, I think this could solve my problem since most of the data is from a single app. Do you think this could work?
Thanks for your help, Diavonex! -
How to select multiple data without select options?
Dear experts,
I have a rquirement that i have a one selection screen and in that selection screen on date field is there which is parameter type. we using this parameter date field in the program for selecting data..after that i am using the logic to multiple value..now my requirement is how to select the data for multiple value..
PARAMETERS : SO_DATE TYPE SY-DATUM OBLIGATORY.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
DATE = so_date
DAYS = 1
MONTHS = 0
SIGNUM = '-'
YEARS = 0
IMPORTING
CALC_DATE = so_date
l_cm_first+0(6) = so_date+0(6). " month & year
l_cm_first+6(2) = '01'. " date
l_cm_end = so_date.
my requirement is that how to use l_cm_first and l_cm_end multiple selection in select query ??
eg- i want to fetch the data from 1/8/2014 to 11/08/2014 using this field l_cm_first and l_cm_endl_cm_first+0(6) = so_date+0(6). " month & year
l_cm_first+6(2) = '01'. " date
l_cm_end = so_date.
after executing this line l_cm_first = 1/8/2014 and l_cm_end = 11/08/2014
now i have to select in this range how to do it?
Maybe you are looking for
-
File does not exist portal oa_html appslogin r12
Hi Team, I am unable to getting log in page after change apps,system and sys passwd .Could you please help me ... Error: file does not exist portal oa_html appslogin r12 due to above error am not able to getting EBS login page.. db version:11.2.0.3
-
I purchased an iTouch for my 10 year old for Christmas. He is currently using my old iPhone 3g to play angry birds and other things. My question is whether I should create an iTunes account for him or if I should simply sync his device to my account
-
Hello How can i delete some episodes on my apple tv? But i wish doind it thru the apple tv thanks Paula
-
Do I need to install PPAPI plug-in of Adobe Flash Player?
Currently using NPAPI Plug-in version 17.0.0.169 with Safari in Yosemite 10.2.2. I noticed there is an option to install a PPAPI plug in. Is that just for Chrome (which I don't use), or do I need it for Safari or Firefox? A few sites have indicate
-
I am using an iPad 2 32 gig. And I can't download anything and it is starting to make me super angry.