Change column status to a literals in SQL
Hi
I have a STATUS column in a table and results
select status from table1;
STATUS
P
Q
N
I Need to change results of the status column to a literals in below.
N = Not selecting
Q= Review pending
P= Waiting for decision
Please provide the query for this.
Thanks
Hi,
perhaps something like this helps you:
select 'Uptime : ' || floor(sysdate-startup_time) ||' day' || decode ( floor(sysdate-startup_time) ,1,' ', 's ') ||
trunc( 24*((sysdate-startup_time) - trunc(sysdate-startup_time))) ||' hour' || decode ( trunc( 24*((sysdate-startup_time) - trunc(sysdate-startup_time))) ,1,' ', 's ') ||
mod(trunc( 1440*((sysdate-startup_time) - trunc(sysdate-startup_time))), 60) ||' minute' || decode (mod(trunc( 1440*((sysdate-startup_time) - trunc(sysdate-startup_time))), 60) ,1,' ', 's ') ||
mod(trunc(86400*((sysdate-startup_time) - trunc(sysdate-startup_time))), 60) ||' Second' || decode (mod(trunc(86400*((sysdate-startup_time) - trunc(sysdate-startup_time))), 60) ,1,' ', 's ') uptime
from v$instance
regards
Kay
Similar Messages
-
Workflow changing the status based some columns value
OOB workflow SP designer 2013
The workflow purpose is change the status columns from
COMPLETE to IN PROGRESS or from
IN PROGRESS to COMPLETE according some columns value.. And if the change is from
IN PROGRESS to COMPLETE
there will be change in some columns like
If alertSOP Date <= today then change the status (Columns value) from Complete to In Progress and send email to the manager (the manager email address is a column (Manager Email)
Else pause until the alert date=Today()
If the status (columns) = in progress send Remainder email every 10 days
If the status change from in progress to
Complete (BY MANAGER MANUALLY) then
last renewed Date =TODAY()
Valid to Review=TODAY() + 4 MONTH
Alert Date=today() + 5 month
and Due Date=today() + 6 months
AND START THE WORKFLOW AFTER UPDATING THIS COLUMNS FOR NEXT cycle
SharePoint List(http://server/site/..) LIST ITEMS
Department
Contractor
Division
Manager Email
Contractor last renewed Date
Contractor Valid to Review
Alert SOPReview
DueDate Review
Status
Workflow Status
ABC
JONAH
10
[email protected]
01/01/2014
05/06/2014
5/07/2014
5/08/2014
COMPLETE
paused
DEF
SMITH
20
[email protected]
01/01/2014
02/03/2014
2/28/2014
3/20/2014
INPROGRESS
INPROGRESS
Note:
The status is changed manually by manager from IN PROGRESS TO COMPLETE
The status from COMPLETE to IN PROGRESS is changed by event or Triggers (based the alert date)The First Part are coded as follow
(The workflow purpose is change the status columns from COMPLETE to IN
PROGRESS or fromIN PROGRESS to COMPLETE according
some columns value.. And if the change is from IN
PROGRESSto COMPLETE there
will be change in some columns like
If alertSOP Date <= today then change the status (Columns value) from Complete to In Progress and send email to the manager (the manager email address is a column (Manager Email)
Else pause until the alert date=Today()
If the status (columns) = in progress send
Reminder email every 10 days)
Note:
The first if Block work as expected
the second if block generate error.. Internal States Canceled
RequestorId: 3b262286-66e8-5f9f-09f8-3b09c5be0ebc. Details: System.ApplicationException: HTTP 400 {"Transfer-Encoding":["chunked"],"X-SharePointHealthScore":["1"],"SPClientServiceRequestDuration":["1997"],"SPRequestGuid":["3b262286-66e8-5f9f-09f8-3b09c5be0ebc"],"request-id":["3b262286-66e8-5f9f-09f8-3b09c5be0ebc"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1;
RequireReadOnly"],"MicrosoftSharePointTeamServices":["15.0.0.4420"],"Cache-Control":["max-age=0, private"],"Date":["Tue, 25 Mar 2014 21:25:35 GMT"],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"]} at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext
context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager
bookmarkManager, Location resultLocation) -
Change Build Status From PL/SQL
Apex 3.2
Please see my previous thread
Change Build Status From PL/SQL
We tried this code
CREATE OR REPLACE procedure APEX_030200.pr_sup_unfreeze_apex
as
begin
for l_app in (select id
,security_group_id
from APEX_030200.wwv_flows
loop
wwv_flow_api.set_security_group_id(l_app.security_group_id);
wwv_flow_api.set_flow_status (p_flow_id => l_app.id
,p_flow_status => 'AVAILABLE'
end loop;
commit;
exception when others then
dbms_output.put_line (sqlcode);
dbms_output.put_line (substr(sqlerrm,1,250));
dbms_output.put_line (substr(sqlerrm,250,250));
rollback;
raise;
end;but recieved error
BEGIN APEX_030200.pr_sup_freeze_apex; END;
Error at line 1
ORA-20001: Package variable g_security_group_id must be set.
ORA-06512: at "APEX_030200.PR_SUP_FREEZE_APEX", line 51
ORA-06512: at line 1
Any ideas ?
If I just run
select id,security_group_id
from APEX_030200.wwv_flows
ID SECURITY_GROUP_ID
4000 10
4050 10
4155 10
4300 10
4350 10
4400 10
4411 10
4500 10
4550 10
4700 10
125 1.07701203277056E15
1000 1.08971536719791E15
1010 1.08971536719791E15
114 1.41432144152464E15
123 1.43440509319107E15
160 2.25192481868561E15
190 2.41432896355852E15
100 3.93632559648557E15
103 3.93632559648557E15
130 5.9543257997941E15
140 5.95501879180405E15
Edited by: Gus C on Nov 8, 2012 5:43 AM
Edited by: Gus C on Nov 8, 2012 5:50 AMHi Gus,
as Rod already mentioned, wwv_flow_api.set_flow_status would be the way to go. It's no officially documented or supported API but it will do what you want. Just be prepared that it might be removed in the future. The API is defined as following:
procedure set_flow_status (
p_flow_id in number,
p_flow_status in varchar2,
p_flow_status_message in varchar2 default null,
p_restrict_to_user_list in varchar2 default null )Example code to make all applications unavailable (has to be executed as APEX_040200).
begin
for l_app in ( select id,
security_group_id
from wwv_flows )
loop
wwv_flow_api.set_security_group_id(l_app.security_group_id);
wwv_flow_api.set_flow_status (
p_flow_id => l_app.id,
p_flow_status => 'UNAVAILABLE' );
end loop;
commit;
end;Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf -
Hi
Using SPD i am creating list workflow.
Scenario: Employee submits a request . Task assign to manager. Manager can either approve/ reject. If approve then change the state column to "done". If rejected the state column to "Rejected".
Problem is "Assign a to do item" is assigning the task to manager. But after manager approves the status in the task list not changed to "Completed". Still it is showing "Not started". I dont want to manually complete the task.
Please help me for automatic process.
What i should do to change the status to "Complete" automatically after manager approval
Regards
Jhanani
Janani.RHi Janani,
From your description, you would like to create an approval workflow for a list. When an employee submit a request to the list, an approval task should be assigned to manager, then manager could approve or reject the request. From the request list,
we should be able to see the Approval task’s status.
Not understand the reason of designing the workflow to two steps, an approval action should be enough from my understanding. For producing, I create a list named Request list, then customize it in InfoPath form to add a Request field for stating request
content. Then add a workflow to list named Approval task, add the action of Start an approval process with administrator and make the workflow automatically start when item is added.
The image below shows the status of Adding items, Approving and Rejecting. Please check if it could meet your requirement.
Regards,
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected] .
Rebecca Tu
TechNet Community Support -
Hi Gurus
is it possible(any built in function or commands) changing columns name which moving out the data in the column.
create table xyz(x number);---it contains data
after change column name...it should be...
create table xyz(y number);sql>create table xyz(x number);
Table created.
sql>insert into xyz values (1);
1 row created.
sql>alter table xyz rename column x to y;
Table altered.
sql>select * from xyz;
Y
1
1 row selected. -
Trouble changing column name used in calculated column
I have a calculated column in my list. The calculation is based on a column "Status". It worked fine. But I recently had to do some work on the Status column and changed it to Status_OLD and replaced it with a new Status column.
The above mentioned calculated field is now using Status_OLD and thus not working because Status_OLD is no longer in use. I went in the to calculation formula and tried to change it to Status, but Status does not appear in the Insert Column list, nor
does it allow me to just type in Status into the formula without throwing an error. Short of deleting the column and re-creating it, is there something I'm doing wrong or overlooking?
There are no mistakes; every result tells you something of value about what you are trying to accomplish.Finally getting back to this issue. I have two columns in my list "Status" and "Status_OLD". "status" is a replacement for the previous one. I have three calculated fields that use that field. I need to change
their calculation to now use "Status" instead of "Status_OLD". When I go to the settings for that column, "status" is not listed in the choice of columns that can be inserted. Just typing it in won't work either.
When I try to make a new cal as a test, "Status" isn't available there either.
I really need to get this fixed as soon as possible now because some of these dates need to be acted upon.
There are no mistakes; every result tells you something of value about what you are trying to accomplish. -
Change column header dynamically at report run time
how to use LOV In report column definition under column attributes for display..
If it suceeded will it dynamicaly change header name at time of running report
my requirement is actually to change column header dynamically at time of run report
is it possible with above mentioned way?
Apex 4.1, Oracle 11g, PL/SQL Gateway configuration
Please help me on this
ThanksHi,
by making use of specific report column templates and column template conditions you can change the headers dynamically.
See this http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/ui_templt.htm#HTMDB25708 for more info.
regards,
Erik-jan -
I need change publication status from "PENDING" to "PAUSED" for wait long load ETL process.
After ETL Load is end, change publication status from "PAUSED" to "PENDING".
// Query
String sql = String.Format("query://{0}select * from CI_INFOOBJECTS WHERE SI_KIND='Publication'AND SI_SCHEDULE_STATUS=9 AND SI_NEXTRUNTIME>'{1}/{2}/{3}/00/00/00' AND SI_NEXTRUNTIME<'{4}/{5}/{6}/00/00/00' AND SI_Name IN ({7}) ORDER BY SI_ENDTIME DESC{8}",
'{', now.AddDays(-1).Year, now.AddDays(-1).Month, now.AddDays(-1).Day, now.AddDays(2).Year, now.AddDays(2).Month, now.AddDays(2).Day, Rep_Names, '}');
ResponseHolder rh = bipService.Get(sql, oGetOptions);
if (rh.InfoObjects.InfoObject == null || rh.InfoObjects.InfoObject.Length == 0)
Console.WriteLine("No waiting/paused publications");
else
{ //rh.InfoObjects.InfoObject[0].
foreach (InfoObject io in rh.InfoObjects.InfoObject)
Publication p = (Publication)io;
if (Is_Ok == 1)
p.SchedulingInfo.Status = ScheduleStatusEnum.PENDING; // RUNNING = 0, COMPLETE = 1, FAILURE = 2, PAUSED = 3, PENDING = 4
else
p.SchedulingInfo.Status = ScheduleStatusEnum.PAUSED; // RUNNING = 0, COMPLETE = 1, FAILURE = 2, PAUSED = 3, PENDING = 4
// p.SchedulingInfo.Outcome = ScheduleOutcomeEnum.FAIL_SCHEDULE; // RUNNING = 0, COMPLETE = 1, FAILURE = 2, PAUSED = 3, PENDING = 4
bipService.Update(rh.InfoObjects); // COMMIT DATA TO CMS
but publication status NOT change!
How to change publication status ?There is another way you could do this without using the SDK to change the status. Instead, you could use a File event. File events do not look at the contents or timestamp of a file - they look at whether the file is present after it has been absent for at least one cycle of the Event Server.
Here's how it would work:
1. In the CMC, create a file event that looks for a file in a specific folder (best to use a UNC path...)
2. In the process that runs the ETL, do the following:
a. As one of the first steps in the process, delete the file specified in the event.
b. As one of the last steps after the ETL is finished, create a blank file with the file name specified in the event.
3. Configure the schedule for the publication to wait on the event created in step 1 to trigger.
This is the way a lot of my clients configure schedules that need to wait for the completion of an ETL process.
-Dell -
Changing Work Status using data package or script logic
Is it possible to set Work Status using Script logic, or an SSIS package.
I know status is kept is an SQL table, is it possible to just update the locking table with a new record, or is there more to changing the work status.
Thanks for you helpThanks for your reply. This would be a nice enhancement.
Although the work status does help with the audit trail of who and what locks the data, doing it automatically will allow the system to automatically unlock the period when it is opened before auto-loading the current closing balances. It will need to be carefully used in order to maintain proper audit trail of the data. When done automatically, the system userid would be used in the lock table witha timestamp.
I am needing to know if there are anyother steps involved in locking data other than writing to the SQL lock table. Is usppose this is especailly relevant when locking a parent and pushing the status to the children. -
I can't open my profile to change my status
Hi
I have blackberry z10 I can't open my BBM profile when ever i do it it stuck and I want change my status
so how I can i fix it Plz help meTry a Battery pull please, with the BlackBerry device powered ON, remove the battery 15 seconds and then reinsert the battery to reboot device. This will clear all cache like rebooting a PC. Then try again and see if your problem persists.
Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up
Click to search the Knowledge Base at BTSC and click to Read The Fabulous Manuals
BESAdmin's, please make a signature with your BES environment info.
SIM Free BlackBerry Unlocking FAQ
Follow me on Twitter @knottyrope
Want to thank me? Buy my KnottyRope App here
BES 12 and BES 5.0.4 with Exchange 2010 and SQL 2012 Hyper V -
How to change Default editor in Linux for PL/SQL Programming
Deare friends ,
I am using oracle 8i (8.1.6) on RedHat Linux 7.2 , But i donot know how to change default editor for modify editor on sql prompt say ex:-
In winodow
SQL> ED
it open nope pad to modify sql and pl/sql statement
while in linux
SLQ > ED
it open one editor but it is not easy to work and i want to change that editor so could you tell me how to chane editor i want to use vi editor .
if any boyd know reply me on :-
[email protected]
or on this forum
Thanking you in advance
Piyush PatelEither manually do a 'define editor=vi' when you log in through sql*plus, or put that in the glogin.sql in $ORACLEHOME/sqlplus/admin or put that in a login.sql in the directory you run sqlplus from.
-
Picking status in Out. delivery changed to status A after GR post with MB0A
Hi,
I am facing an issue in our production system, these is the scenario:
- Replenishment delivery
- ZPicking confirmation idoc sucessfully picked the outbound delivery and post the GI. The material was cut and it was batch splitted.
- Then it was performed a GR (mov 101) against a stock transfer order via MB0A.
- After this GR posted, the status of picking of the parent material of the batch split was changed from status " " (Not relevant) to status "A" (Not yet processed).
- Also the status at header level was changed.
Current status of the delivery
Header Status
Picking Confirmation --> B
Total Gds mvt status --> B
Item Status
Item 10:
Pick confirmation --> A
Goods movt --> B
We have tried to reverse the GI to generate it again and reset the statuses but it is not possible to do it via VL09 neither MBST, etc.
Any idea on how to correct this problem?
Thanks,Hi,
What is the moment type being taken for PGI through idoc?check the moment type definition for its allowable transactions and foe reverse.
Regards, -
Change Column Heading in ALV Report
Hi,
I have developed a ALV Report, showing correct output.
Problem is that Column Heading is not showing correct...means it is showing as per field name. But We want to change as per our understand. i.e. One column heading is like Unrestricted Stock but we want Unrestricted Stock...(BILF is an indicator)..
We have write in the code..
FORM build_fieldcat10.
CLEAR fieldcat_ln.
ADD 1 TO col_pos.
fieldcat_ln-ref_tabname = 'MARD'.
fieldcat_ln-fieldname = 'LABST'.
fieldcat_ln-seltext_m = 'BILF Unrest.Stock'.
fieldcat_ln-key = space.
fieldcat_ln-do_sum = space.
fieldcat_ln-col_pos = col_pos.
fieldcat_ln-no_out = space.
fieldcat_ln-qfieldname = space.
fieldcat_ln-hotspot = space.
APPEND fieldcat_ln TO fieldcat.
ENDFORM. " BUILD_FIELDCAT1
But after change the selection text...not showing correct text..How can i change Column heading???
Please help me..Thanks a lot dear..
My problem resolved by using SCRTEXT_L. -
How to change the profile value in the pl/sql code without making change in the database
How to change the profile value in the pl/sql code without making change in the database.
I have program ,where if the profiles 'printer and nunber of copies ' are set at the user level, by default when the report completes the O/p will be sent to the printer mentioned in the set-up. but what user wants is
if these Profiles are set for the user running this program automatic printing should not be done. -
Usage decision follow up action change of status in equipment
Hello every one, I am having calibration scenerio in my project. All process is running properly but the issue which i am having is that when i am giving usage decision i should get a pop up to change the status of the equipment which is not coming in my case. i have checked followup action whch PM_QM there i have activated 2 Funtion modules one is for automatic TECO of order which is working properly and second is change to status in equipment master which is not working for me. Kindly give some guidance to me on same.
Regards
AbhishekHelloo,
Please let me know the equipment type you are using.
If you are using equipment type other than Q then u may get such type of issues.
Please try out with equipmetn type Q or P
Thanks
Maybe you are looking for
-
Low memory/update = warranty phone replacement
Has anyone gotten a phone replacemnt under warranty with all the low memory and upgrade problems?
-
Phone no longer working after upgrade - i5 - any help?
i'm stuck in loop - logging in just takes me back to log in page.......
-
Something is shaking and static-y :(
Since yesterday I noticed my MBP making some odd sounds. First I heard some static from the sound just before I'd play a song and that'll be the only time I notice it as if somethings damaged with the sound or something. It still plays music clear an
-
I-phone unlock screen has very large letters and numbers.
I-phone has large letters and numbers on the unlock screen. can see only about 1/4 of the screen it's so large. can't see the slide to unlock bar, only part of the actual time. will not compress with fingers. phone recieves e-mail/phone calls but can
-
ERROR 17 ipad mini update IOS 8
I was updating my ipad mini with retina display to the IOS8 . half way trough, the process stoped and there is a black screen with the itunes logo and a cable showing up in The ipad screen . also, there is an "error 17" coming up on my mac. i cann