export to

2005-02-16 Thread Stephane Legault
Hi, I'am using DBI::DB2 for a lot of program and now I
need to create a programme to archive data. So, I
would like to export data from database to a file and
then load that file in another db2 database.

Here is what I try:
$dbh-do(q{export to test.ixf of ixf select * from
steph_test}) or die $dbh-errstr;

But this give an error:
DBD::DB2::db do failed: [IBM][CLI Driver][DB2/NT]
SQL0104N  An unexpected token test was found
following export to .  Expected tokens may include: 
JOIN.  SQLSTATE=42601

If I'am using the export command on a command line,
it's work well. This sould not work within perl and
DBI?


__
Lèche-vitrine ou lèche-écran ?
magasinage.yahoo.ca


Réf. : UDB/DB2

2003-02-14 Thread Stephane Legault
I did not see a lot of sample script regarding perl and DB2 but if you want
tell me what kind of example you are looking for and I will sent you a
couple of script I've made. I use DB2 and Perl on a regulary basis.


Stéphane Legault, ing.
Services Mondiaux IBM
IBM Canada Ltée
Architecte, SEDQ/Technologies
1 Place Alexis Nihon
3400 Boul. de Maisonneuve ouest
10e étage
Montréal, Qc
H3Z 3K9
Tel. : (514) 205-6724
Fax. : (514) 205-6550
Email : [EMAIL PROTECTED]



   

  Caroline 

  Inchcombe -  Pour :[EMAIL PROTECTED]

  Harvard  cc :

  cinch@metro-centObjet :   UDB/DB2   

  re.co.uk

   

  14/02/2003 08:40 

  AM   

  Veuillez répondre

  à cinch  

   

   




Does anybody know where IBM publish sample Perl code for their UDB/DB2
(dbh) structures. I am using Solaris; Linus and AIX.

Thanks

_
Get Free Web email Account from the MetroCentre ---
http://www.metro-centre.co.uk

_
Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No
Ads, 6MB, POP  more! http://www.everyone.net/selectmail?campaign=tag








how to print null value from a select

2002-11-15 Thread Stephane Legault
I'm using DB2 with perl and I make this select in my code:

$sth= $dbh-prepare (select
date(wedthreenregis),wenid_app,wealias,count(weduration) from
slegault.weexectime where date(wedthreenregis)= ? and wenid_app= ? group by
date(wedthreenregis),wenid_app,wealias);

when the count(weduration) is 0 nothing print to the screen. I need that
because I put the result in a array and make a graph from this array, so I
need always the same format in the result of the query.

Someone can help me?







update a specific row

2002-09-02 Thread Stephane Legault

I use Perl to connect to DB since a long time but my needed until now was
just make a select and insert!! Now I want to update a specific row (in
fact the first row) in a simple table. I use a DB2 database. Can someone
help me?

Thanks





how to insert a blank field in a date field

2002-08-09 Thread Stephane Legault/Quebec/IBM

I'am parsing a text field delimited by ; (see example belown). I split the
file into multiple variable ($) and then execute the request. When the NO
is blank: no problem the record is write inside DB but when de DATE is
blank I receive a message from DB telling me that the format of the date is
not good!!!

I'am using DB2 all the field in the table can be null. Someone can help
me???

Thanks



TEXT FILE
no;date;text;blablabla