Not receiving any errors back from DBD::ODBC::VERSION 1.13

Not receiving any errors back from DBD::ODBC::VERSION 1.13

am 28.11.2006 15:55:35 von Peter.Loo

------_=_NextPart_001_01C712FD.428A1D39
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hello,
=20
I am simply testing a DBI->connect, $dbh->prepare and $sth->execute for
the following bundled SQL statement. I am not receiving any errors at
all. I should have received the following error:
=20
Error: ERROR: Relation 'tmp_ppv_store_panel_seq' already exists
(State:HY000, Native Code: 6C)
=20
$sqlString =3D qq{ create temp table tmp_ppv_store_panel_seq as select *
from p_ppv_store_panel_seq ; generate statistics on
tmp_ppv_store_panel_seq; update p_ppv_store_panel_seq set seq_nbr =3D
seq_nbr + 1 ; begin work; insert into p11_ppv_store_panel (
store_panl_gid, dlvrb_gid, stdy_mth, begin_hist_mth, build_tstmp )
select s.seq_nbr, d.dlvrb_gid, d.cohrt_end_dte, extnd_lkbck_strt_dte,
now() from tmp_ppv_store_panel_seq s full outer join p11_study_atrbs d
on seq_nbr > 0 ; insert into p11_ppv_store_panl_type ( dlvrb_gid,
store_panl_typ_desc, build_store_panl_ind, max_msng_mths, max_msng_days,
qlftn_span_smpl_mth_nbr, qlftn_span_span_mth_nbr, lst_updt_id,
lst_updt_dte ) select dlvrb_gid, 'Useless Filler', 'Y',
mt.max_msng_mths, mt.max_msng_days, mt.qlftn_span_smpl_mth_nbr, case
when round(months_between(cohrt_end_dte,extnd_lkbck_strt_dte)) <=3D 12
then 12 else round(months_between(cohrt_end_dte,extnd_lkbck_strt_dte))
end, 'ppv_insert_p_ppv_store_panel_typ', now() from p11_study_atrbs dsa
full outer join m_store_panel_thresholds mt on (mt.clnt_id =3D 'NDC' and
mt.prjct_id =3D 'PPV') ; commit work };
=20
There was nothing in $@.
=20
eval {
$trgt_dbh =3D DBI->connect("dbi:ODBC:db01", "userid", "password", {
RaiseError =3D> 1 } );
$trgt_sth =3D $trgt_dbh->prepare($sqlString);
$trgt_sth->execute();
};
=20
if ($@) {
print "\$@ is: $@\n";
}
=20
Also tried the following and program still exited with no errors.
=20
$trgt_dbh =3D DBI->connect("dbi:ODBC:db01", "userid", "password", {
RaiseError =3D> 1 } );
$trgt_sth =3D $trgt_dbh->prepare($sqlString) || die "$!\n";
$trgt_sth->execute() || die "$!\n";

Can someone please educate me as to what I might be doing wroing?
=20
The version of ODBC I am using is:
=20
$ perl -M'DBD::ODBC' -le 'print $DBD::ODBC::VERSION'
1.13
=20
Thanking you in advance.
=20
Peter

------_=_NextPart_001_01C712FD.428A1D39--

RE: Not receiving any errors back from DBD::ODBC::VERSION 1.13

am 28.11.2006 17:50:48 von Peter.Loo

------_=_NextPart_001_01C7130D.5B158180
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

All,
=20
Never mind, I have just been informed that in Netezza the temp tables
only exist during the session.
=20
Thanks.
=20
Peter
=20
________________________________

From: Loo, Peter # PHX=20
Sent: Tuesday, November 28, 2006 7:56 AM
To: DBI-Users
Subject: Not receiving any errors back from DBD::ODBC::VERSION 1.13


Hello,
=20
I am simply testing a DBI->connect, $dbh->prepare and $sth->execute for
the following bundled SQL statement. I am not receiving any errors at
all. I should have received the following error:
=20
Error: ERROR: Relation 'tmp_ppv_store_panel_seq' already exists
(State:HY000, Native Code: 6C)
=20
$sqlString =3D qq{ create temp table tmp_ppv_store_panel_seq as select *
from p_ppv_store_panel_seq ; generate statistics on
tmp_ppv_store_panel_seq; update p_ppv_store_panel_seq set seq_nbr =3D
seq_nbr + 1 ; begin work; insert into p11_ppv_store_panel (
store_panl_gid, dlvrb_gid, stdy_mth, begin_hist_mth, build_tstmp )
select s.seq_nbr, d.dlvrb_gid, d.cohrt_end_dte, extnd_lkbck_strt_dte,
now() from tmp_ppv_store_panel_seq s full outer join p11_study_atrbs d
on seq_nbr > 0 ; insert into p11_ppv_store_panl_type ( dlvrb_gid,
store_panl_typ_desc, build_store_panl_ind, max_msng_mths, max_msng_days,
qlftn_span_smpl_mth_nbr, qlftn_span_span_mth_nbr, lst_updt_id,
lst_updt_dte ) select dlvrb_gid, 'Useless Filler', 'Y',
mt.max_msng_mths, mt.max_msng_days, mt.qlftn_span_smpl_mth_nbr, case
when round(months_between(cohrt_end_dte,extnd_lkbck_strt_dte)) <=3D 12
then 12 else round(months_between(cohrt_end_dte,extnd_lkbck_strt_dte))
end, 'ppv_insert_p_ppv_store_panel_typ', now() from p11_study_atrbs dsa
full outer join m_store_panel_thresholds mt on (mt.clnt_id =3D 'NDC' and
mt.prjct_id =3D 'PPV') ; commit work };
=20
There was nothing in $@.
=20
eval {
$trgt_dbh =3D DBI->connect("dbi:ODBC:db01", "userid", "password", {
RaiseError =3D> 1 } );
$trgt_sth =3D $trgt_dbh->prepare($sqlString);
$trgt_sth->execute();
};
=20
if ($@) {
print "\$@ is: $@\n";
}
=20
Also tried the following and program still exited with no errors.
=20
$trgt_dbh =3D DBI->connect("dbi:ODBC:db01", "userid", "password", {
RaiseError =3D> 1 } );
$trgt_sth =3D $trgt_dbh->prepare($sqlString) || die "$!\n";
$trgt_sth->execute() || die "$!\n";

Can someone please educate me as to what I might be doing wroing?
=20
The version of ODBC I am using is:
=20
$ perl -M'DBD::ODBC' -le 'print $DBD::ODBC::VERSION'
1.13
=20
Thanking you in advance.
=20
Peter

------_=_NextPart_001_01C7130D.5B158180--