Query to come out the list
I hope somebody can help me to produce the output as shown
below:
ID NAME COURSE REC OF R2001
16DAT03F501 NUR ZAYANA BINTI MD YUSOF DAT 2
16DAT03F502 AZLIZA BINTI ZAINAL DAT 1
My problem is, i have no idea to get the output at the last
column. I want the total output (REC OF R2001) for each ID. Let
say, NUR ZAYANA have 2 records of R2001 and the list should show
the total of her record for R2001.
The database design is something like this:
16DAT03F501 NUR ZAYANA BINTI MD YUSOF DAT1 R2001
16DAT03F501 NUR ZAYANA BINTI MD YUSOF DAT1 R2001
16DAT03F502 AZLIZA BINTI ZAINAL DAT1 R2001
It sounds as if you need to use an aggregate function like
COUNT(). Either something like
SELECT ID, NAME, COURSE, COUNT(*) AS NumberOfRecords
FROM YourTable
GROUP BY ID, NAME, COURSE
... OR ...
SELECT ID, NAME, COURSE, COUNT(NameOfR2001Column)
NumberOfRecords
FROM YourTable
GROUP BY ID, NAME, COURSE
Similar Messages
-
Query to find out the list of user who have delete access
Hi,
I need a query to find out the list of users who have delete access on perticular folder/universe/ reports in infoview.
Please advice.
Regards,
Neo.orton607 wrote:
thanks for replying guys. But the thing is i am using dynamic sql execute immediate in my package, so i want those tables also and the schema name.
thanks,
ortonThis is not possible. The best you could do is to have a good guess.
Or how would you parse some dynamic statement as this:
v_suffix := 'loyees';
v_sql := 'Select count(*) from (select ''nonsense'' col1 from emp'||v_suffix||') where col1 = ''Y'''';
execute_immediate(v_sql);
...What is the table name? How do you want to parse that?
Better rewrite all dynamic SQL statements into non dynamic ones. Or do the source control logic for those dynamic parts in an extra module. For example implement your own dependency table and force every developer to add there all dynamic parts. -
Query to find out the list of tables used in a package
hello,
can anyone please help me out with a query; i want to find out the list of tables used by a particular package.
thanks,
ortonorton607 wrote:
thanks for replying guys. But the thing is i am using dynamic sql execute immediate in my package, so i want those tables also and the schema name.
thanks,
ortonThis is not possible. The best you could do is to have a good guess.
Or how would you parse some dynamic statement as this:
v_suffix := 'loyees';
v_sql := 'Select count(*) from (select ''nonsense'' col1 from emp'||v_suffix||') where col1 = ''Y'''';
execute_immediate(v_sql);
...What is the table name? How do you want to parse that?
Better rewrite all dynamic SQL statements into non dynamic ones. Or do the source control logic for those dynamic parts in an extra module. For example implement your own dependency table and force every developer to add there all dynamic parts. -
How to find out the list of includes:
Hi,
I want to find out the list of includes, hw can I do that..
Suppose: ex: I want to know all the includes starting with zabc* hw can I do it, and one more question, where all the (total) includes will be stored.
Akshitha.Hi akshitha,
1. We can do that from se38.
2. in se38, Press Ctrl + F
3. A new window will come for search.
4. <b>by pressing 4th button on toolbar, expand the search window.</b>
5. <b>In "Program Type", enter : I (for include only)
In Program Name" enter : ZABC*</b>
6. Execute.
regards,
amit m. -
How can I find out the list of users who has the access to IT 0008
All,
How can I find out the list of users who has the W R permission for IT 008
for others?
SUIM doe not look like giving me the correct results.
Please advise.
Thanks,
From
PT.combine tables AGR_1251 and table AGR_Users on keyfield AGR_USERS
in tabel AGR_1251 select on Field LOW values IT0008.OR W OR R,
noiw you get also other values
So better solution run the query twice over AGR1251 first on IT0008 and secondly on values W OR R and then the result over table AGR_USERS
Youu also might put an additional selection on object P* (only selecting HR objects)
output wll be UID in table AGR_USERS -
The workflow could not check out the list item.
Hi Guys,
I have a workflow enabled on document library and it needs to started manually.
Whenever user starts workflow manually, gets following error:
"the workflow could not check out the list item. Make sure the list item is not checked out." list item is not checked out & this workflow was working smoothly earlier.
OutCome: The workflow operation failed because the workflow lookup found no matching item.
I have gone through below links:
https://christopherclementen.wordpress.com/2014/05/23/oob-approval-workflow-error/
https://social.msdn.microsoft.com/Forums/office/en-US/f673d0f6-92eb-4057-95ff-ed3cb7790360/the-workflow-operation-failed-because-the-workflow-lookup-found-no-matching-item?forum=sharepointcustomizationprevious
Any clue on this?
Thanks, Nileshmaybe check out for editing documents setting is turned on so wokrflow needs doc to ce cheked out before proceding and user might not have permission to do that.
please refer below link:
http://sharepoint.stackexchange.com/questions/32399/workflow-error-the-workflow-could-not-update-the-item-possibly-because-one-or
http://community.office365.com/en-us/f/154/t/243062.aspx
http://stackoverflow.com/questions/1272957/document-checked-out-in-sharepoint-when-workflow-starts
Please mark as answer if you find it useful else vote for it if it is close to answer..happy sharepointing -
the sound do not come out the headphones sometimes altho its all the way up in the setting and when i remove the headphones the sound doesnt come from the internal speaker either and only a reboot fixes the problem and thats annoying! any idea how tto fix this?
Hello. I've been able to play sound without problems through headphones or external speakers to date - the output always switched to these automatically until today. Now, sound output continues through internal speakers even if I plug in headphones or external speakers.
- I tested the headphones and speakers on other devices: they work fine.
- When I plug in headphones or speakers into the audio output port (I have verified that I'm not using the input jack) the devices are not detected and are not listed under the output tab in system preferences-sound.
I concluded from this that I probably had a problem with the audio port, so to test that I tried the following. I plugged a powered multi-USB device with ports for microphone line-in and headphone line-out into the USB port and switched it on. I verified that it was working by plugging a USB stick into the multi-USB device - this was recognised successfully, so the device was clearly working. I then plugged in headphones and speakers into the audio line-out on the multi USB device - but still no sound came through them (and tey were not listed among output devices) and the Mac continued using internal speakers.
What should I do? Does the latter test suggest that the problem does not lie with the audio port, or is my test not conclusive? What would you advise?
Many thanks indeed!
NG -
How to find out the list of field exists for a particular transaction
Hi all,
Can u please help me find out the list of field exits available for a particular Tcode?
Is it similar to User exit or . . . . ?
Thanks,
C.Selvaraj
SAP-QMCreate a program and add this code to find user exit
tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
tables : tstct.
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
parameters : p_tcode like tstc-tcode obligatory.
select single * from tstc where tcode eq p_tcode.
if sy-subrc eq 0.
select single * from tadir where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to v_devclass.
if sy-subrc ne 0.
select single * from trdir where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir where pname = tstc-pgmna.
select single * from enlfdir where funcname =
tfdir-funcname.
select single * from tadir where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name eq enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
endif.
select * from tadir into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_devclass.
select single * from tstct where sprsl eq sy-langu and
tcode eq p_tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ', "#EC NOTEXT
20(20) p_tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name', "#EC NOTEXT
21 sy-vline ,
22 'Description', "#EC NOTEXT
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill. "#EC NOTEXT
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'. "#EC NOTEXT
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'. "#EC NOTEXT
endif.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen.
Rewards if useful........................
Minal -
How to find out the list of patches applied without using inventory?
Hi,
I have been asked this question once.
How will you find out the list of patches applied to Oracle Database Home without using commands like opatch lsinventory -detal etc...
I think registry$history is a view from where we can find out the list of patches applied.
But I think it will not include all the bug fixes,stand alone or one-off patches.It will mainly list out the CPU patches applied(correct me if I am wrong).
Thanks,
RushiHi;
Thanks Helios,
Your welcome
Could you tell me how do you all senior people manage to find metalink note for almost everything?There is nothing special, For me I just make more search at metalink than googling so after sometimes you started to notice which note could be related wiht issues more clearly.. Just keep searching at metalink and focus what you are searching only.. ;)
If you could guide me I can do it my self and stop bothering you for some silly doubts.You dont bother me and also I belive the other forum users ;) We are also learning new information wiht user questions ;)
Regard
Helios -
How to find out the list of implemented OSS Notes in a particular period.
Hi Friends,
Need help.
I need to find out the list of OSS Notes implemented in a period in a particular system.
Could you please suggest the table or program or any way to find out the OSS Notes Implemented date wise?
Thanks in Advance.
SreenivasHi Sreenivas.
How did you find the solution to this? Trying to do the same thing!
Cheers,
Tom -
How to find out the list of workflows with active event linkage?
Hi All,
I want to find out the list of workflows whoe event linkage is activated in the system.
Through SWU0, we can get a list of workflows attached to a particular event of a business object.
Thanks,
SivagamiHi,
Thanx for ur reply..
I got the list from the table...
thanks,
sivagami -
How to find out the list of all user's whose passwords are expired
Hi
i had tried to find out the list of all user's whose passwords are expired.
i had written some jndi code by finding the max age and then find out the current time and subtracted this current time from max age using the following code
"Attributes attbts=ctx.getAttributes("cn=pwdpolicy");
String maxAge=(String)attbts.get("pwdMaxAge").get();
Date Today = new Date();
System.out.println("maxAge"+maxAge);
long curTime=(Today.getTime())-Long.parseLong(maxAge)*1000;"
and then parse it and create a string time as follows
String time=year+month+day+hour+minute+second+"Z";
where "year" "month" etc were parsed from curTime
now i can get the list by using following code
"String filterCriteria="(&(objectclass=person)(pwdChangedTime>="+time+")";
NamingEnumeration results = ctx.search(baseDN,filterCriteria, sc); "
but the current time which i am getting is the time of my system not the time of ldap server
so my questions are following;
1.Can there is any way by which i can get the tivole sever's system time.
2.If there is no way then can you suggest any other way to find out the list of user's whose passwords are expired.
please help me.
Thanks.
Krishan Rathi.Hi,
Thanx for ur reply..
I got the list from the table...
thanks,
sivagami -
Query to find out the time used by an user for an application
Hello All,
I want to know the query to find out the whole time used by the user for an application. Please view the below data
Employee:
SNO EMP_ID EMP_NAME EMP_DATE LOGIN_TIME LOGOUT_TIME
1 10 Visu 21-Nov-2010 06:30:00 07:30:00
2 10 Visu 21-Nov-2010 06:40:00 07:20:00
3 10 Visu 21-Nov-2010 06:50:00 07:50:00
4 10 Visu 21-Nov-2010 07:30:00 08:30:00
5 10 Visu 21-Nov-2010 09:30:00 10:30:00
By checking the above data we can say that the total time Visu used the application is
8.30 - 6.30 (From 1,2,3,4 records) = 2hrs
10.30 - 9.30 (Based on 5th rec) = 1hr
So the total time Visu used the application would be 3 hrs = 180 mins.
Could you please help me in getting the result from that data using a query?odie_63 wrote:
I think it may be solved with analytics too.
with t1 as (
select 1 sno,10 emp_id,'Visu' emp_name,'21-Nov-2010' emp_date,'06:30:00' login_time,'07:30:00' logout_time from dual union all
select 2,10,'Visu','21-Nov-2010','06:40:00','07:20:00' from dual union all
select 3,10,'Visu','21-Nov-2010','06:50:00','07:50:00' from dual union all
select 4,10,'Visu','21-Nov-2010','07:30:00','08:30:00' from dual union all
select 5,10,'Visu','21-Nov-2010','09:30:00','10:30:00' from dual
t2 as (
select emp_id,
emp_name,
emp_date,
to_date(emp_date || login_time,'DD-MON-YYYYHH24:MI:SS') login_time,
to_date(emp_date || logout_time,'DD-MON-YYYYHH24:MI:SS') logout_time
from t1
t3 as (
select t2.*,
case
when login_time < max(logout_time) over(
partition by emp_id,emp_date
order by login_time
rows between unbounded preceding
and 1 preceding
then 0
else 1
end start_of_group
from t2
t4 as (
select t3.*,
sum(start_of_group) over(partition by emp_id,emp_date order by login_time) grp
from t3
t5 as (
select emp_id,
emp_date,
min(login_time) login_time,
max(logout_time) logout_time
from t4
group by emp_id,
emp_date,
grp
select emp_id,
numtodsinterval(sum(logout_time - login_time),'day') time_spent
from t5
group by emp_id
order by emp_id
EMP_ID TIME_SPENT
10 +000000000 03:00:00.000000000
SQL> SY. -
Need query to find out the sum till a period
Hi,
I need to write one query to find out the cumulative sum of raw_cost of table pa_budget_lines till the specified period, I tried to do this by analytical function, but that is not working in Report 10g. Can anybody help me in this.
Thanksnot familiar with report but could you do something like this
with t as
select 1 grp, 10 * level the_cost, add_months (sysdate, level) effective_dt from dual connect by level < 11 union all
select 2 grp, 5 * level the_cost, add_months (sysdate, level) effective_dt from dual connect by level < 11
input as
( select null grp, null the_cost, null running_total, v_eff_dt effective_dt from dual)
select * from(
select t.grp, t.the_cost, sum(t.the_cost) over (partition by t.grp order by t.effective_dt) running_total, t.effective_dt,
lead(t.effective_dt) over (partition by t.grp order by t.effective_dt) next_effective_dt,
input.effective_dt inp_eff_dt
from t, input
where inp_eff_dt between effective_dt and next_effective_dtv_eff_dt would be the input date you are interested in -
Query to find out the Activities done against a table
Hi,
One table has been truncated and data reloaded into the table by the user. But at latter stage user deny that activity. I believe all these activities stored in any oracle 10g database table.
Need a query to find out the activities done on a specific date say 6th Sep.
This is too urgent. Thanks in advanceHi,
Welcome to the forum!
If you don't have enable table auditing maybe you can see last_ddl_time column of user_objects view:
Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
Connected as hr
SQL> select * from test2;
COL1 COL2 COL3
1 1 3
1 2 3
1 3 3
SQL> select to_char(uo.created, 'DD/MM/YYYY HH24:MI:SS'), to_char(uo.last_ddl_time, 'DD/MM/YYYY HH24:MI:SS') from user_objects uo where uo.object_name = 'TEST2';
TO_CHAR(UO.CREATED,'DD/MM/YYYY TO_CHAR(UO.LAST_DDL_TIME,'DD/M
12/09/2009 12:20:26 12/09/2009 12:20:27
SQL> truncate table test2;
Table truncated
SQL> select to_char(uo.created, 'DD/MM/YYYY HH24:MI:SS'), to_char(uo.last_ddl_time, 'DD/MM/YYYY HH24:MI:SS') from user_objects uo where uo.object_name = 'TEST2';
TO_CHAR(UO.CREATED,'DD/MM/YYYY TO_CHAR(UO.LAST_DDL_TIME,'DD/M
12/09/2009 12:20:26 12/09/2009 14:01:21
SQL> Regards,
Maybe you are looking for
-
Unable to launch application on Linux machine
Hi, We have a Java based product developed as desktop application. This product has a tree structure built-in. and while connecting to few of the nodes, we are getting the following error: "*Cannot write XdndAware property*". Note: 1. We are running
-
iPod will not play any music. Seems like it is in "Pause" mode. No sound from either the head phones or internal speaker. I have 418 songs stored and none will play. I have tried resetting, turning on and off the iPod, etc. but to no avail.
-
Lumia 925 - GPS inaccurate after WP8.1 update
I have been using my Lumia 925 to track my jogs for half a year (using Sportstracker and Endomondo apps). Also, I use a separate sports clock with GPS. My phone and the sports clock have been givin really similar results. Couple of weeks back I updat
-
Items saved in the Reading List keep disappearing?
I've only just started to use the Reading list functionality after upgrading to OS X Lion recently. However, on the occasions used the items "saved" to the Reading List have been lost the next time I come to look for them after shutting down my Macbo
-
Spry.Widget.HTMLPanel evalScripts: true
My situation is simple I am loading HTML fragments into HTML Panel Container. The frament is contains mostly of javascripts that display affiliate information, in other words buttons with company information. When I execute with evalscript false I ge