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
0
votes
1 answer
Import sql script in Android app
I have a mySQL script, with my database, I would like import this DB to my android app using that script, when I executed this code It works (I don´t have any exception or error) but when I try to get information from DB It doesn´t work.
private…

Ruben Manzano
- 39
- 3
- 12
0
votes
1 answer
SQL or procedure to conditionally insert or update in Oracle database
I don't have much of a hands-on in SQL and procedures. I need a migration script wherein I need to update or insert a table based on data in other two tables.
Organization: id name pid 1 org1 null 2
org2 null 3
org3 1 4
…

Xavier DSouza
- 2,861
- 7
- 29
- 40
0
votes
1 answer
Command prompt - throgh a lot of statements - running each one separately
I have a folder with 55 .sql files, SQL scripts.
Each file consists of 10000 insert statements. I'm using this command to run each file:
C:\sqlcmd -S . -d Minuf_Customers_July -i C:\ACL\MyScript3.sql
And I need to do it for MyScript1 , MyScript2..…

Jordan1200
- 478
- 1
- 5
- 20
0
votes
1 answer
how to force user to enter value for substitution variable?
I have script which is SQLPLUS form.
I ask user to enter values for substitution variables to execute insert statement.
some substitution variables are used for mandatory columns, so
how can I ask the user to fill again if substitution variable…

Dev X
- 353
- 2
- 15
0
votes
3 answers
How to use two cursors and display them PL/SQL
I have a problem and a can't find a solution to it. I started working with PL/SQL in the past week, which means that my abilities are very limited.
Anyways, I had a working script that formatted a table to be export to another:
select
…

RochaRF
- 37
- 10
0
votes
1 answer
Spooling to dynamic location using SQL Developer (SQLcl)
I apologize for possible duplicate, but I just cannot seem to get this working. I have an .sql file where I am trying to pass a parameter like "C:\Path\To" to adjust the location of spooling output, since I would like to run it from a Windows…

katolsster
- 3
- 4
0
votes
1 answer
Continuous integration - Database changes
I'm learning Jenkins and liquibase. I am integrating it into a java project made with maven.
In my particular case, once a version of the application is released to the client, the application is delivered with the SQL script to update the database.…

user60108
- 3,270
- 2
- 27
- 43
0
votes
1 answer
Using SSDT is it possible to have only selective scripts/objects maintained rather than maintaining the whole database?
Is it possible for me to have a database project to maintain "only" a selective list of DB-objects or scripts rather than importing the entire/whole database?
I am tasked with writing an integration between some 3 - 4 third party applications.…

blogs4t
- 2,329
- 5
- 20
- 33
0
votes
0 answers
How to use SSDT to maintain "changes only" for a subset of a database and not a "whole" database?
Off late, I am searching the internet for a custom solution to automate SQL server database changes deployment. Can I use SSDT to just maintain changes to the database rather than creating a database project and import the entire database.?
I have…

blogs4t
- 2,329
- 5
- 20
- 33
0
votes
1 answer
Examples or Tools for SQL server database deployment automation
Off late I am searching the internet for an automated solution for SQL server database deployments primarily to avoid manual steps of maintaining and deploying sql scripts for deployments.
My situation is peculiar. It does not require me to…

blogs4t
- 2,329
- 5
- 20
- 33
0
votes
3 answers
True or False Indicator when matching two tables
I need some assistance, I need to pull data from my DB, now I have a FD_Documents table and FD_Revision tables.
I need to match the GUID from both tables and also need to be a revision greater than 2, once the match has been made it must add a new…

user3309798
- 107
- 8
0
votes
1 answer
Generating SQL server script can get Create and alter statements for the same table
HI I am generating schema script for a database, but when i finish creating it and and look at the script it gives create table statement for a table but not including all column in it also it generates alter table add column statement for the same…

Muhammad Jawad
- 122
- 13
0
votes
0 answers
Skip Holidays in Business day Table
I am using the following script to determine what the business days are for each particular month.
DECLARE @startdate DATETIME
SET @startdate ='20170401'
;
WITH bd AS(
SELECT
DATEADD(DAY,
CASE
(DATEPART(WEEKDAY, DATEADD(MONTH, DATEDIFF(MONTH, 0,…

Nakia Downer
- 27
- 3
0
votes
1 answer
How to correct these syntax errors in a SQL script generated by PowerDesigner in SQL Server?
Msg 156 Level 15 State 1
Incorrect syntax near the keyword 'if'
Msg 156 Level 15 State 1
Incorrect syntax near the keyword 'then'
Msg 156 Level 15 State 1
Incorrect syntax near the keyword 'delete'
Msg 156 Level 15 State 1
Incorrect…

Sona Legends
- 27
- 1
- 7
0
votes
1 answer
Anyone know a good freeware sql script generator?
I have found this one:
http://www.sqlscriptgenerator.com/
Which is actually decent enough but it puts all the scripts in one massive sql script file with no option to generate one script per object.
Is there something that will allow me to generate…

One Monkey
- 713
- 3
- 9
- 24