RE: Run SQL Statement with temp table from prompt
Posted in 2000
I don't believe the TEMPorary table will de dropped. Have you run the same
SQL interactively, and if so, does it return rows ? I presume DBDATE is set
correctly ?
Regards
Glyn Balmer
-----Original Message-----
From: christian.knappke@sap.com
[mailto:christian.knappke@sap.com]
Sent: 14 November 2000 08:10
To: comp.databases.informix@list.deja.com
Subject: Re: Run SQL Statement with temp table from
prompt
Message from the Deja.com forum:
comp.databases.informix
Your subscription is set to individual email delivery
This message was sent to glyn.balmer@uk.pirelli.com
Deja.com: Best way to buy a PC
http://www.deja.com/channels/channel.xp?CID=13031
oO---------------------------------------------------------Oo
SPONSOR
Shopping for a computer, but unsure which one is right for
you?
We can help! Reference and compare features, photos,
pricing,
professional reviews and consumer ratings on millions
of products.
http://www.deja.com/%5bst_cam=x.deja.x.list%5d/
oO---------------------------------------------------------Oo
"Ilhan Erden" <ilerden@ea-dc.dhl.com> wrote in message
news:8up9av$mt4$1@news.xmission.com...
>
> Hi Everybody
>
> I'm trying to run a SQL statement from the command prompt
> that includes 2 select statements.
> The 1 st statement creates a temp table and I'm trying to
> retrieve data from the created temp table but there
> are no rows retrieved.
> I think because of the ; the temp table is removed.
> I removed the ; but then I got an syntax error.
>
>
> INFORMIXSERVER=server > export
> INFORMIXSERVER
> INFORMIXDIR=/opt/informix > export
> INFORMIXDIR
> $INFORMIXDIR/bin/dbaccess dcs <<
> !!
> select *, "20"|| shipmentdate[1,2] yil,shipmentdate[3,4]
> ay,
> shipmentdate[5,6] > gun
> from
> esd_exception
> into temp tarih_ayrilmis with no
> log;
> unload to
> gunluk_rapor
> select
>
gun,ay,yil,shipperaccount,airwaybill,consignee_code,cons_iata,
> cons_zipcode,cons_countrycode,exception_msg from
> tarih_ayrilmis
> where yil=year(current) and ay=month(current) and
> gun=day(current)-1
> !!
>
> I would appreciate your comments...
What about encapsulation the whole into
begin work;
<insert sql stuff here >
commit work;
HTH
Christian
--
The opinions stated above are my own
and not necessarily those of my employer.
>
> -------------------------------
> Ilhan Erden
> e-mail : ilerden@ea-dc.dhl.com
> -------------------------------
_____________________________________________________________
Deja.com: Before you buy.
http://www.deja.com/
* To modify or remove your subscription, go to
http://www.deja.com/edit_sub.xp?group=comp.databases.informix
* Read this thread at
http://www.deja.com/thread/%3C8uqs1e%24mk6%241%40news1.wdf.sap-ag.de%3E
Sent via Deja.com http://www.deja.com/
Before you buy.