----- Sorry i tryied your solution but it doesn't work
---- Look at following code
----- Also see the output
declare
v_var char(4) := 'Col1';
begin
declare
cursor c1 is select uomid,tomsrid,uomdesc from bduommst
order by to_number(decode(v_var,'Col1',1,'Col2',2,3),'0')...
declare
v_var char(4) := 'Col1';
begin
declare
cursor c1 is select uomid,tomsrid,uomdesc from bduommst
order by to_number(decode(v_var,'Col1',1,'Col2',2,3),'0') desc;
begin
for r1 in c1
loop
dbms_output.put_line(r1.uomid);
end loop...
use
crontab -e
it will open u the editor like vi
update it
#minute hour day month dayof the script to be
# week executed
#0-59) (0-23) (1-31) (1-12) (0-6 with
# 0=Sunday)
49 8 * *...
but if the data in the column is bigger in length. this will happen when u reduce the size of the column so in such cases first make the columns blank or alteast those rows blanks which are having bigger data. by using update clause.
update <table_name>
set <field_name> = value (normally NULL)...
This is not possible as i know?
but if u want to use sql only then
you can create a function returning a number and u can call this function in ur query.
Eg.
Create or replace function prd_emp return number as
v_prd_sal number := 1;
Cursor c1 is select sal from emp;
begin
for...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.