Re: [SQL] conversion of numeric field from MSSQL to postgres

2006-10-23 Thread Andrew Sullivan
On Fri, Oct 20, 2006 at 09:01:15PM -0700, Richard Broersma Jr wrote: > actually I am get duplicate emails like this one across the various PG lists. > Perhaps someone > else is resending these email? More likely, this happened: 1. person sent mail to list, got bounced because not subscribed. 2

Re: [SQL] conversion of numeric field from MSSQL to postgres

2006-10-20 Thread Richard Broersma Jr
> This could be fixed if someone wanted to improve the moderation software > to auto-approve pending messages from someone who's just subscribed, but > perhaps that's a lot of work. I haven't looked at that code, so I'm not > volunteering ... Thats not a problem. I was surprised to see your name

Re: [SQL] conversion of numeric field from MSSQL to postgres

2006-10-20 Thread Tom Lane
Richard Broersma Jr <[EMAIL PROTECTED]> writes: > actually I am get duplicate emails like this one across the various PG lists. > Perhaps someone > else is resending these email? The usual mechanism is * newbie sends question * newbie gets response indicating that message is being held for mo

Re: [SQL] conversion of numeric field from MSSQL to postgres

2006-10-20 Thread Richard Broersma Jr
> It seems that you've already asked for this question last Sunday, and > because your question is somewhat deterministic, the answers are more likely > to be the same. Check your previous e-mails. actually I am get duplicate emails like this one across the various PG lists. Perhaps someone els

Re: [SQL] conversion of numeric field from MSSQL to postgres

2006-10-20 Thread Daniel CAUNE
> De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > De la part de Kenneth Gonsalves > Envoyé : 15 octobre 2006 08:31 > À : pgsql-sql@postgresql.org > Objet : [SQL] conversion of numeric field from MSSQL to postgres > > hi, > > am migrating a database from MSSQL to po

[SQL] conversion of numeric field from MSSQL to postgres

2006-10-20 Thread Kenneth Gonsalves
hi, am migrating a database from MSSQL to postgres. How would i migrate this: [Id] [numeric](18, 0) IDENTITY (1, 1) -- regards Kenneth Gonsalves Associate, NRC-FOSS [EMAIL PROTECTED] http://nrcfosshelpline.in/web/ ---(end of broadcast)---

[SQL] Help - Oracle 9i to PostgreSQL SQL conversion

2005-03-31 Thread Dinesh Pandey
Hi,   I have installed PostgreSQL 8.0.1 on Solaris 9.   I am porting my database from Oracle 9i to PostgreSQL. I am using PL/pgSQL language.   In Oracle we can get error message from "SQLERRM" keyword and inserting it into table.   How can I get error message/code in PostgreSQL after an E

Re: [SQL] Conversion ideas (Views/procedures)

2005-01-19 Thread Keith Worthington
> I am new to Postgres and am converting our MSSQL database to Postgres. > > I just did my first function. > My question is does it make sense to create functions for some of > the common functionality available to the MSSQL world (left, isnull, > etc) so I do not need visit every view, and stor

Re: [SQL] Conversion ideas (Views/procedures)

2005-01-19 Thread KÖPFERL Robert
ry good for the first big steps towards your goal. > -Original Message- > From: Joel Fradkin [mailto:[EMAIL PROTECTED] > Sent: Mittwoch, 19. Jänner 2005 16:23 > To: pgsql-sql@postgresql.org > Subject: [SQL] Conversion ideas (Views/procedures) > > > I am new to Postgr

[SQL] Conversion ideas (Views/procedures)

2005-01-19 Thread Joel Fradkin
I am new to Postgres and am converting our MSSQL database to Postgres. I just did my first function. My question is does it make sense to create functions for some of the common functionality available to the MSSQL world (left, isnull, etc) so I do not need visit every view, and stored procedure t

Re: [SQL] conversion of postgres database to oracle

2004-03-16 Thread Andrew Sullivan
On Tue, Mar 16, 2004 at 02:13:57PM +0200, cristi wrote: > How should I convert a postgres database to oracle? Send it out to ASCII and then import it to Oracle. But if you want support for going _to_ Oracle, you probably ought to get support from Oracle people, right? A -- Andrew Sullivan | [

[SQL] conversion of postgres database to oracle

2004-03-16 Thread cristi
How should I convert a postgres database to oracle?

[SQL] Conversion question

2003-11-19 Thread Graham Vickrage
Apologies as this probably isn't really for this list but... In postgresql you can execute a statement such as: SELECT 1 > 2; And it would return 'f' Does anyone know if you can do this in SQL Server as I have to do a conversion of some prewritten SQL code. MTIA, Graham.

Re: [SQL] Conversion Problem

2003-11-13 Thread Richard Huxton
On Thursday 13 November 2003 12:25, Graham wrote: > Apologies as this probably isn't really for this list but... > > In postgresql you can execute a statement such as: > > SELECT 1 > 2; > > And it would return 'f' > > Does anyone know if you can do this in SQL Server as I have to do a > conversion

Re: [SQL] Conversion Problem

2003-11-13 Thread Christoph Haller
> > Apologies as this probably isn't really for this list but... Right. > > In postgresql you can execute a statement such as: > > SELECT 1 > 2; > > And it would return 'f' > > Does anyone know if you can do this in SQL Server as I have to do a > conversion of some prewritten SQL code. No, I

[SQL] Conversion Problem

2003-11-13 Thread Graham
Apologies as this probably isn't really for this list but... In postgresql you can execute a statement such as: SELECT 1 > 2; And it would return 'f' Does anyone know if you can do this in SQL Server as I have to do a conversion of some prewritten SQL code. MTIA, Graham. -

Re: [SQL] Conversion from Sybase ASA

2003-09-09 Thread Ian Barwick
On Tuesday 09 September 2003 09:06, Richard Sydney-Smith wrote: > In sybase I can use the following syntax: > > select 'T' as src,(if tbon is null or tbon < '1900/12/12' or tbon > > '1900/9/30' then 'U' else 'P' endif) as pres from ftrans > > this returns two columns: src = 'T' and pres which has e

Re: [SQL] Conversion from Sybase ASA

2003-09-09 Thread Viorel Dragomir
;1900/9/30' THEN  'U' ELSE  'P' END) as pres from ftrans   I think it works in Oracle too :) Pay attention at tbon < '1900/12/12'. Try to use conversion on date formats like to_date() or to_timestamp().   Good luck - Original Message ----- From: Ri

[SQL] Conversion from Sybase ASA

2003-09-09 Thread Richard Sydney-Smith
In sybase I can use the following syntax:   select 'T' as src,(if tbon is null or tbon < '1900/12/12' or tbon > '1900/9/30' then 'U' else 'P' endif) as pres from ftrans this returns two columns: src = '' and pres which has either the value 'U' or 'P' how would I express this in postgresql

Re: [SQL] Conversion

2002-08-13 Thread Alexander M. Pravking
On Tue, Aug 13, 2002 at 03:14:38PM +0800, Christopher Kings-Lynne wrote: > > http://www.postgresql.org/idocs/index.php?datatype-datetime.html says: > > > > The types abstime and reltime are lower precision types which are used > > internally. You are discouraged from using any of these types in

Re: [SQL] Conversion

2002-08-12 Thread Christopher Kings-Lynne
> On Tue, Aug 13, 2002 at 11:32:25AM +0800, Christopher Kings-Lynne wrote: > > Is the int4 a UNIX epoch? ie. seconds since 1970? > > > > If so, then this will generally work: > > > > SELECT CAST(int4field AS abstime); > > > > or > > > > SELECT int4field::abstime; > > http://www.postgresql.org/idoc

Re: [SQL] Conversion

2002-08-12 Thread Alexander M. Pravking
On Tue, Aug 13, 2002 at 11:32:25AM +0800, Christopher Kings-Lynne wrote: > Is the int4 a UNIX epoch? ie. seconds since 1970? > > If so, then this will generally work: > > SELECT CAST(int4field AS abstime); > > or > > SELECT int4field::abstime; http://www.postgresql.org/idocs/index.php?datatyp

Re: [SQL] Conversion

2002-08-12 Thread Christopher Kings-Lynne
, 13 August 2002 11:14 AMTo: [EMAIL PROTECTED]Subject: [SQL] Conversion Hi all,       How can I convert from int4 to date time?     Regards,         Lonh

[SQL] Conversion

2002-08-12 Thread Lonh SENG
Hi all,       How can I convert from int4 to date time?     Regards,         Lonh

Re: [SQL] conversion

2001-02-26 Thread Ken Kline
here you go, thanks in advance, ken Table "temp" Attribute |Type | Modifier ---+-+-- pseason | varchar(15) | pyear | varchar(5) | adx=# \d pledge+ _classe4s  s Table "pledge_classes" Attribute | Type

Re: [SQL] conversion

2001-02-26 Thread Stephan Szabo
It looks like you have some rows for pyear which do not convert cleanly into a number like ' '. What do you want it to do in such cases? On Sun, 25 Feb 2001, Ken Kline wrote: > follow up > actually the destination column is defined > as a numeric(4) > > the following are the statements

Re: [SQL] conversion

2001-02-25 Thread Christopher Sawtell
On Mon, 26 Feb 2001 17:11, Ken Kline wrote: > follow up > actually the destination column is defined > as a numeric(4) Could you to a \d on each of the tables and tell us the results. [ ... ] -- Sincerely etc., NAME Christopher Sawtell CELL PHONE 021 257 4451 ICQ UIN45863470

Re: [SQL] conversion

2001-02-25 Thread Ken Kline
follow up actually the destination column is defined as a numeric(4) the following are the statements again with there error messages: SELECT pseason, to_number(pyear,'') from temp; ERROR: Bad numeric input format ' ' SELECT pyear::int from temp; ERROR: Cannot cast type 'varchar' to

[SQL] conversion

2001-02-25 Thread Ken Kline
Hello, another brain twister, at least for me... i have a table of varchar and one of the values I want to insert into another table, one of the columns is defined as INTEGER in destination table, column... and none of these statements seem to work INSERT INTO pledge_classes (semester, year) S