Unix Technical Forum

Problem with select first into temp tables

This is a discussion on Problem with select first into temp tables within the Informix forums, part of the Database Server Software category; --> Is this a (know) bug or am I being dim? IBM Informix Dynamic Server Version 10.00.UC3R1TL ---------------------------- echo "select ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 03:59 PM
Clive Eisen
 
Posts: n/a
Default Problem with select first into temp tables

Is this a (know) bug or am I being dim?

IBM Informix Dynamic Server Version 10.00.UC3R1TL

----------------------------
echo "select count(*) from people" | dbaccess data

(count(*))

239567

1 row(s) retrieved.


----------------------------
echo "select first 1 firstname from people " | dbaccess data

firstname

CHRISTINE

1 row(s) retrieved.


------------------------------
echo "select first 1 firstname from people into temp z1 with no log" |
dbaccess data

239567 row(s) retrieved into temp table.

--
Clive
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 03:59 PM
bozon
 
Posts: n/a
Default Re: Problem with select first into temp tables

A very similar statement worked for me on IBM Informix Dynamic Server
Version 10.00.FC4X4.

select first 1 first_name from employee into temp z1 with no log;

So it might be too early for me to spot the problem or it might be a
bug.

Clive Eisen wrote:
> Is this a (know) bug or am I being dim?
>
> IBM Informix Dynamic Server Version 10.00.UC3R1TL
>
> ----------------------------
> echo "select count(*) from people" | dbaccess data
>
> (count(*))
>
> 239567
>
> 1 row(s) retrieved.
>
>
> ----------------------------
> echo "select first 1 firstname from people " | dbaccess data
>
> firstname
>
> CHRISTINE
>
> 1 row(s) retrieved.
>
>
> ------------------------------
> echo "select first 1 firstname from people into temp z1 with no log" |
> dbaccess data
>
> 239567 row(s) retrieved into temp table.
>
> --
> Clive


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 03:59 PM
bozon
 
Posts: n/a
Default Re: Problem with select first into temp tables

Try unloading the records to see what is in them? Could it be a parsing
issue? Do you have a field called first in the table?

Clive Eisen wrote:
> Is this a (know) bug or am I being dim?
>
> IBM Informix Dynamic Server Version 10.00.UC3R1TL
>
> ----------------------------
> echo "select count(*) from people" | dbaccess data
>
> (count(*))
>
> 239567
>
> 1 row(s) retrieved.
>
>
> ----------------------------
> echo "select first 1 firstname from people " | dbaccess data
>
> firstname
>
> CHRISTINE
>
> 1 row(s) retrieved.
>
>
> ------------------------------
> echo "select first 1 firstname from people into temp z1 with no log" |
> dbaccess data
>
> 239567 row(s) retrieved into temp table.
>
> --
> Clive


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-20-2008, 03:59 PM
Goldrick, Jim
 
Posts: n/a
Default RE: Problem with select first into temp tables

It was my understanding that the first qualifier could not be used to select into tables, temp or not.

________________________________

From: informix-list-bounces@iiug.org on behalf of Clive Eisen
Sent: Wed 1/17/2007 6:47 AM
To: informix-list@iiug.org
Subject: Problem with select first into temp tables



Is this a (know) bug or am I being dim?

IBM Informix Dynamic Server Version 10.00.UC3R1TL

----------------------------
echo "select count(*) from people" | dbaccess data

(count(*))

239567

1 row(s) retrieved.


----------------------------
echo "select first 1 firstname from people " | dbaccess data

firstname

CHRISTINE

1 row(s) retrieved.


------------------------------
echo "select first 1 firstname from people into temp z1 with no log" |
dbaccess data

239567 row(s) retrieved into temp table.

--
Clive
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-20-2008, 03:59 PM
Clive Eisen
 
Posts: n/a
Default Re: Problem with select first into temp tables

Goldrick, Jim wrote:
> It was my understanding that the first qualifier could not be used to select into tables, temp or not.


You may be right, although I read it as you can't use first in
sub-selects - and if you try to you get a syntax error

This gives no syntax error, just the wrong result


--
Clive
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-20-2008, 04:00 PM
Paul Watson
 
Posts: n/a
Default Re: Problem with select first into temp tables

Well it is a strange release version and you are two version behind, the
latest is UC6. UC5 appears to have a nasty SELECT/OPTCOMPIND Bug

Paul Watson
Tel: +44 1414161772
Mob: +44 7818003457
Web: www.oninit.com

Failure is not as frightening as regret.

Attend IDUG 2007 San Jose, North America
May 6-10, 2007
Visit http://www.iiug.org/conf for more information.




> -----Original Message-----
> From: Clive Eisen [mailto:clive@serendipita.com]
> Posted At: 17 January 2007 06:48
> Posted To: comp.databases.informix
> Conversation: Problem with select first into temp tables
> Subject: Problem with select first into temp tables
>
>
> Is this a (know) bug or am I being dim?
>
> IBM Informix Dynamic Server Version 10.00.UC3R1TL
>
> ----------------------------
> echo "select count(*) from people" | dbaccess data
>
> (count(*))
>
> 239567
>
> 1 row(s) retrieved.
>
>
> ----------------------------
> echo "select first 1 firstname from people " | dbaccess data
>
> firstname
>
> CHRISTINE
>
> 1 row(s) retrieved.
>
>
> ------------------------------
> echo "select first 1 firstname from people into temp z1 with
> no log" | dbaccess data
>
> 239567 row(s) retrieved into temp table.
>
> --
> Clive


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:47 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com