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
2 answers
Conditional update on HANA Studio (SQLScript) trigger
I would like to write a trigger on HANA Studio using SQLScript to update COLUMN_E from TABLE2 when COLUMN_B from TABLE1 is updated to a specific value (let's say, 100).
Rows from table 1 are referenced in table 2 with the first column (ID).
I have…

Nicole
- 107
- 1
- 2
- 12
0
votes
0 answers
Issue Creating Several Scripts with Postgres
I am using postgres to create several INSERT scripts to insert data from one database to another.
The statement is giving me an error for invalid syntax for integer.
Here is the script I am trying to run
select 'INSERT INTO public."HoldingMasters"(
…

A. Hasemeyer
- 1,452
- 1
- 18
- 47
0
votes
0 answers
c# show warnings of a MySQLScript class
I'm learning to use MySqlScript Class, and I think that I already know how to execute MySQL Scritps from file and also know what statement has just executed (with StatementExecuted event).. but what about MySQL warnings? is there a way to display…

Jorge
- 17
- 4
0
votes
1 answer
Frequent saving database efficient with millions of entries?
I am trying to insert a ton of data into a SQL server database and my question is, how often i should save when millions of entries are going to be inserted there. Is it efficient to save it after e.g. 10.000 inserts or after 1.000.000 inserts? Are…

Julian Peil
- 105
- 10
0
votes
1 answer
How can I store the value of a subquery into a variable in Hana Studio?
I would like to know how can I store the value of subquery to use it in an operation after it recieve the value. For example:
Select IDTruck
, TruckPrice = (select "TruckPrice" from "Table1" where ("TruckID" = '123'))
, TruckUnit = (select…

Gustavo Alexander Carrillo Rue
- 133
- 1
- 8
0
votes
2 answers
How to set Flag based on days rage and order in SQL
Sample table (incident) have the following data,
+-----+-------------+------+----------+
| Ref | In_Date | Item | Customer |
+-----+-------------+------+----------+
| 1 | 5-Apr-2018 | DELL | ABC |
| 2 | 11-Apr-2018 | DELL | ABC …

Sam Bin Ham
- 429
- 7
- 23
0
votes
1 answer
How to copy table data from one SQL Server into another SQL server?
How can I copy data from one SQL server data into another. I am trying to copy a table data from server1 to server2. In server1.table1 the data from the table gets added/deleted for an example if I have 10 rows and five more rows gets added, after…

user9630935
- 349
- 1
- 4
- 18
0
votes
1 answer
How to sort datetime in a ascending order through Sql-script.
how can i sort the date time in a sql script. At first i am using the datetimeFormatter to get the date-time in a specific format. Later i am writing into a SQL table using a script. Below is my grovvy code.
def date = Finish / 1000; ////here…

user9630935
- 349
- 1
- 4
- 18
0
votes
2 answers
SQL Server Script Wizard
I am using SQL Server 2005. If I try to generate scripts for the dB using the Generate Scripts wizard in the management studio (Right click dB-> Tasks-> Generate Scripts)
I get no option like IF EXISTS DROP condition in the list. Whereas some of the…

user46795
- 2,643
- 3
- 25
- 31
0
votes
1 answer
break and return @temp_catid if(true)
i have a following sql function which takes a string word as input it then checks whether the word is equal to a categoryName or not i want it to behave like when the if statement is true it breaks from the loop and return @temp_catid else it…

Rafay
- 30,950
- 5
- 68
- 101
0
votes
1 answer
xp_cmdshell user is not listing newly created user "CustomUserX"
I am trying to execute a powershell script from within an AFTER UPDATE SQL TRIGGER. From a component perspective the UPDATE and powershell cmd appear to function properly. However, the TRIGGER script as a whole fails at the point of executing the…

Peter Santiago
- 17
- 3
0
votes
1 answer
how to use SQL Script in android?
there are many thing in android studio we don't know or don't use its features ,how to user this feature? sql script

Adil
- 812
- 1
- 9
- 29
0
votes
1 answer
SQL to filter by multiple criteria including containment in string list
so i have a table lets say call it "tbl.items" and there is a column "title" in "tbl.items" i want to loop through each row and for each "title" in "tbl.items" i want to do following:
the column has the datatype nvarchar(max) and contains a…

Rafay
- 30,950
- 5
- 68
- 101
0
votes
1 answer
Delay AFTER UPDATE execution until other updating processes are completed
Please forgive me, I am fairly new to the art of crafting SQL Server triggers.
I've crafted a SQL Server trigger that will execute a PowerShell script (to send a JSON message to entity X) after a particular table has been updated. The script ran…

Peter Santiago
- 17
- 3