SQL Scripts are lists of SQL sentences written in a single file, meant to be executed sequentially. Depending on the particular RDBMS system, SQL scripts can have procedural language characteristics, such as control-of-flow constructs.
Questions tagged [sql-scripts]
437 questions
1
vote
0 answers
Create mdb table from C# and using OLE OBJECT field
I am creating an Access Database from C# code and using text files to hold the script that is used to create them.
One of the fields I need to create is a image field from my SQL knowledge. The way it needs to get handled in the Access DB requires…

Patrick Moore
- 11
- 2
1
vote
2 answers
It is a way to modify an SQL Insert Script with SED Command in order to insert word DATE before date value?
Modifying SQL Scripts with SED Command
I would like to explain my task. I have been asked to modify many files with one command without alter the data. The core is to properly insert DATE_B values, since it would give us an error trying to insert…

aaronrss
- 23
- 5
1
vote
1 answer
.NET Core Create SQL scripts task failing in azure pipeline - Unable to retrieve project metadata error
I had a perfectly working pipeline for my API project where I followed the below tutorial.
https://dotnetthoughts.net/run-ef-core-migrations-in-azure-devops/
From this, I made a change to get a NuGet package(Class Library) from a private feed at the…

Sechaba Motaung
- 21
- 1
- 7
1
vote
2 answers
SQL Query to fetch the customers registered in the DB without email address(CS can have phonenumber and email in the same field but duplicating)
I need help with writing this query please ,
in the Database - the customer is registered twice , one row with the email address in the VALUE field and the other row with phone number in the SAME VALUE field .
I want to fetch customer who DO NOT…

Zoghlami TAHER
- 13
- 3
1
vote
1 answer
How to run sql scripts in bigquery from apache airflow by ignoring the error in DB
we have one sql script and want to execute it in bigquery from apache airflow using BQ client.
we are generating sql script using python function. while running this script if there is any issue then want to ignore that and proceed run only…

Yug
- 105
- 1
- 9
1
vote
1 answer
\i psql permission denied
I am trying to run a .sql script that uses postgresql. I have installed postgresql, and created a database to run the script in however I continuously get permission denied error on the file. Looking for a solution to issue or workaround to allow…

Fletchy
- 311
- 1
- 4
- 18
1
vote
1 answer
MySQL Sum of multiple columns script
sorry but I'm a begginer at mysql and I would need some help as fast as possible.
So, I have 2 Tables
ProcedureCatalogue:
idProcedure INT(PRIMARY KEY)
ProcedureName VARCHAR(45)
ProcedureCost DOUBLE
ProcedureTax DOUBLE
TotalCost DOUBLE AS…

Tudor Ienesoi
- 23
- 3
1
vote
2 answers
Execute SQL script on deploy
i need to execute little sql script(insert some data) after deploying JavaEE/JPA(eclipseLink) project too glassFish - what do you thing would be the best way to do that. I know that hibernate has very clean way to do that unfortunately I'm using…

zawisza017
- 11
- 1
- 2
1
vote
0 answers
Python 3: Execute oracle SQL Script containing DDL with indexes and trigger
I have oracle sql script that has create table, index, trigger and grants in single file. I have been doing their execution through sqlplus user/pass@db and then @filepath.sql
how can I execute the sql script from python code, I'm ok if it invokes…

Ajeetkumar
- 1,271
- 7
- 16
- 34
1
vote
1 answer
Error with MySQL syntax in event sql-script. Delimeter already used
I have this script for update table monthly:
DELIMITER |
CREATE
EVENT `kpiparams_scheduled_update`
ON SCHEDULE
EVERY 1 MONTH
STARTS '2020-02-01 02:59:59'
ON COMPLETION PRESERVE
COMMENT 'KPIParams was updated by…

Mykola
- 118
- 1
- 14
1
vote
2 answers
Export data from Microsoft SQL Server using a query to target data
I know how to generate scripts to script insert lines allowing me to backup some data. I was wondering though if it was possible to write a query (using WHERE clause as an example) to target a very small subset of data in a very large table?
In the…

Arvo Bowen
- 4,524
- 6
- 51
- 109
1
vote
1 answer
Pass parameters to postgres sql script and provide default values if they are not provided
I have a postgres sql script that has a create table statement. Before that it tries to connect to database using \c dbname inside same script. I want to pass this dbname as parameter to this sql script. If no parameter is passed it needs to assign…

bigdata123
- 453
- 2
- 8
- 24
1
vote
2 answers
Why Running SQL script(.sql) from MySQL command line has no effects on database?
I'm trying to run an init.sql script(including database creation, procedure creation, table creation, data insertion) file like this:
mysql.exe -u root -p < init.sql.
But don't know why after invoking this line it will show…

IMAN4K
- 1,265
- 3
- 24
- 42
1
vote
1 answer
Oracle APEX - Download hidden SQL query into CSV
I am trying to create a button on a page in my application that will download the full table I am referencing as a CSV file. I cannot use interactive reports > actions > download CSV because the interactive reports have hidden columns. I need all…

Kevin Jackson
- 13
- 3
1
vote
4 answers
Sql script to correct data
I have the following data in a table:
Id | InventoryId | RevisionId
-----------------------------------
1001 | 1234 | 1
1002 | 2235 | 1
1003 | 2235 | 2
1004 | 2235 | 2
1005 | 2235 | 3
1006 | …

Ankit Vaidya
- 35
- 1
- 8