Re: [SQL] Plz, what is the most "correct" method

2003-09-15 Thread Richard Huxton
On Wednesday 10 September 2003 17:01, PipHans wrote: > Table1: > idAuto,int,PrimKey > table2idint > txt nvarchar50 > > Table2: > idAuto,int,PrimKey > order int > > The scenario: Table2.order defines how the table1.txt is should be ordered. > Table1.table2id contains the id of the or

[SQL] Copy Command Error

2003-09-15 Thread Richard Sydney-Smith
I am outputting the following rows from a SYBASE database on W2000   3 '2' 'IBISFinancials' 'A.C.N. 072 378 815'8 'RK' 'Personal Accounts'    Using the command:   select cast(seq as integer) , id , cmpy, tr_n from fcont; output to d:\fcont.dat format 'ascii' delimited by '\x09'   This output

Re: [SQL] Copy Command Error

2003-09-15 Thread Richard Huxton
On Monday 15 September 2003 09:57, Richard Sydney-Smith wrote: > I am outputting the following rows from a SYBASE database on W2000 > The problem is that each string is imported with the inverted commas. > > eg field ID = ''RK'' instead of 'RK' > > Can someone please help? A short bit of perl. So

Re: [SQL] change a field

2003-09-15 Thread Bruno Wolff III
On Wed, Sep 10, 2003 at 22:12:45 +0200, Patrick Meylemans <[EMAIL PROTECTED]> wrote: > > What is the best way to solve this problem ? The best way is probably with a view. ---(end of broadcast)--- TIP 7: don't forget to increase your free space m

[SQL] SET database TO ...?

2003-09-15 Thread ow
Hi, Suppose, one server/postmaster is running several databases. Is there something like "SET database TO whatever" (and I mean *database* not schema). I need this to ensure that a script runs only against db for which it was desinged. Thanks __ Do you Yahoo

Re: [SQL] SET database TO ...?

2003-09-15 Thread Achilleus Mantzios
On Mon, 15 Sep 2003, ow wrote: > Hi, > > Suppose, one server/postmaster is running several databases. Is there something > like "SET database TO whatever" (and I mean *database* not schema). I need this > to ensure that a script runs only against db for which it was desinged. [EMAIL PROTECTED] ~

Re: [SQL] SET database TO ...?

2003-09-15 Thread A.Bhuvaneswaran
> Suppose, one server/postmaster is running several databases. Is there > something like "SET database TO whatever" (and I mean *database* not > schema). I need this to ensure that a script runs only against db for > which it was desinged. You can use PG* environment variables if you wish to write

Re: [SQL] SET database TO ...?

2003-09-15 Thread ow
--- Achilleus Mantzios <[EMAIL PROTECTED]> wrote: [...] > dynacom=# \c bab > You are now connected to database bab. > bab=# I'm actually looking for a way to set database from a *script*, not psql console, if this is possible (similar to "SET search_path TO whatever;"). Any ideas? Thanks

Re: [SQL] SET database TO ...?

2003-09-15 Thread Tom Lane
ow <[EMAIL PROTECTED]> writes: > --- Achilleus Mantzios <[EMAIL PROTECTED]> wrote: >> dynacom=# \c bab >> You are now connected to database bab. > I'm actually looking for a way to set database from a *script*, not psql > console, if this is possible (similar to "SET search_path TO whatever;"). I