Well, looking up the psql command and its parameters should give you what you need. Put the SQL in a text file, and something like
psql < text.file
Should do it.
I work in Linux. Others can help you with windows.
Roger
Get BlueMail for Android
On 18 Jun 2020, 19:54, at 19:54, "GWIN, IVORY" <ig...@at...> wrote:
>I’m running against a Postgres database.
>Ivory
>
>From: Roger Hill <rh...@hi...>
>Sent: Thursday, June 18, 2020 4:59 PM
>To: GWIN, IVORY <ig...@at...>
>Cc: squ...@li...
>Subject: Re: [Squirrel-sql-users] executing sql for command line
>
>
>Hi.
>
>Against what database? Postgres, Mysql, Ingres etc etc?
>
>But this is nothing to do with Squirrel SQL directly.
>
>Roger
>---
>***************************
>Roger Hill
>***************************
>
>
>
>On 2020-06-18 15:44, GWIN, IVORY wrote:
>Looking for examples on how to execute sql code from a window command
>line or bat file.
>
>
>thanks
>
>_______________________________________________
>Squirrel-sql-users mailing list
>Squ...@li...<mailto:Squ...@li...>
>https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_squirrel-2Dsql-2Dusers&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=mP5C9LLnb4KzPsxXvl5F6g&m=7AhZ4E3nmjbpq5yrr08zWhKKmQwC0nVytDXTE8Z7DuE&s=MBlcstUd10SOOXwQLyEWhdUGNi4xsTEVnkTrzDbfgE4&e=>
>
>
>------------------------------------------------------------------------
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Squirrel-sql-users mailing list
>Squ...@li...
>https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
|