cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

CREATE DATABASE cannot be executed from a function or multi-command string

kswate
11-Garnet

CREATE DATABASE cannot be executed from a function or multi-command string

Hi

I am trying create table and load values using a script, after  opening dataloader.sql  when I click execute I get the following error:

ERROR:  CREATE DATABASE cannot be executed from a function or multi-command string

Kindly assist

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

I believe you are installing Custom Asset Viewer. In that case follow the below steps. (If it is not obvious, we can update the document).

1. From windows, search and open pgAdmin III

2. select postgresSQL 9.4 and connect.

3. Enter the password.

3. Select Databases and Rightt Click. Create New Database. Name=mfg and Owner=twadmin

4. Select mfg database. Then SQL icon on the top.

5. Make sure on the top connection if pointing to "mfg on postgres@localhost:5432"

6. Now open the file in the SQL editor (File -> Open). Select dataloader.sql

7. Delete the CREATE statement since you already created the database.

8. Execute the rest of the statements.

9. Make sure to commit.

This should get this going. Let me know if you have any question.

Thanks,

Varathan

View solution in original post

2 REPLIES 2

Hi,

I believe you are installing Custom Asset Viewer. In that case follow the below steps. (If it is not obvious, we can update the document).

1. From windows, search and open pgAdmin III

2. select postgresSQL 9.4 and connect.

3. Enter the password.

3. Select Databases and Rightt Click. Create New Database. Name=mfg and Owner=twadmin

4. Select mfg database. Then SQL icon on the top.

5. Make sure on the top connection if pointing to "mfg on postgres@localhost:5432"

6. Now open the file in the SQL editor (File -> Open). Select dataloader.sql

7. Delete the CREATE statement since you already created the database.

8. Execute the rest of the statements.

9. Make sure to commit.

This should get this going. Let me know if you have any question.

Thanks,

Varathan

kswate
11-Garnet
(To:kswate)

Hi,

Thank you for the response.

Khelina

Top Tags