Thread

  1. Automated scripting...

    jkakar@expressus.com — 2001-01-30T23:54:53Z

    Hi,
    
    I'm building a script to create a relatively large database.  At some
    point in the script I would like to be able to save values into
    variables so that I can use them to populate rows.
    
    Is this possible with SQL?  My understanding is that it is not
    possible but thought I'd ask anyway.
    
    Thanks,
    Jamu.
    
    -- 
    Jamu Kakar (Developer)			Expressus Design Studio, Inc.
    jkakar@expressus.com			708-1641 Lonsdale Avenue
    V: (604) 903-6994			North Vancouver, BC, V7M 2J5
    
    
  2. Re: Automated scripting...

    Christopher Sawtell <csawtell@xtra.co.nz> — 2001-01-31T00:58:46Z

    On Wed, 31 Jan 2001 12:54, jkakar@expressus.com wrote:
    > Hi,
    >
    > I'm building a script to create a relatively large database.  At some
    > point in the script I would like to be able to save values into
    > variables so that I can use them to populate rows.
    >
    > Is this possible with SQL?  My understanding is that it is not
    > possible but thought I'd ask anyway.
    
    I know it seems a bit messy, but you could always use a temporary table to 
    store the values.
    
    -- 
    Sincerely etc.,
    
     NAME       Christopher Sawtell
     CELL PHONE 021 257 4451
     ICQ UIN    45863470
     EMAIL      csawtell @ xtra . co . nz
     CNOTES     ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tar.gz
    
     -->> Please refrain from using HTML or WORD attachments in e-mails to me <<--
    
    
    
  3. Re: Automated scripting...

    Albert REINER <areiner@tph.tuwien.ac.at> — 2001-01-31T17:25:12Z

    Saluton,
    
    On Tue, Jan 30, 2001 at 03:54:53PM -0800, jkakar@expressus.com wrote:
    ...
    > I'm building a script to create a relatively large database.  At some
    > point in the script I would like to be able to save values into
    > variables so that I can use them to populate rows.
    
    Your script will be handled via psql, right? Then you can use \set and
    interpolation, as described in `man psql`.
    
    Albert.
    
    
    -- 
    
    --------------------------------------------------------------------------
    Albert Reiner                                   <areiner@tph.tuwien.ac.at>
    Deutsch       *       English       *       Esperanto       *       Latine
    --------------------------------------------------------------------------