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
How to get values between two dates from a table which have no data some days
i am getting a total from my table by grouping date. For example if you look at below picture when i try to get values between '08.03.2013' AND '22.03.2013'. There are no data for 18.03.2013 and 20.03.2013.
But i need that date because i use…

Talha
- 12,673
- 5
- 49
- 68
0
votes
1 answer
Creating a database through an sql script and then using that database
I have a script which uses an existing database to create tables and enter values. Now I wish to create the database through this same script and then create the tables and values which are just a copy of another database.
I have:
CREATE DATABASE…

zms6445
- 317
- 6
- 22
0
votes
1 answer
create .sql script with Visual Studio 2012 at c# and how run it?
I have a little problem about that. When i create a script with VS2012 ,it looks like that
(DataBase Name : LSProjeDB and have a table as Musteri) (created like that : go table > update>genarete script >wow)
GO SET ANSI_NULLS, ANSI_PADDING,…

Yasin Caner
- 131
- 1
- 5
- 16
0
votes
1 answer
sql script from base
in my project database model is changed periodically, but since database contains test data they have to re-enter each time.
script to insert data quickly becomes relevant. at the moment it is done manually. how this can be done using sql management…

Anton Zimm
- 420
- 4
- 14
0
votes
1 answer
SQL Server Script for deleting files from DB
I need to delete all rows of a table containing a bunch of files. Doing a simple DELETE FROM will more or less lock up the computer because of the sheer number of rows and size of files. I'm looking to create a SQL script that will accomplish this…

tnw
- 13,521
- 15
- 70
- 111
0
votes
1 answer
installshield projects runtime error
I've created a project in installshiel program uses SQL Server 2008 and written in C#.
Everything works fine and scripts of database also works fine but I had error when trying to install program which is created by installshield
error is
Error…

Scorpio
- 153
- 1
- 5
- 13
0
votes
1 answer
Common database scripts for all RDBMS
I am developing a tool that will run database scripts to create tables in different RDBMS' through simple JDBC connection.
Now my problem is for JDBC connection creation for different RDBMS I have to write different SQL scripts, scripts for Sybase…
-1
votes
1 answer
How to extract all the table names from a Python script
I have python script which has many SQL queries. I want to
spark.sql("Select a,b from schema.table1 UNION ALL Select a,b from schema.table2 ")
I need to extract all the table names referred in the script.
I need help on how to approach this?Can I…

kiruba
- 129
- 5
-1
votes
1 answer
for the below sqlplus query script, how to get DATE & TIME in DD-MMM-YY HH.MM.SS format for one column "evt_eventdate," only
for the below mysqlplus query script, how to get DATE & TIME in DD-MMM-YY HH.MM.SS format for one column "evt_eventdate," only
set echo off
SET SQLFORMAT CSV
SET FEEDBACK OFF
SET ERRORLOGGING ON
set encoding UTF-8
Spool…

mfaizy
- 13
- 3
-1
votes
2 answers
Sorting DESC results in "Invalid column name" error
I have a table MOVIE with a column Desc which stands for description.
I tried to sort by this column:
SELECT
* ,
ROW_NUMBER() OVER (ORDER BY [Desc] ASC) AS RowData
FROM
(SELECT
UID,
Title,
[Desc] AS '[Desc]'
…

henryloke
- 67
- 5
-1
votes
1 answer
Assign value to value of a variable in SQL
I have a variable called LV_MAIN which is having value as LV_TEMP and now I want to assign value to LV_TEMP and write select for LV_TEMP. How can I achieve this?
To explain in detail:
LV_MAIN := LV_TEMP
and now I want to assign:
LV_TEMP :=…

Saurav
- 48
- 6
-1
votes
1 answer
Execute .SQL file with VBA
I would like to know if there is any VBA code which allows me to execute .sql files by clicking a button in Excel?
I've been surfing different webs, but all of them showed code which consists into write the SQL query in the macro, despite it isn't…
-1
votes
1 answer
SQL Combining fields in one table
There is a script that displays two tables. Names of type String and counting of type Long.
How can I combine the same fields “Out of stock” in one field and separate fields “marriage”, “re-sorting” in one field “marriage / re-sorting” in one table.…

skydogs
- 11
- 1
- 4
-1
votes
3 answers
SQL - Check if an item was available in the previous month and then flag it
I'm trying to solve a problem in SQL but without much success so far. I have a table like this:
OWNER|STORE|DATE
A | MIX |01/01/2019
A | BIX |01/01/2019
A | BIX |02/01/2019
B | CIX |01/01/2019
B | CIX |02/01/2019
It's a table showing…

Renato
- 15
- 1
- 7
-1
votes
1 answer
How do I merge two procedures into one?
I am trying to merge two procedures into one. Is there any way?
I am using SQL script for this. I am using eclipse for this procedures.

bhavya shah
- 1
- 6