473,794 Members | 2,708 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

access to database

Hello
I have 2 databases on PostgreSQL, for instance base1, base2.
I connect to psql: psql -p 3333 base1
how can I access to base2 ?
for instance I wont do instruction:

insert into test(a, b)
values
select a, b
from basa2.test

of course baza2.test isn't valid on PostgreSQL - how can I do it ?
how can I get access to another database ?

sorry for my poor english :)

greet
Robert (from Poland)
Jul 19 '05 #1
3 2599
RobertG wrote:
Hello
I have 2 databases on PostgreSQL, for instance base1, base2.
I connect to psql: psql -p 3333 base1
how can I access to base2 ?
for instance I wont do instruction:

insert into test(a, b)
values
select a, b
from basa2.test

of course baza2.test isn't valid on PostgreSQL - how can I do it ?
how can I get access to another database ?

sorry for my poor english :)

greet
Robert (from Poland)


I answered this from another news client which sometimes doesn't send
properly. So I'll answer again.

If I remember correctly (IIRC), you can't open 2 different dbases using
pgsl. You can do it by using perl DBI. I can help you do this if you
need help.

Boyd
Jul 19 '05 #2
On Tue, 10 Feb 2004 14:58:50 -0500, boyd (remove_) tb_moore_@beale net_.com
wrote:
I answered this from another news client which sometimes doesn't send
properly. So I'll answer again.

If I remember correctly (IIRC), you can't open 2 different dbases using
pgsl. You can do it by using perl DBI. I can help you do this if you
need help.


I believe his other option would be to use two schemas rather than two
databases.

Cheers!

Greg

Jul 19 '05 #3
Hi Robert,

I've never able to log in to one database and query data from another
database in my sql queries.

But what will work is if you create one (1) database and put two distince
"schemas" in them. Read the PostgreSQL documentation about schemas. If
you went that route, you'd have one database, call it "myDB" for example.
Then, within myDB, you could create two schemas called "base1" and
"base2". If you had proper permissions on both schema's, then your query
would work. You'd have to modify your query to reference the proper
schemas with something like:

INSERT INTO base1.test(a,b)
VALUES (SELECT a, b
FROM base2.test
)

But other than using schema's like that, I don't know how to query data
from one database while logged in to another. If anyone else knows if/how
this can be done I'd love to learn.

Cheers,
w.k.
On Fri, 6 Feb 2004, RobertG wrote:
Hello
I have 2 databases on PostgreSQL, for instance base1, base2.
I connect to psql: psql -p 3333 base1
how can I access to base2 ?
for instance I wont do instruction:

insert into test(a, b)
values
select a, b
from basa2.test

of course baza2.test isn't valid on PostgreSQL - how can I do it ?
how can I get access to another database ?

sorry for my poor english :)

greet
Robert (from Poland)

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
23878
by: Nicola | last post by:
Hi Everyone, I am new to programming and would like to know how to open an access Report from within vb 6. I am trying to write a program to organise cross stitch threads. I have found out how to use a database table but all I want to do now is to click a command button to display this access report. Any suggestions please ?????
11
17063
by: Rosco | last post by:
Does anyone have a good URL or info whre Oracle and Access are compared to one another in performance, security, cost etc. Before you jump on me I know Oracle is a Cadillac compared to Access the Ford Fairlane. I need this info to complete a school project. Thanks.
64
5262
by: John | last post by:
Hi What future does access have after the release of vs 2005/sql 2005? MS doesn't seem to have done anything major with access lately and presumably hoping that everyone migrates to vs/sql. Any comments? Thanks
52
9989
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server 2005, and, since he already has licenses for Office Pro 2002, he wants to upgrade to that. I've been saying that we need to upgrade to Access 2003, not 2002, even if Office is kept at 2002. We are also looking to do a fair amount of...
15
4644
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to communicate with a MySQL database table on a web server, from inside of my company's Access-VBA application. I know VBA pretty well but have never before needed to do this HTTP/XML/MySQL type functions.
49
3238
by: Mell via AccessMonster.com | last post by:
I created databases on Access 2003 and I want to deploy them to users. My code was also done using 2003. If they have Ms Access 2000 or higher, will they be able to use these dbs with all code, etc? Please explain -- Message posted via http://www.accessmonster.com
17
4421
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting there, but is there a way they can find out if that application was put there from a CD or email or created at work? Hint: It's not on a client/server database, just native jet database mdb created on Access 2003 (default 2000)...
34
2617
by: Mathieu Trentesaux | last post by:
Hello I downloaded Office 2007 for this reason : It seems, once again, that it is impossible to save any modification done in a VBA library, from the main project in Access. The save button remains desperatly grayed. It also seems impossible to open the library in another Access instance
21
4124
by: nihad.nasim | last post by:
Hi there, I have a database in Access that I need on the web. The web page should connect to the database and write records for certain tables and view records for others. I want to know a reliable way of connecting Access to a server. I am willing to switch to any version of Access which might solve the problem. Which server would you recommend and what are the advanatages and disadvantatges of the server you propose? Please also inlcude...
11
2408
by: Harel | last post by:
I have a report SQL which have been working for a few weeks. Its large and the target database is large. It has 59 join, and I dont think there is anything I can do about this, since the DB I use has been normalized by pros. My problem is I try to had another join to display another value, then I get a crash report from MS-Access. Anything I can to do diagnose this problem. My development depends on this SQL: SELECT
0
9671
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9518
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10161
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4112
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2919
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.