Sorry if my question sounds a little bit obvious but I'm a little bit new on creating batch files, so the problem is the next one:
I'm creating a batch file that would to be open CMD and then go to a specific folder (psql) in order to execute some commands witch allow me to load data to a DataBase from a file (.csv)
This is my try:
cd "C:\pgsql\bin"
psql -h suggestedorder.postgres.database.azure.com -d DataAnalytics -U dev_ext@suggestedorder -c "\copy planning.prueba (centro, almacen, fecha_carga)from 'C:\Users\geradiaz.MODELO\Desktop\Envase\Selección_Envase\Inputs\No_Seleccionado\o.csv' with delimiter as ','
MyPassword
As I've said the first line goes to pgsql folder, the second line execute the command to copy the data to the data base and the last one (MyPassword) supposes to would be writing my password in the next line when CMD ask for it, but it seems like this last line does not work, when I execute the batch it just keeps the screen with the message "Password for User...".
Do you know guys with kind of commands do I need to execute this batch file?