pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
SQL For smarties
8+ messages / 7 participants
[nested] [flat]

* SQL For smarties
@ 2002-02-15 17:14  Graham Vickrage <graham@digitalplanit.com>
  0 siblings, 3 replies; 8+ messages in thread

From: Graham Vickrage @ 2002-02-15 17:14 UTC (permalink / raw)
  To: pgsql-sql

Hi All,

Does anyone know where I can get the book 'SQL for smarties' as it seems to
be out of print.

Alternatively could anyone recommend a book that is going to help me
represent tree structures in a database and the methods to manipulate them.

Thanks in advance.

Graham.





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: SQL For smarties
@ 2002-02-15 17:35  Bill Cunningham <billc@ballydev.com>
  parent: Graham Vickrage <graham@digitalplanit.com>
  2 siblings, 0 replies; 8+ messages in thread

From: Bill Cunningham @ 2002-02-15 17:35 UTC (permalink / raw)
  To: Graham Vickrage <graham@digitalplanit.com>; pgsql-sql


You mean this book:

http://www.bookpool.com/.x/noh7tjpis1/ss/1?qs=sql+for+smarties&Go.x=0&Go.y=0 
<http://www.bookpool.com/.x/noh7tjpis1/ss/1?qs=sql+for+smarties&Go.x=0&Go.y=0; 


Graham Vickrage wrote:

>Hi All,
>
>Does anyone know where I can get the book 'SQL for smarties' as it seems to
>be out of print.
>
>Alternatively could anyone recommend a book that is going to help me
>represent tree structures in a database and the methods to manipulate them.
>
>Thanks in advance.
>
>Graham.
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo@postgresql.org so that your
>message can get through to the mailing list cleanly
>





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: SQL For smarties
@ 2002-02-15 17:51  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Graham Vickrage <graham@digitalplanit.com>
  2 siblings, 0 replies; 8+ messages in thread

From: Tom Lane @ 2002-02-15 17:51 UTC (permalink / raw)
  To: Graham Vickrage <graham@digitalplanit.com>; +Cc: pgsql-sql

"Graham Vickrage" <graham@digitalplanit.com> writes:
> Does anyone know where I can get the book 'SQL for smarties' as it seems to
> be out of print.

Surely not.  Amazon claims to have it in stock: just go to
www.amazon.com and search for "sql for smarties"; comes right up.

Perhaps you were looking for the first edition?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: SQL For smarties
@ 2002-02-19 16:48  Rajesh Kumar Mallah <mallah@trade-india.com>
  parent: Graham Vickrage <graham@digitalplanit.com>
  2 siblings, 2 replies; 8+ messages in thread

From: Rajesh Kumar Mallah @ 2002-02-19 16:48 UTC (permalink / raw)
  To: Graham Vickrage <graham@digitalplanit.com>; pgsql-sql

Graham Vickrage wrote:

> Hi All,
>
> Does anyone know where I can get the book 'SQL for smarties' as it seems to
> be out of print.
>
> Alternatively could anyone recommend a book that is going to help me
> represent tree structures in a database and the methods to manipulate them.

http://cddb.sai.msu.su/~megera/postgres/gist/
check contrib/tree
i have not tried myself though ;-)

>
>
> Thanks in advance.
>
> Graham.




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: SQL For smarties
@ 2002-02-20 18:55  Graham Vickrage <graham@digitalplanit.com>
  parent: Rajesh Kumar Mallah <mallah@trade-india.com>
  1 sibling, 2 replies; 8+ messages in thread

From: Graham Vickrage @ 2002-02-20 18:55 UTC (permalink / raw)
  To: pgsql-sql

I am trying to create tables from within a funtion i.e.

create function _tree_create(text) retuns int as '
begin;
create table $1_tree (....);
return 1;
end;
...

select _tree_create('item');

An error message refering to $1 gets thrown up. Is this not possible to do
or is there another way of doing it?

Thanks in advance.

Graham





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: SQL For smarties
@ 2002-02-20 19:15  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: Graham Vickrage <graham@digitalplanit.com>
  1 sibling, 0 replies; 8+ messages in thread

From: Stephan Szabo @ 2002-02-20 19:15 UTC (permalink / raw)
  To: Graham Vickrage <graham@digitalplanit.com>; +Cc: pgsql-sql


On Wed, 20 Feb 2002, Graham Vickrage wrote:

> I am trying to create tables from within a funtion i.e.
>
> create function _tree_create(text) retuns int as '
> begin;
> create table $1_tree (....);
> return 1;
> end;
> ...
>
> select _tree_create('item');
>
> An error message refering to $1 gets thrown up. Is this not possible to do
> or is there another way of doing it?

You'll probably need to generate the query string you want to run and
use execute.




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: SQL For smarties
@ 2002-02-20 19:20  Jeff Eckermann <jeff_eckermann@yahoo.com>
  parent: Graham Vickrage <graham@digitalplanit.com>
  1 sibling, 0 replies; 8+ messages in thread

From: Jeff Eckermann @ 2002-02-20 19:20 UTC (permalink / raw)
  To: Graham Vickrage <graham@digitalplanit.com>; pgsql-sql

Try:

execute ''create table '' || $1 || ''_tree (....)'';
(That's doubled single quotes)

--- Graham Vickrage <graham@digitalplanit.com> wrote:
> I am trying to create tables from within a funtion
> i.e.
> 
> create function _tree_create(text) retuns int as '
> begin;
> create table $1_tree (....);
> return 1;
> end;
> ...
> 
> select _tree_create('item');
> 
> An error message refering to $1 gets thrown up. Is
> this not possible to do
> or is there another way of doing it?
> 
> Thanks in advance.
> 
> Graham
> 
> 
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/users-lounge/docs/faq.html


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: SQL For smarties
@ 2002-02-20 20:16  Josh Berkus <josh@agliodbs.com>
  parent: Rajesh Kumar Mallah <mallah@trade-india.com>
  1 sibling, 0 replies; 8+ messages in thread

From: Josh Berkus @ 2002-02-20 20:16 UTC (permalink / raw)
  To: Rajesh Kumar Mallah <mallah@trade-india.com>; Graham Vickrage <graham@digitalplanit.com>; pgsql-sql

Graham,

> > Does anyone know where I can get the book 'SQL for smarties' as it
>  seems to
> > be out of print.

The first edition is out of print.  That's OK, you don't want it.  The
 second edition is in print:

Stacy's Bookstore has it:
http://www.staceys.com/

As does Powell's:
http://www.powells.com/cgi-bin/biblio?inkey=2-1558605762-0

Share & enjoy!

-Josh Berkus


______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco



^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2002-02-20 20:16 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-02-15 17:14 SQL For smarties Graham Vickrage <graham@digitalplanit.com>
2002-02-15 17:35 ` Bill Cunningham <billc@ballydev.com>
2002-02-15 17:51 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-02-19 16:48 ` Rajesh Kumar Mallah <mallah@trade-india.com>
2002-02-20 18:55   ` Graham Vickrage <graham@digitalplanit.com>
2002-02-20 19:15     ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2002-02-20 19:20     ` Jeff Eckermann <jeff_eckermann@yahoo.com>
2002-02-20 20:16   ` Josh Berkus <josh@agliodbs.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox