[SQL] Multiple databases
Hi, I am converting sql code from sql server to postgresql. Data is currently being retrieved from multiple databases, how do I do this using postgresql. I have tried using eg. select * from datbasename.tablename but this does not work. Any ideas? Thanks, Sumaya
[SQL] dblinks
Hi, I am accessing data across different databases using dblinks but the dates are getting messed up: table: mytable columns: my_id int my_date date values: 1 2008-04-09 When retrieving data from the table in the relevant database the date is returned correctly: 2008-04-09 but when retrieving across dblinks using statement below, I get the following error: statement looks like select * from [EMAIL PROTECTED]; the error refers to the datestyle setting and shows the date as '2008-09-04' Please advise if there is a way around this. Thanks, Sumaya
Re: [SQL] dblinks
Hi, I'm using enterpisedb. The thing is it does return data, it's just that if there is a date column on the table, it gives me the error. Is there no way around this? Unfortunately the architecture will be able to be changed. Thanks, Sumaya -Original Message- From: Jonah H. Harris [mailto:[EMAIL PROTECTED] Sent: Saturday, May 17, 2008 07:31 PM To: [EMAIL PROTECTED] Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] dblinksre On Sat, May 17, 2008 at 6:58 PM, wrote: > statement looks like > select * from [EMAIL PROTECTED]; Postgres does not support this style of database link syntax. Are you using Oracle or EnterpriseDB? -- Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324 EnterpriseDB Corporation | fax: 732.331.1301 499 Thornall Street, 2nd Floor | [EMAIL PROTECTED] Edison, NJ 08837 | http://www.enterprisedb.com/
Re: [SQL] dblinks
Hi, I meant to say, the architecture will NOT be able to be changed. Regards, Sumaya -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday, May 18, 2008 04:47 AM To: 'Jonah H. Harris', [EMAIL PROTECTED] Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] dblinks Hi, I'm using enterpisedb. The thing is it does return data, it's just that if there is a date column on the table, it gives me the error. Is there no way around this? Unfortunately the architecture will be able to be changed. Thanks, Sumaya -Original Message- From: Jonah H. Harris [mailto:[EMAIL PROTECTED] Sent: Saturday, May 17, 2008 07:31 PM To: [EMAIL PROTECTED] Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] dblinksre On Sat, May 17, 2008 at 6:58 PM, wrote: > statement looks like > select * from [EMAIL PROTECTED]; Postgres does not support this style of database link syntax. Are you using Oracle or EnterpriseDB? -- Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324 EnterpriseDB Corporation | fax: 732.331.1301 499 Thornall Street, 2nd Floor | [EMAIL PROTECTED] Edison, NJ 08837 | http://www.enterprisedb.com/