Skip to main content
1-Visitor
February 6, 2018
Solved

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

  • February 6, 2018
  • 2 replies
  • 12898 views

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

Best answer by vranganathan

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

2 replies

12-Amethyst
February 6, 2018

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

kswate1-VisitorAuthor
1-Visitor
February 7, 2018

Hi,

Thank you for the response.

Khelina