Re: [SQL] "TZ"/"tz" not supported

2008-06-20 Thread Peter Kovacs
Are you basically saying that "TZ" can be used in an "output template string", but not in an "input template string" (in the terminology of the documentation)? If this is the case, shouldn't this be mentioned in the documentation? Also, is there a fundamental reason for this limitation or is it jus

[SQL] Problem inserting data

2008-06-20 Thread Tk421
Hello everybody. I''ve just converted an access database to postgres. The conversion was ok, but when i'm trying to insert data on some tables with boolean types from a Visual Basic application i receive an error. A sample: table example, with firs field of integer, second of type tex

[SQL] Cross Tab Functions

2008-06-20 Thread Chris Preston
Hello All, I have used the cross tab function to setup tables that display months' data, however i need to display years data instead of the months.. so i would display 2006 as a column, 2007 as a colum and 2008 as a column. when i tried to modify the simple example of the cross tab (shown below)

Re: [SQL] "TZ"/"tz" not supported

2008-06-20 Thread Tom Lane
"Peter Kovacs" <[EMAIL PROTECTED]> writes: > Are you basically saying that "TZ" can be used in an "output template > string", but not in an "input template string" (in the terminology of > the documentation)? If this is the case, shouldn't this be mentioned > in the documentation? Also, is there a

Re: [SQL] Problem inserting data

2008-06-20 Thread Adrian Klaver
On Friday 20 June 2008 5:20 am, Tk421 wrote: >Hello everybody. > > I''ve just converted an access database to postgres. The conversion > was ok, but when i'm trying to insert data on some tables with boolean > types from a Visual Basic application i receive an error. A sample: > > table

Re: [SQL] Problem inserting data

2008-06-20 Thread Tom Lane
Adrian Klaver <[EMAIL PROTECTED]> writes: > Two options: > 1) Change the column in Postgres to an integer type. > 2) Change the assignment in pg_cast from explicit to implied for the > int4,bool cast. See for more details: > http://www.postgresql.org/docs/8.3/interactive/catalog-pg-cast.html Mak

Re: [SQL] Problem inserting data

2008-06-20 Thread Tk421
Adrian Klaver escribió: On Friday 20 June 2008 5:20 am, Tk421 wrote: Hello everybody. I''ve just converted an access database to postgres. The conversion was ok, but when i'm trying to insert data on some tables with boolean types from a Visual Basic application i receive a

Re: [SQL] "TZ"/"tz" not supported

2008-06-20 Thread Scott Marlowe
On Thu, Jun 19, 2008 at 11:51 PM, Peter Kovacs <[EMAIL PROTECTED]> wrote: > The database version is 8.3.0. On a side note you should update to 8.3.3... -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] How to manage category-ids as array-fields ?

2008-06-20 Thread Decibel!
On Jun 13, 2008, at 11:02 AM, Andreas wrote: I get from an outside source tables as simple textfiles to import. Those are obviously results of views with joined tables. Among the normal stuff are columns that have one or a list of id- numbers devided by a semicolon. In the next column there is

Re: [SQL] Cross Tab Functions

2008-06-20 Thread Decibel!
Try using extract instead of to_char. date_trunc might also be of use. On Jun 20, 2008, at 8:05 AM, Chris Preston wrote: Hello All, I have used the cross tab function to setup tables that display months' data, however i need to display years data instead of the months.. so i would display 2

Re: [SQL] Cross Tab Functions

2008-06-20 Thread Scott Marlowe
I wrote a real simple trunc() function fashioned after oracles but used some simple rules to let me have modulo date_trunc. I don't have the code anymore. I might sit down and refigure it out... On Fri, Jun 20, 2008 at 8:54 PM, Decibel! <[EMAIL PROTECTED]> wrote: > Try using extract instead of t