Need help working Oracle/PHP to ASP/Oracle conversion
I don't know if it's the right place, but I was pulling my hair out trying to convert a PHP page in VBScript (ASP) without a bit of luck to all. Hours of research on Google and trial and error and grrrr... I hope someone can help.I am new to Oracle and PHP, but old in ASP/VBScript
Windows Server 2003 R2
IIS
PHP
I have an Oracle procedure on a remote computer on which I can NOT change. Out of my control. There is a PHP page on a web server that calls it and works very well. My boss wants me to convert the PHP ASP script (I know, but I have to work within those parameters. Sorry). On the one hand, I can't find many examples of the use of ASP with Oracle procedures. And those that I find are not complete examples or are displayed as questions. Everything I've tried so far either causes an error message I don't understand or not errors, but no data either. So, here is what I got:
CREATE OR REPLACE PROCEDURE X_Doc_Num_Query)
p_doc_num in VARCHAR2
)
AS
-variables
v_curr_sos_ric Pkg.curr_sos_ric%TYPE: = NULL;
v_data VARCHAR2 (1000): = NULL;
v_depot_ric Pkg.depot_ric%TYPE: = NULL;
v_doc_num Rqn.Doc_Num%TYPE: = NULL;
v_dodaac Rqn.cnsgne_dodaac%TYPE: = NULL; v_found_pkg BOOLEAN: = FALSE;
v_found_rqn BOOLEAN: = FALSE;
v_ic_cl_of_supply_cd Item_Control.cl_of_supply_cd%TYPE: = NULL;
v_index directory: = 0;
v_itcn Pkg.itcn%TYPE: = NULL;
v_lca_inst Cddb_Force.lca_inst%TYPE: = NULL;
v_pkg_niin Pkg.niin%TYPE: = NULL;
v_proj_cd Rqn.proj_cd%TYPE: = NULL;
v_rqn_niin Rqn.niin%TYPE: = NULL;
-variables defined by the procedures define_status and package pkg_procsusl v_errcd VARCHAR2 (10): = NULL;
v_errmsg VARCHAR2 (600): = NULL;
v_errproc VARCHAR2 (30): = NULL;
v_syserr BOOLEAN: = FALSE;
-the variables defined by the procedure define_status
v_status_cd VARCHAR2 (2): = NULL;
v_status_dt DATE: = NULL;
-package pkg_procsusl-defined variables
v_citcn Ship_Unit.citcn%TYPE: = NULL;
v_dep_ship_su Ship_Unit.dt_dep_ship%TYPE: = NULL;
v_dt_ccps Ship_Unit.dt_ccps%TYPE: = NULL;
v_dt_crpr Ship_Unit.dt_crpr%TYPE: = NULL;
v_dt_hubr Ship_Unit.dt_hubr%TYPE: = NULL;
v_dt_hubs Ship_Unit.dt_hubs%TYPE: = NULL;
v_dt_lift SL.dt_lift%TYPE: = NULL;
v_dt_ssar Ship_Unit.dt_ssar%TYPE: = NULL;
v_dt_umfps Ship_Unit.dt_umfps%TYPE: = NULL;
v_hub_tcn Ship_Unit.hub_tcn%TYPE: = NULL;
v_mfst_ref SL.mfst_ref%TYPE: = NULL;
v_mfst_sta SL.mfst_sta%TYPE: = NULL;
v_mod_shp Ship_Unit.mod_shp%TYPE: = NULL;
v_mode VARCHAR2 (10): = NULL;
v_msn_num Flt.msn_num%TYPE: = NULL;
v_save_erl_poel SL.dt_poel%TYPE: = NULL;
v_save_erl_poel_pair SL.dt_poel%TYPE: = NULL;
v_save_erl_poer SL.dt_poer%TYPE: = NULL;
v_save_erl_poer_pair SL.dt_poer%TYPE: = NULL;
v_save_lat_podf Ship_Unit.dt_podf%TYPE: = NULL;
v_save_lat_podf_pair Ship_Unit.dt_podf%TYPE: = NULL;
v_save_lat_podr Ship_Unit.dt_podr%TYPE: = NULL;
v_save_lat_podr_pair Ship_Unit.dt_podr%TYPE: = NULL; v_pod Ship_Unit.pod%TYPE: = NULL;
v_poe SL.poe%TYPE: = NULL;
v_voyage_no SL.voyage_no%TYPE: = NULL;
v_tdi Ship_Unit.tdi%TYPE: = NULL;
-cursors
CURSOR c_rqn (doc_num_in VARCHAR2) IS
SELECT *.
OF tangible
WHERE doc_num = doc_num_in;
CURSOR c_pkg (doc_num_in VARCHAR2) IS
SELECT *.
PKG
WHERE doc_num = doc_num_in
AND sup_pipe_cat <>'OB '.
AND sup_pipe_cat <>"IA";
-documents
r_pkg Pkg % ROWTYPE;
r_rqn tangible % ROWTYPE;
-- functions ---------------------------------------------------------
FUNCTION Find_Lca_Inst (dodaac_in VARCHAR2)
RETURN VARCHAR2
IS
v_lca_cd Cddb_Force.lca_inst%TYPE;
BEGIN
SELECT lca_inst from v_lca_cd
OF Cddb_Force
WHERE dodaac = dodaac_in;
RETURN v_lca_cd;
EXCEPTION
WHEN NO_DATA_FOUND THEN
RETURNS A NULL VALUE.
WHILE OTHERS THEN
LIFT;
END Find_Lca_Inst;
----------------------------------------------------------------------
FUNCTION Find_Supply_Cd (niin_in VARCHAR2)
RETURN VARCHAR2
IS
v_supply_cd Item_Control.cl_of_supply_cd%TYPE;
BEGIN
SELECT cl_of_supply_cd from v_supply_cd
OF Item_Control
WHERE only = niin_in;
RETURN v_supply_cd;
EXCEPTION
WHEN NO_DATA_FOUND THEN
RETURNS A NULL VALUE.
WHILE OTHERS THEN
LIFT;
END Find_Supply_Cd;
----------------------------------------------------------------------
BEGIN
DBMS_OUTPUT. ENABLE (2000000);
v_doc_num: = upper (p_doc_num);
OPEN c_rqn (v_doc_num);
LOOP
SEEK c_rqn INTO r_rqn;
EXIT WHEN c_rqn % NOTFOUND;
v_found_rqn: = TRUE;
v_dodaac: = NVL (r_rqn.cnsgne_dodaac, r_rqn.s_cnsgne_dodaac);
v_rqn_niin: = NVL (r_rqn.niin, r_rqn.s_niin);
v_proj_cd: = NVL (r_rqn.proj_cd, r_rqn.s_proj_cd);
IF v_dodaac IS NOT NULL THEN
v_lca_inst: = FIND_LCA_INST (v_dodaac);
ON THE OTHER
v_lca_inst: = NULL;
END IF;
-output of tangible column values
DBMS_OUTPUT. Put_LINE ('Tangible database');
v_data: = r_rqn.doc_num | '|' || r_rqn.req_geo_flag | '|' ||
r_rqn.estb_dic | '|' || r_rqn.niin | '|' ||
r_rqn.asg_cd | '|' || r_rqn. Qty | '|' ||
r_rqn.unit_price | '|' || r_rqn.dmd_cd | '|' ||
v_proj_cd | '|' || r_rqn. Priority | '|' ||
r_rqn. RDD | '|' || r_rqn.cl_of_supply_cd | '|' ||
To_char(r_rqn.dt_rqn_estb,'MM/dd/yyyy'). '|' ||
To_char (r_rqn.dt_first_bo, "MM/DD/YYYY '") | ' |' |
To_char (r_rqn.dt_first_can_req, "MM/DD/YYYY '") | ' |' |
r_rqn.supadd | '|' || r_rqn. UI | '|' ||
v_lca_inst | '|' || r_rqn.sig_cd | '|' ||
r_rqn.fd_cd | '|' || r_rqn.med_stat_cd | '|' ||
r_rqn.ssf_flag | '|' || To_char (r_rqn.lst_updt, "MM/DD/YYYY");
DBMS_OUTPUT. Put_line (v_data);
DBMS_OUTPUT. Put_line ('PKG database');
OPEN c_pkg (v_doc_num);
LOOP
SEEK c_pkg INTO r_pkg;
EXIT WHEN c_pkg % NOTFOUND;
v_found_pkg: = TRUE;
v_curr_sos_ric: = NVL (r_pkg.curr_sos_ric, r_pkg.s_curr_sos_ric);
v_depot_ric: = NVL (r_pkg.depot_ric, r_pkg.s_depot_ric);
v_pkg_niin: = NVL (r_pkg.niin, r_pkg.s_niin);
IF v_pkg_niin IS NOT NULL THEN
v_ic_cl_of_supply_cd: = Find_Supply_Cd (v_pkg_niin);
ON THE OTHER
v_ic_cl_of_supply_cd: = NULL;
END IF;
Define_Status (r_pkg,
v_status_cd,
v_status_dt,
v_syserr,
v_errcd,
v_errmsg,
v_errproc
);
IF v_syserr THEN
DBMS_OUTPUT. Put_line (' ERROR in Define_Status: ' | v_errmsg);
EXIT;
END IF;
v_itcn: = NULL;
Pkg_Procsusl.Process_Susl ('XT',
r_rqn.req_geo_flag,
r_pkg. STCN,
v_itcn,
v_dodaac,
v_dt_crpr,
v_dt_ccps,
v_dt_hubr,
v_dt_hubs,
v_dt_ssar,
v_dt_lift,
v_dt_umfps,
v_save_erl_poel,
v_save_erl_poel_pair,
v_save_erl_poer,
v_save_erl_poer_pair,
v_save_lat_podf,
v_save_lat_podf_pair,
v_save_lat_podr,
v_save_lat_podr_pair,
v_dep_ship_su,
v_mode,
v_mod_shp,
v_mfst_ref,
v_mfst_sta,
v_msn_num,
v_pod,
v_poe,
v_voyage_no,
v_tdi,
v_citcn,
v_hub_tcn,
v_errcd,
v_errmsg,
v_errproc,
v_syserr
);
IF v_syserr THEN
DBMS_OUTPUT. Put_line (' ERROR in Pkg_Procsusl: ' | v_errmsg);
EXIT;
END IF;
v_data: = r_pkg.doc_num | '|' || r_pkg.pkg_id | '|' ||
Trim (r_pkg.input_stk_num) | '|' || v_status_cd | '|' ||
To_char (v_status_dt, "MM/DD/YYYY '") | ' |' |
To_char (r_pkg.dt_est_ship, "MM/DD/YYYY '") | ' |' |
To_char (r_pkg.dt_rel, "MM/DD/YYYY '") | ' |' |
To_char (r_pkg.dt_dep_ship, "MM/DD/YYYY '") | ' |' |
To_char (r_pkg.dt_rcpt, "MM/DD/YYYY '") | ' |' |
To_char (r_pkg.dt_maint_ret_rcpt, "MM/DD/YYYY '") | ' |' |
To_char (r_pkg.dt_idt_rcpt, "MM/DD/YYYY '") | ' |' |
To_char (r_pkg.dt_mrd, "MM/DD/YYYY '") | ' |' |
v_curr_sos_ric | '|' || v_pkg_niin | '|' ||
r_pkg. Qty | '|' || v_depot_ric | '|' ||
r_pkg.ssf_flag | '|' || r_pkg. UI | '|' ||
r_pkg.sfx_cd | '|' || r_pkg.direct_fill | '|' ||
r_pkg. STCN | '|' || v_ic_cl_of_supply_cd | '|' ||
To_char (v_dt_ssar, "MM/DD/YYYY '") | ' |' |
To_char (v_dt_crpr, "MM/DD/YYYY '") | ' |' |
To_char (v_save_lat_podr, "MM/DD/YYYY");
DBMS_OUTPUT. Put_line (v_data); END LOOP;
CLOSE C_pkg;
EXIT;
END LOOP;
CLOSE C_rqn;
IF this is v_found_rqn THEN
DBMS_OUTPUT. Put_line (' NO data available for doc_num = ' | v_doc_num);
END IF;
EXCEPTION
WHILE OTHERS THEN
IF c_rqn % ISOPEN THEN
CLOSE C_rqn;
END IF;
IF c_pkg % ISOPEN THEN
CLOSE C_pkg;
END IF;
DBMS_OUTPUT. PUT_LINE (' ERROR: ' |) SQLERRM);
END X_Doc_Num_Query;
/
===================================
===================================
Here is the PHP page:
<? PHP
error_reporting (0);
PutEnv("TNS_ADMIN=e:/oracle/ora92/network/ADMIN");
PutEnv("LD_LIBRARY_PATH=E:/Oracle/ora92");
PutEnv ("NLS_LANG = English_America.WE8ISO8859P1");
$don = isset($_REQUEST["don"])? $_REQUEST ['gift']: "asdf1234"; If no value passed, use the value of test
Enable or DISABLE dbms_output.
function SetServerOutput ($con, $p)
{
If ($p)
$s = "BEGIN DBMS_OUTPUT. ENABLE (1000000); END; « ;
on the other
$s = "BEGIN DBMS_OUTPUT. DISABLE(); END; « ;
$r = false;
$stid = doParse ($con, $s);
If {($stid)
$r = doExecute ($stid);
@OCIFreeStatement ($stid);
}
Return $r;
}
Retrieve and display any dbms_output
function DisplayDbmsOutput ($con)
{
$r = GetDbmsOutput ($con);
$cnt = sizeof ($r);
If (! $r)
print ' < p > no dbms_output < /p > \n ";
on the other
$orders = $r;
$number_of_orders = count ($orders);
If ($number_of_orders == 0)
{echo "< p > < strong > no orders pending."}
Please try again later. < facilities > < / p > ';
}
echo "< body leftmargin = 0 topmargin = 0 > ';
for ($i = 0; $i < 1; $i ++)
{
$line2 = explode ("|", $orders [$i]);
echo "< BR > < b > $line2 [0] < /b >."
}
for ($i = 1; $i < 2; $i ++)
{
$line2 = explode ("|", $orders [$i]);
echo "< table border = 1 bordercolor = #000000 cellpadding = 2 cellspacing = 0 > \n < TR > < th bgcolor = Color #FFFFFF = #000000 > DON < table >.
< th bgcolor = Color #FFFFFF = #000000 > GEO FLAG < table >
< th bgcolor = Color #FFFFFF = #000000 > < table > DIC
< th bgcolor = Color #FFFFFF = #000000 > < table > ONLY
< th bgcolor = Color #FFFFFF = #000000 > ASG CD < table >
< th bgcolor = Color #FFFFFF = #000000 > < table > QTY
< th bgcolor = Color #FFFFFF = #000000 > PRICE UNIT < table >
< th bgcolor = Color #FFFFFF = #000000 > DMD CD < table >
< th bgcolor = Color #FFFFFF = #000000 > PROJ CD < table >
< th bgcolor = Color #FFFFFF = #000000 > < table > PRIORITY
< th bgcolor = Color #FFFFFF = #000000 > < table > RDD
< th bgcolor = Color #FFFFFF = #000000 > CLS OF < table > SUPPLY
< th bgcolor = Color #FFFFFF = #000000 > ESTAB DTE < table >
< th bgcolor = Color #FFFFFF = #000000 > FIRST BO DTE < table >
< th bgcolor = Color #FFFFFF = #000000 > FIRST DTE CAN < table >
< th bgcolor = Color #FFFFFF = #000000 > SUPADD < table >
< th bgcolor = Color #FFFFFF = #000000 > < table > UI
< th bgcolor = Color #FFFFFF = #000000 > LCA INST < table >
< th bgcolor = Color #FFFFFF = #000000 > GIS CD < table >
< th bgcolor = Color #FFFFFF = #000000 > FD CD < table >
< th bgcolor = Color #FFFFFF = #000000 > MED STAT CD < table >
< th bgcolor = Color #FFFFFF = #000000 > SSF FLAG < table >
< th bgcolor = Color #FFFFFF = #000000 > DTE UPDT < table >
< b >
< td align = "center" > $line2 [0] < table >
< td align = "center" > $line2 [1] < table >
< td align = "center" > $line2 [2] < table >
< td align = "center" > $line2 [3] < table >
< td align = "center" > $line2 [4] < table >
< td align = "center" > $line2 [5] < table >
< td align = "center" > $line2 [6] < table >
< td align = "center" > $line2 [7] < table >
< td align = "center" > $line2 [8] < table >
< td align = "center" > $line2 [9] < table >
< td align = "center" > $line2 [10] < table >
< td align = "center" > $line2 [11] < table >
< td align = "center" > $line2 [12] < table >
< td align = "center" > $line2 [13] < table >
< td align = "center" > $line2 [14] < table >
< td align = "center" > $line2 [15] < table >
< td align = "center" > $line2 [16] < table >
< td align = "center" > $line2 [17] < table >
< td align = "center" > $line2 [18] < table >
< td align = "center" > $line2 [19] < table >
< td align = "center" > $line2 [20] < table >
< td align = "center" > $line2 [21] < table >
< td align = "center" > $line2 [22] < table >
< /tr >
< /table > ';
}
for ($i = 2; $i < 3; $i ++)
{
$line2 = explode ("|", $orders [$i]);
echo "< BR > < BR > < b > $line2 [0] < /b >."
}
echo "< table border = 1 bordercolor = #000000 cellpadding = 2 cellspacing = 0 >
< TR > < th bgcolor = Color #FFFFFF = #000000 > < table > DON
< th bgcolor = Color #FFFFFF = #000000 > PKG ID < table >
< th bgcolor = Color #FFFFFF = #000000 > < table > ONLY
< th bgcolor = Color #FFFFFF = #000000 > STATUS CD < table >
< th bgcolor = Color #FFFFFF = #000000 > STATUS DT < table >
< th bgcolor = Color #FFFFFF = #000000 > SHIP DTE IS < table >
< th bgcolor = Color #FFFFFF = #000000 > REL DT < table >
< th bgcolor = Color #FFFFFF = #000000 > DT DEP SHIP < table >
< th bgcolor = Color #FFFFFF = #000000 > RCPT DT < table >
< th bgcolor = Color #FFFFFF = #000000 > DT MAINT RET RCPT < table >
< th bgcolor = Color #FFFFFF = #000000 > DT IDT RCPT < table >
< th bgcolor = Color #FFFFFF = #000000 > DT MRD < table >
< th bgcolor = Color #FFFFFF = #000000 > SOS RIC < table >
< th bgcolor = Color #FFFFFF = #000000 > PKG ONLY < table >
< th bgcolor = Color #FFFFFF = #000000 > < table > QTY
< th bgcolor = Color #FFFFFF = #000000 > DEPOSIT CIR < table >
< th bgcolor = Color #FFFFFF = #000000 > SSF FLAG < table >
< th bgcolor = Color #FFFFFF = #000000 > < table > UI
< th bgcolor = Color #FFFFFF = #000000 > SFX CD < table >
< th bgcolor = Color #FFFFFF = #000000 > DIRECT FILL < table >
< th bgcolor = Color #FFFFFF = #000000 > < table > STCN
< th bgcolor = Color #FFFFFF = #000000 > POWER CL < table >
< th bgcolor = Color #FFFFFF = #000000 > DT SSAR < table >
< th bgcolor = Color #FFFFFF = #000000 > DT MCEA < table >
< th bgcolor = Color #FFFFFF = #000000 > DT LAT ME < table >
";
for ($i = 3; $i < $number_of_orders; $i ++)
{
$line2 = explode ("|", $orders [$i]);
ECHO '.
< b >
< td align = "center" > $line2 [0] < table >
< td align = "center" > $line2 [1] < table >
< td align = "center" > $line2 [2] < table >
< td align = "center" > $line2 [3] < table >
< td align = "center" > $line2 [4] < table >
< td align = "center" > $line2 [5] < table >
< td align = "center" > $line2 [6] < table >
< td align = "center" > $line2 [7] < table >
< td align = "center" > $line2 [8] < table >
< td align = "center" > $line2 [9] < table >
< td align = "center" > $line2 [10] < table >
< td align = "center" > $line2 [11] < table >
< td align = "center" > $line2 [12] < table >
< td align = "center" > $line2 [13] < table >
< td align = "center" > $line2 [14] < table >
< td align = "center" > $line2 [15] < table >
< td align = "center" > $line2 [16] < table >
< td align = "center" > $line2 [17] < table >
< td align = "center" > $line2 [18] < table >
< td align = "center" > $line2 [19] < table >
< td align = "center" > $line2 [20] < table >
< td align = "center" > $line2 [21] < table >
< td align = "center" > $line2 [22] < table >
< td align = "center" > $line2 [23] < table >
< td align = "center" > $line2 [24] < table >
< /tr > ";
}
echo "< / table >";
}
Returns an array of rows dbms_output or false.
function GetDbmsOutput ($con)
{
$res = false;
$stid = doParse ($con, "BEGIN DBMS_OUTPUT. GET_LINE (: LN,: ST); END; ») ;
If {($stid)
If (doBind ($stid, ': LN ', $ln, 255 "") & &)
doBind ($stid, ": ST", $st, "")) {}
$res = array();
While ($succ = {doExecute ($stid))}
If ($st)
break;
[] $res = $ln;
}
If (! $succ)
$res = false;
}
@OCIFreeStatement ($stid);
}
return ($res);
}
Parse
function doParse ($con, $stmt)
{
$stid = @OCIParse ($con, $stmt);
If (! $stid)
PrintOCIError (@OCIError ($con));
return ($stid);
}
Link
function doBind ($stid, $bn, & $bv, $ln)
{
$s = @OCIBindByName ($stid, $bn, $bv, $ln);
If (! $s)
PrintOCIError (@OCIError ($stid));
return ($s);
}
Run
function doExecute ($stid)
{
$s = @OCIExecute ($stid);
If (! $s)
PrintOCIError (@OCIError ($stid));
return ($s);
}
OIC display error
function PrintOCIError ($err)
{
echo "< p > < b > error < /b >: < /p > < pre > \n"..htmlentities($err['message'])"< / pre > \n";
}
$con = @OCILogon ("username", "password", "Server");
If (! $con) {}
PrintOCIError (@OCIError ());
Die();
}
Turn on serveroutput
SetServerOutput ($con, true);
Create the dbms_output
$s = doParse ($con, "begin data_pull_views.x_doc_num_query('$don'); end; ») ;
If ($s)
doExecute ($s);
OCILogoff ($con);
The output display
OCILogoff ($con);
DisplayDbmsOutput ($con);
PEOPLE WITH DISABILITIES END * /.
? >
< / body >
< / html >
===========================
===========================
What I've learned so far PHP code somehow seizes the dbmd_output buffer and load it in a table before you display it on the screen. Fine. I can even take a stab at some ODBC in VBScript with ASP commands, but it almost seems like it is not yet possible. Just a stab here's to it in ASP which is not error, but also returns no data.
< %
Van Goethem = request ("don")
If van Goethem = "" then
Van Goethem = "asdf1234".
End If
Set gv_con = Server.CreateObject ("ADODB. Connection")
gv_con. ConnectionString = "Data Source = dsource; User = username ID; Password = password; »
gv_con. Open
the value of cmd = Server.CreateObject ("ADODB.Command")
cmd ActiveConnection in the Group gv_con
cmd.CommandText = "begin data_pull_views.x_doc_num_query ('" & van goethem & "');" end; »
cmd.CommandType = 1
Set the param = cmd.createparameter ("OutPut" 200,4, 50)
cmd. Parameters.Append param
cmd. run
Response.Write "strText =" & cmd ("OutPut") & "< BR BR > > <" "»
% >
So I obviously have no idea what I'm doing. Any help getting this race would be appreciated greately.
Hello
I don't know anything about PHP either, but a quick look at the code, it seems that the procedure is pretty much just "all wrong", and unfortunately now it is your task to continue the tradition rather than fix the stored procedure.
The thing that makes me say that it is "all wrong", it's that he uses dbms_output to communicate data. DBMS_OUTPUT is not intended to be used to return the results of a procedure, or be used as a reporting tool; It's supposed to be used to add debugging for troubleshooting instructions. The right thing to do is to return the results of a procedure stored via a parameter, refcursors, etc.
Anyway, as you can not change the procedure, the problem boils down to the buffer that was completed by telephone dbms_output.put_line obtaining using calls to dbms_outout.get_line and here is a simple example that shows how you can go about this using ADO and ODBC.
It will be useful,
Greg
procedure
=======
create or replace procedure populate_dbms_buffer as
begin
dbms_output.put_line('foo');
dbms_output.put_line('bar');
dbms_output.put_line('baz');
end;
/
VBScript
========
Const adLongVarChar = 201
Const adInteger = 3
Const adParamOutput = &H0002
set con = createobject("adodb.connection")
con.open "dsn=orcl;uid=scott;pwd=tiger"
set cmd = CreateObject("adodb.command")
set cmd.ActiveConnection = con
cmd.commandtext = "begin dbms_output.enable(32000);end;"
cmd.execute
cmd.CommandText = "begin populate_dbms_buffer(); end;"
cmd.execute
cmd.CommandText = "begin dbms_output.get_line(?,?);end;"
Set prmv2 = cmd.CreateParameter("",adLongVarChar, adParamOutput, 32767,"")
Set prmnum = cmd.CreateParameter("", adInteger,adParamOutput,,1)
cmd.Parameters.Append prmv2
cmd.Parameters.Append prmnum
stillmore=0
while (stillmore<>1)
cmd.execute
stillmore = prmnum.value
if (stillmore<>1) then
wscript.echo prmv2.value
end if
wend
'cleanup ommitted
wscript.echo "done"
output
=======
C:\>odbcparams_dbmsgetline.vbs
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.
foo
bar
baz
done
Tags: Database
Similar Questions
-
Need help with Oracle SQL merge records according to date and term dates
Hi all
I need help to find this little challenge.
I have groups and flags and effective dashboards and dates of term against these indicators according to the following example:
GroupName Flag_A Flag_B Eff_date Term_date Group_A THERE THERE 20110101 99991231 Group_A N N 20100101 20101231 Group_A N N 20090101 20091231 Group_A N N 20060101 20081231 Group_A N THERE 20040101 20051231 Group_A THERE THERE 20030101 20031231 Group_B N THERE 20040101 99991231 Group_B N THERE 20030101 20031231 As you can see, group_A had the same combination of (N, N) flag for three successive periods. I want to merge all the time periods with the same indicators in one. Where entry into force will be the most early (underlined) time period and end date will be later (underlined)
So the final result should look like this:
GroupName Flag_A Flag_B Eff_date Term_date Group_A THERE THERE 20110101 99991231 Group_A N N 20060101 20101231 Group_A N THERE 20040101 20051231 Group_A THERE THERE 20030101 20031231 Group_B N THERE 20030101 99991231 Thanks for your help
Here's the DDL script
drop table TMP_group_test;
create table TMP_group_test (groupname varchar2 (8))
, flag_a varchar2 (1)
, flag_b varchar2 (1)
, eff_date varchar2 (8)
, term_date varchar2 (8)
);
insert into TMP_group_test values ('Group_A', 'Y', 'Y', ' 20110101 ', ' 99991231');
insert into TMP_group_test values ('Group_A', 'n', ' n ', ' 20100101 ', ' 20101231');
insert into TMP_group_test values ('Group_A', 'n', ' n ', ' 20090101 ', ' 20091231');
insert into TMP_group_test values ('Group_A', 'n', ' n ', ' 20060101 ', ' 20081231');
insert into TMP_group_test values ('Group_A', 'n', 'Y', ' 20040101 ', ' 20051231');
insert into TMP_group_test values ('Group_A', 'Y', 'Y', ' 20030101 ', ' 20031231');
insert into TMP_group_test values ('Group_B', 'n', 'Y', ' 20040101 ', ' 99991231');
insert into TMP_group_test values ('Group_B', 'n', 'Y', ' 20030101 ', ' 20031231');
commit;
Post edited by: user13040446
It is the closest, I went to the solution
I create two rows;
Rnk1: partition by group name, order of eff_date / / desc: this grade will sort the records of the most recent and handed to zero for each group\
Rnk2: (dense) partition by group name, flag_A, flagb: this grade for each combination of group\flag gives a number so that they are classified as "families".
Then I use the function analytic min
Min (eff_date) more (partition of GroupName, rnk2): the idea is that, for each Member of the same family, the new date is the min of the family (and the max for the date of the term), at the end I just need separate so that the duplicates are gone
Now the problem. As you can see from the query below, records of 1 and 6 (as identified by rownum) are identified in the same family, because they have the same combination of flag, but they are not successive, so everyone must keep its own date of entry into force.
If only I can make the distinction between these two that would solve my problem
Query:
Select rowNum,GroupName, flag_a, flag_b, eff_date, term_date, rnk1, rnk2
, min (eff_date) more than (partition by GroupName rnk2( ) min_eff
Of
(
Select rowNum,
GroupName , flag_a , flag_b , eff_date , term_date
rank() more than (partition by GroupName stopped by eff_date desc) rnk1
DENSE_RANK() more than (partition by GroupName order by flag_A flag_B ( ) rnk2
de dsreports . tmp_group_test
) order by rowNum
Hello
user13040446 wrote:
Hi KSI.
Thanks for your comments, you were able to distinguish between these lines highlight, but lost lines 2,3,4 which are supposed to have the same date min = 20060101.
Please see the table wanted to see the final result I want to reach
Thanks again
This first answer is basically correct, but in the main query, you want to use the function MIN, not the analytical function aggregation and GROUP BY columns with common values, like this:
WITH got_output_group AS
(
SELECT GroupName, flag_a, flag_b, eff_date, term_date
ROW_NUMBER () OVER (PARTITION BY GroupName
ORDER BY eff_date
)
-ROW_NUMBER () OVER (PARTITION BY GroupName, flag_a, flag_b)
ORDER BY eff_date
) AS output_group
OF tmp_group_test
)
SELECT GroupName, flag_a, flag_b
MIN (eff_date) AS eff_date
MAX (term_date) AS term_date
OF got_output_group
GROUP BY GroupName, flag_a, flag_b
output_group
ORDER BY GroupName
eff_date DESC
;
The result I get is
GROUP_NA F F EFF_DATE TERM_DAT
-------- - - -------- --------
Group_A Y 20110101 99991231 Y
N Group_A 20101231 20060101 N
Group_A N 20051231 20040101 Y
Group_A Y Y 20031231-20030101
Group_B N Y 99991231 20030101
which is what you asked for.
-
Need help with Oracle Database Backup &; Restore Cold
Environment:
Oracle Version: 11.2.0.4
Platform: AIX
A few weeks ago, I had updated my Oracle 10.2.0.1 to 11.2.0.4 database. The customer changed his mind and now I downgrade to 10.2.0.1. Unfortunately, the compatibility setting is set to 11.2.0.4. So I can't use the lower upgrade scripts.
I had taken a cold backup of the database before the upgrade. Unfortunately, I missed save logs for recovery.
Is there a way I can always downgrade / recovery 10.2.0.1 with cold back? or is it simply not possible without the backup of redo logs.
Thanks in advance.
rogers42
I had taken a cold backup of the database before the upgrade. Unfortunately, I missed save logs for recovery.
And what do YOU mean by "had taken a cold backup"?
Because in addition to what John said, you also need the correct initialization file.
Do you have a return of this init file which was taken at the same time as the backup?
I had updated my Oracle 10.2.0.1 to 11.2.0.4 database.
I suggest that you first reinstall the 10.2.0.1 version or Oracle before recovering your cold backup.
You must use the EXACT name of the folder structure and file that have been used originally.
See my response in this thread a few years ago:
Re: Restore incompatible cold backup
You will be able to simplify this process, some given that your backup is consistent, but the steps should help you to understand what to do.
One of my answers in THIS thread has real details for each of the steps in the other thread
-
Need help - financial Oracle 11i vs (payable Oracle and Oracl pay) r12
Hi all
I am beginner in Oracle Application and request your help answering my questions.
Background:
Three years ago, my company intended to implement ERP Oracle Financials.
To facilitate the plan, an open call for tenders was created to find the best implementation of the company at an affordable price.
The tender was created when Oracle Financials 11i.
When the contract was signed 2 years ago by my company and the winning company, it is mentioned that the installed version must be the last.
The answer to the needs, the winning company said that payment activity will be facilitated by Oracle Payable.
Now, the project is going and the Oracle has the version of recommendation 12.
Problem:
To 11i, there was only a single module related to the activities of payment, that is Payable to Oracle.
Recommendation 12, Oracle has a new module, i.e. Oracle payment, which was the subdomain of Oracle Payable.
Question:
1. is my view on the relationship between Oracle and Oracle payment payable above correct?
2 - is my company has the right to ask for payment of the Oracle installation?
3. If the answer to the number 2 is Yes, what is the basis for this?
Thanks for the explanation.
Sorry if I ask a simple question.
Kind regards
Dodydh
Published by: 840286 on February 28, 2011 03:28Hi Dodydh,
I'm afraid, your statement "Oracle to recommendation 12, a new module, i.e. Oracle payment, which was the subdomain of Oracle to pay." is not correct.
Oracle payments is a version upgrade of Oracle 11i iPayments and this module is supposed to use Self service modules. But lots of payment which is part of the creditors of the Oracle was moved to Oracle payments.
You may very well ask to implement payment lots (process related to the disbursement of funds) but not all of the module.
Please let me know if you need more information.
Kind regards
Sridhar -
Hello Experts,
My name is Rohan and I work as an Oracle DBA now, I fell on the ASM and I want to learn it.
I have a knowledge base of Oracle ASM and I also configured/created an instance using DBCA.
Now for the best understanding I want to create the same with the command line.
Everyone please give me the great tutorial for the same?
I'm using oracle 11.2.0.3 on windows.
Thanks in advance.
CREATE DATA base should be with the ORACLE_SID set to the desired database SID, not the SID of the DSO. Also, if you have (as in 11 g) two separate ORACLE_HOMEs for the ASM and the database, the DATA CREATE database must be run ORACLE_HOME database.
Hemant K Collette
-
Not a dba and need help for Oracle 11 G
I have install an output db in space and I can't get the client that I work to install the spacewalk to connect to the db.
output in the configuration of the client space (research forward and reverse and can ping by short/longname and IP.)
# output extravehicular-installation - disconnected - external-db
* Setting the Oracle environment.
* Setting up database.
* Database: set up the connection of database for Oracle backend.
Name of the database service (SID)? spcwlk
Name of database to host [localhost]? spacedb.domain.com
Database (listener) port [1521]?
The database connection error: ORA-12543: TNS:destination host unreachable (DBD ERROR: OCIServerAttach)
DB server
listener.ora # Network Configuration file: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = spacedb.domain.com) (PORT = 1521))
)
)
ADR_BASE_LISTENER = / u01/app/oracle
lsnrctl start $
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 18-SEP-2014 11:17:37
Copyright (c) 1991, 2009, Oracle. All rights reserved.
From /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: Please wait...
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System settings file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/db-obrien/listener/alert/log.xml
Listen on: (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1521)))
Listen on: (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=spacedb.domain.com) (PORT = 1521)))
Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start date 18 - SEP - 2014 11:17:39
Uptime 0 days 0 h 0 min 0 sec
Draw level off
Security ON: OS Local Authentication
SNMP OFF
Parameter Listener of the /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora file
The listener log file /U01/app/Oracle/diag/tnslsnr/spacedb/listener/alert/log.XML
Summary of endpoints listening...
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1521)))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=spacedb.domain.com) (PORT = 1521)))
The listener supports no services
The command completed successfully
Hello
Please add below lines to your listner.ora file and reload the listner.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME =
) (ORACLE_HOME =
) (GLOBAL_DBNAME =
) )
)
Thank you
Jihane Narain Sylca
-
Need help on Oracle trade management Matrix environments
Hi all
I'm looking for details of supported environments for ATG v11.1 Matrix.
I googled and found this link: https://support.Oracle.com/epmos/faces/DocumentDisplay?ID=1345041.1
But it is asking for support IDs.
Any help is appreciated.
Thank you
Mamadou
To download this doc, you must indeed the identifier of customer support, but for your quick reference, here are the details for some of the environments supported for Oracle trade 11.1.0.0 that you may be looking for.
Application server:
Oracle WebLogic (WLS) - 12.1.2
IBM WebSphere (has BEEN) - 8.5.5.1
JBoss - 6.1.0 EAP
DB:
Oracle - Oracle Exadata
Oracle - 12 c (12.1.0.0)
Oracle - RAC (12.1.0.0) 12 c
Oracle - 11 GR 2 (11.2.0.2.0)
Oracle - 11 GR 2 CARS (11.2.0.2.0)
IBM DB2 - 10.5
MSSQL - 2012
MySQL8 (dev. Only) - 5.6.11
JDBC driver
Thin Oracle - 11.2.0.3, 12.1.0.1.0
MySQL connect (dev. only) - 5.1.24
Microsoft SQL Server JDBC - 4.0
iNet Merlia - version 8.0.2
DB2 Universal driver - 3.67.26
JDK
Oracle Java - 1.7.0_55 (64-bit)
IBM SDK - 1.7 SR1 (64-bit)
Thank you
-
Hello
I use Oracle Apex 4.01 in Oracle 10 g.
I am trying to create a page of Apex, sort of time table system. In this page I have 3 text items field and the other two are date fields. and two buttons.
You must submit (B1) and the other is to add any folder (B2).
My job is if I press the add another button to record (B2) then a new line with the same types of items (3 items) must be created in the page and if I press this button once again and then a new line with the same elements must be created on the page and so on.
Example of
The initial Page view: Point 1, Item2, Item3 B1, B2
When you press B2: point 1, Item2, Item3
Article 1, Item2, Item3 B1, B2
When B2 press again: point 1, Item2, Item3
Article 1, Item2, Item3
Article 1, Item2, Item3 B1, B2
so now...
Finally if I press send, but all the values I entered must be stored in the table.
Example, if I press the B2 3 times and press B1, then these 3 records are stored in the table.
Can someone tell me please how to do this in the Apex.
Thank you
RikRik,
It looks like the basic functionality of the tabular presentation.
-David
-
Hello
I have a customer as requirement below
We have the table header and contains data such as
ID, custname, socket
101, raju, 514
102, ratna, 12
103, rakesh, 16
104, joseph, 129
and we mappingtable like below as
sampval, socket
244094,512
244095,2
244096,4
244097,8
244098,16
244102,128
244103,1
If header.mapvalue is 514 analysis then it out on the mappingtable basis to be exported for a value of 244094. 244095.
Header.mapvalue is 12 parsing it out based on mappingtable to be exported for a value of 244096. 244097 and so on...
Could you please help me how to get the functionality in a database query.
Thanks in advance
Try to query below and let me know
SELECT id,
custName,
HT.mapvalue,
req_val
From ht header_tbl,
(SELECT SAMPVAL,
socket,
CITY,
SUMVAL,
REQ_VAL
Of
(SELECT SAMPVAL,
socket,
CITY,
SUMVAL,
REQ_VAL,
ROW_NUMBER() over (ORDER BY lvl SUMVAL PARTITION) rn
Of
(SELECT sampval,
socket,
City,
LEVEL lvl,
CASE
WHEN ((= LEVEL 2)
AND (socket = socket connect_by_root))
THEN socket
ANOTHER socket + connect_by_root socket
END as sumval,
CASE
WHEN ((= LEVEL 2)
AND (socket = socket connect_by_root))
THEN TO_CHAR (sampval)
Of OTHER TO_CHAR (CONNECT_BY_ROOT sampval
||'|'
|| sampval)
END AS req_val
A mapping
CONNECT BY LEVEL<=>=>
)
WHERE the lvl = 2
)
WHERE rn = 1
) qry_rslt
WHERE ht.mapvalue = qry_rslt.sumval;
An alternative with xmlagg, you can use this query to achieve your requirement
SELECT id, custname, RTRIM (xmlagg (xmlelement(e,mp.sampval||'|')). Extract ('//Text ()'),'| ') req_val
From header_tbl, mapping mp ht
WHERE mp.mapvalue = BITAND (mp.mapvalue, ht.mapvalue)
GROUP BY id, custname;
-
Need help gems Oracle frm to answer 3 questions. your help w'l b enjoy.
Hello
I want to know the answer to three questions, Hope you help out me.
1. how to create pfile from spfile, when the database is down (no permission to use the command 'no strings' no newspaper alerts very convenient).
2. How can we check only backup controlfile (State and location) through RMAN. (AutoSave is disabled).
3. can we have local undotbs in the case of CARS
Thank you
FRDZ.Salvation;
1. how to create pfile from spfile, when the database is down (no permission to use the command 'no strings' no newspaper alerts very convenient).
Inactive db connection
sqlplus "virtue sysdba".
SQL > create pfile ='/ tmp/xx ' from spfile;2. How can we check only backup controlfile (State and location) through RMAN. (AutoSave is disabled).
Connect rman
RMAN > list backup of controlfile;3. can we have local undotbs in the case of CARS
http://oracleabc.com/b/archives/2523
Respect of
HELIOS -
Need help to write PHP if statement by comparing date
With the help of PHP/mySQL
have records of article with timestamp to insert into the column items.item_listed
want to show an image that says 'Point has expired", if the timestamp is more than 60 days ago.
Thanks for your help,
Jim Balthrop
change to test 10 days?
Jim, did you even look at the code?
$sixty_days = 60 * 24 * 60 * 60;
The code gives to think that 60 days * 24 hours a day * 60 minutes in an hour * is 60 seconds in a minute compared to the time variable. To change in 10 days, you would obviously change the code like this:
$sixty_days = 10 * 24 * 60 * 60;
-
nx9105: System 16316 disabled need help what power on computer hp laptop of password
System disabled 16316 need help working and then a code pop - up 16316 power on password can someone help me need power on password for hp compaq please
Hello
Enter: oirb
or
rcxalnd
Kind regards
DP - K
-
Hello
I intend to install some Applications Oracle Business Intelligence 11.1.1.7.1 in my machine. I need some clarification before you install it.
(1) can I install and run unity of repository on the local computer (that is not a server)?
(2) don't need an application server for the installation of the Oracle Applications Business Intelligence 11.1.1.7.1? If so where should I install the server applications or server or in my local computer?
Thanks in advance
Here you go...
(1) can I install and run unity of repository on the local computer (that is not a server)?
Yes, you can, if you have a database and ongoing running and accessible from your machine.
(2) don't need an application server for the installation of the Oracle Applications Business Intelligence 11.1.1.7.1? If so where should I install the server applications or server or in my local computer?
Yes you need, and it will be good to have it on your machine.
Before installing, make sure that you have min 4 GB of ram to work actively on OBIEE.
So useful mark...
Let me know if you need help with the installation.
-
Need help to provide a page for the Oracle PeopleSoft HCM on internet
Hello
I need help to provide that a page of Oracle PeopleSoft HCM on internet for vacancies may be available for recruitment. How can I provide a Peoplesoft Web page?
TKS
Bruno will read
Of Peoplebooks
Access to external Sites
External candidates, by definition, do not have the nicknames PeopleSoft. To allow external users access to a site, you put a link to the site on a location such as your public Web site. The site definition includes a field to set the URL of this external link.
Deployed in this mode, the instance of PeopleSoft to be accessed by external users must have the appropriate security settings to allow users to bypass the access code. In other words, a user who clicks on the link is not presented with a PeopleSoft signon pages but is instead signed the using a user ID generic comments so that the user can be taken directly to the candidate Gateway.
If an external candidate allows a more inactive candidate gateway session that the timeout you set, the default system behavior is to provide a link to the login page of PeopleSoft with the visible invited user ID. According to your logic of password, the guest user ID might be locked if the applicant tries in vain to connect. For more security and ease of use, replace the code page to a page that displays an appropriate message. For example, to display a message that the session has expired and provide a link back to the bridge of the candidate.
-
Need help for query flat_file type clobdata oracle table data.
Hi Sir,
I need help to query oracle table flat file data having given clob type.
COLUMN FOR CHAR_DATA FLAT_FILEOracle Version: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product PL/SQL Release 10.2.0.1.0 - Production "CORE 10.2.0.1.0 Production" TNS for 32-bit Windows: Version 10.2.0.1.0 - Production NLSRTL Version 10.2.0.1.0 - Production Source table CREATE TABLE order_details ( QUEUE_SEQNUM NUMBER(10,0) NOT NULL ENABLE, LINE_SEQNUM NUMBER(10,0) NOT NULL ENABLE, CHAR_DATA CLOB, OPTIMISTIC_LOCK_KEY NUMBER(20,0) )
EXPECTED RESULTS:EU,6067AT,AT10,000000402004,NexiumGERDManagementProject,Z435,,ZZ29,NIS-GOLD,AT EU,6067AT,AT10,000000402038,NIS-OEU-ARI-2007/1,Z450,,ZZ29,NIS-OEU-ARI-2007/1,AT EU,6067AT,AT10,000000402039,SymbicortNISinCOPD,Z450,,ZZ29,NIS-REU-DUM-2007/1,AT EU,6067AT,AT10,000000402040,D1443L00044SeroquelXRRuby,Z450,,ZZ29,D1443L00044,AT EU,6067AT,AT10,000000402041,NIS-GEU-DUM-2008/1,Z450,,ZZ29,NIS-GEU-DUM-2008/1,AT EU,6067AT,AT10,000000402042,SonstigeAktivitätenLCM,Z450,,ZZ29,.,AT EU,6067AT,AT10,000000402134,D1680L00002Saxagliptin,Z450,,ZZ29,D1680L00002,AT EU,6067AT,AT10,000000402199,SeroquelWaveNIS,Z450,,ZZ29,NIS-NEU-DUM-2009/1,AT EU,6067AT,AT10,000000402313,SeroquelExtra(D1443L00082),Z450,,ZZ29,D1443L00082,AT EU,6067AT,AT10,000000402517,AtlanticD5130L00006(AZD6140),Z450,,ZZ29,D5130L00006,AT EU,6067AT,AT10,000000554494,ArimidexSt.Gallen(13+2),Z142,,ZZ09,,AT EU,6067AT,AT10,000000554495,ArimidexASCO(5delegates),Z142,,ZZ09,,AT EU,6067AT,AT10,000000554496,ArimidexSanAntonio6delegates,Z142,,ZZ09,,AT EU,6067AT,AT10,000000554497,ArimidexBreastCancerSummit(13+2),Z130,,ZZ09,,AT EU,6067AT,AT10,000000554498,ArimidexEIH(15delegates),Z130,,ZZ09,,AT EU,6067AT,AT10,000000554499,ArimidexNIFA(200delegates),Z135,,ZZ09,,AT EU,6067AT,AT10,000000554500,ArimidexNIFAworkshops(8x25),Z135,,ZZ09,,AT EU,6067AT,AT10,000000554501,ArimidexPraktischeGyn.Fortbildung,Z147,,ZZ09,,AT EU,6067AT,AT10,000000554502,ArimidexAGO,Z147,,ZZ09,,AT EU,6067AT,AT10,000000554503,ArimidexHämato/OnkologieKongress,Z147,,ZZ09,,AT EU,6067AT,AT10,000000554504,ARIMIDEXGYNäKOLOGENKONGRESS,Z147,,ZZ09,,AT EU,6067AT,AT10,000000554505,ArimidexChirurgenkongress,Z147,,ZZ09,,AT
AFFIRM_CODE COMPANY_CODE INTERNAL_ORDER_CODE INTERNAL_ORDER_DESC ENIGMA_ACTIVITY SUB_ACTIVITY_CODE IN_AFF_IND ORDER_TYPE EXTERNAL_ORDER COUNTRY EU 6067AT AT10 000000402004 NEXIUMGERDMANAGEMENTPROJECT Z435 NULL ZZ29 NIS-GOLD AT EU 6068AT AT11 000000402005 NEXIUMGERDMANAGEMENTPROJECT Z435 NULL ZZ29 NIS-GOLD AT
Sorry, my bad. Without database at hand, I'll try 'baby steps' (borrowed from Frank) so you don't confuse it with errors that I might add (happens far too often already, but at least you won't "swallow" as forum members think is one of the main goals of this fighter - help her learn - providing not only the proverbial fish.)
Search the Forum - your problem is one of its best sellers. Watching {message identifier: = 10694602} ("split string into" was the key word used in research) you can try something asselect table_row, level clob_row, regexp_substr(char_data,'[^' || chr(13) || chr(10) || ']+',1,level) the_line from (select to_char(queue_seqnum)||':'||to_char(line_seqnum) table_row, char_data from order_details ) connect by regexp_substr(char_data,'[^' || chr(13) || chr(10) || ']+',1,level) is not null and prior char_data = char_data and prior table_row = table_row and prior sys_guid() is not null
to get all the s the_lineall CLOB and after that the use of the example even to get your columns of each the_line.
Concerning
Etbin
Edited by: Etbin on 3.2.2013 09:01
.. .but I m connected to do things according to the instructions, I can't do something.
Used to happen to me too and I did as told to the but only after explaining any disadvantages, I was aware of in time. The last sentence is usually: "O.K. now be just and Don't come back with that kind of thing when it turns out that this isn't the right thing."
rp0428 post - something to remember.
Maybe you are looking for
-
How can I determine what profile Firefox 5 is currently using?
How can I determine what profile Firefox 5 is currently using?
-
5s IPhone &; IOs 9.3
IOs 9.3 has been installed in my IPhone 5 but today offer 9.3 is displayed again. What should I do?
-
Equium A60 power supply insulation question
My laptop recently failed a PAT to trial because of the continuity of the Earth. For background, it's a laptop bought UK but I am running an advance Australian 3-pin into the power adapter as I am in Australia. I saw somewhere on here that standard s
-
Read the motor current by using the controller PXI-7350 and MID-7604
I use the PXI-7350 controller and MID-7604 drive to run a motor drive. I would like to be able to measure the motor current while moving the engines. This measurement is possible? If so, what commands are required to read the motor current?
-
How to format a partition to reinstall Vista
I can not format the partition to reinstall vista on my account was hack and hacker become a law of the user who can do anything with my windows really need help