0

inside the database i wrote following:

\i \Programming\my files\SQL\person.sql

in order to create a table from file.

But it says:

There is no available argument \i

Is there any suggestion?

James Z
  • 12,209
  • 10
  • 24
  • 44
  • What RDBMS is this? Sql Server, Postgres, Oracle, Mysql, Mariadb, Snowflake, Teradata, DB2, Redshift, etc? When you say "Inside the database" what do you mean? Inside a sql client connected to the database? Inside the command line on the server that the database is running? Something else? Did anything precede that \i switch, like a command line sql client program `psql \i ... ` `mysql \i` `bteq \i`, `snowql \i` etc? – JNevill Mar 15 '23 at 17:29
  • yes sql client inside the database – Nursultan_Ashirmatov Mar 15 '23 at 17:35
  • psql \i "C:\Programming\my files\SQL\person.sql" like that? – Nursultan_Ashirmatov Mar 15 '23 at 17:36
  • unrecognized win32 error code: 123"C:/Programming/my files/SQL/person.sql: Invalid argument – Nursultan_Ashirmatov Mar 15 '23 at 17:36
  • Am i right typing? i mean signs – Nursultan_Ashirmatov Mar 15 '23 at 17:38
  • test-# psql \i "C:\Programming\my files\SQL\person.sql" unrecognized win32 error code: 123"C:/Programming/my files/SQL/person.sql: Invalid argument – Nursultan_Ashirmatov Mar 15 '23 at 17:42
  • win32 error code 123 means``The filename, directory name, or volume label syntax is incorrect.`` Try to use full path to file \Programming\my files\SQL\person.sql – ValNik Mar 15 '23 at 18:22
  • i tried already psql \i \Programming\myfiles\SQL\person.sql The same error – Nursultan_Ashirmatov Mar 15 '23 at 18:26
  • I'm guessing this is about postgres, and in that I think the `\i` should be inside your .sql file. Something like here: https://stackoverflow.com/questions/129445/postgresql-psql-i-how-to-execute-script-in-a-given-path – James Z Mar 15 '23 at 20:15
  • `test-# psql \i "C:\Programming\my files\SQL\person.sql" ` Really? `test-#` says you are already in `psql`, trying to call it again inside the program is not going to work. Read the docs [psql](https://www.postgresql.org/docs/current/app-psql.html). – Adrian Klaver Mar 15 '23 at 21:39

0 Answers0