Article View: borland.public.interbase.sql
Article #894Re: temporal table for stored procedure
From: Bill Todd
Date: Sat, 07 Apr 2007 15:49
Date: Sat, 07 Apr 2007 15:49
24 lines
1766 bytes
1766 bytes
aleplgr wrote: > I should order the table before starting to work with it in the > procedure and I don't know how to ORDER it and give it a name.. The only way to work with data in a table where order can make any difference is to use a SELECT or, in a stored procedure, FOR SELECT...DO so all you need is an ORDER BY clause on the SELECT or the FOR SELECT...DO. You can probably do INSERT INTO MYTABLE (Field1, Field2) SELECT Value1, Value2 FROM ANOTHER TABLE ORDER BY Value2, Value1 although I don't think I have every tried using an ORDER BY with an INSERT. The table name is assigned in the CREATE TABLE statement when you create your database. -- Bill Todd (TeamB)
Technical Details
Message-ID:
<4617af66$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!217.73.144.44.MISMATCH!ecngs!feeder.ecngs.de!newsfeed.freenet.de!news.albasani.net!feeder06.uucp-net.de!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mailReferences:
<461651ac$1@newsgroups.borland.com> <46165aee$1@newsgroups.borland.com> <461765aa$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,ea63e4de71f1ac2a
X-Google-Attributes: gid114a0e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Bill Todd" <no@no.com>
Subject: Re: temporal table for stored procedure
Newsgroups: borland.public.interbase.sql
References: <461651ac$1@newsgroups.borland.com> <46165aee$1@newsgroups.borland.com> <461765aa$1@newsgroups.borland.com>
Organization: The Database Group, Inc.
User-Agent: XanaNews/1.18.1.6
X-Face: ":yn4zt^A_dn>6~{YJmu^B\'4w)e:apPM\VC=Dvf&*tASxX9|BYczkFd$xr.$vNSZ[3Uobr p]c4\+\l){!WQI.$]veP({HLd;CDYH?iN
NNTP-Posting-Host: 216.207.211.19
Message-ID: <4617af66$1@newsgroups.borland.com>
Date: 7 Apr 2007 07:49:10 -0800
X-Trace: newsgroups.borland.com 1175957350 216.207.211.19 (7 Apr 2007 07:49:10 -0800)
Lines: 24
X-Authenticated-User: btodd
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!217.73.144.44.MISMATCH!ecngs!feeder.ecngs.de!newsfeed.freenet.de!news.albasani.net!feeder06.uucp-net.de!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail