Questions tagged [sql]
The sql tag has no summary.
154 questions
0
votes
0
answers
49
views
Systemd service to keep a fixed number of the same script running
I have been developing a task based system recently for a PHP project, which consists of tasks stored in a SQL database (MariaDB) for a queue, and a task worker PHP script to go through the queue and ...
2
votes
1
answer
62
views
How to correctly handle apostrophes in Ansible templates for SQL statements?
I wrote an Ansible playbook to grab information from some YAML files and store it in a MariaDB database.
It uses this Jinja SQL template:
REPLACE INTO mytable(hostname,fqdn,owner, ...) VALUES
{% for ...
2
votes
2
answers
227
views
Get rid of \n in Ansible Jinja template
I have written an Ansible playbook to insert data into a MySQL database. It uses this Jinja2 template:
INSERT INTO mytable(hostname,foo,...)
{% if hostvars[h]['something'] is defined %} VALUES (`{{
...
-3
votes
1
answer
34
views
For 'a%' why is one of the results that could be returned 'z6ra'?
For 'a%' why is one of the results that could be returned 'z6ra'?
0
votes
2
answers
163
views
Load files in sequential order
I need to load multiple files in my shell script with the same filename but appended in the front of each file name is YYMMDDPERSONNEL
Examples: 231102PERSONNEL and 230103PERSONNEL
There are many ...
-1
votes
1
answer
94
views
Why no one thought of the concept of joins before the 70s? [closed]
So, let me see if I have my history right:
In 1976, the first system sold as an RDBMS was Multics Relational Data Store. I don't know if it had JOIN, but let's assume it did.
The UNIX command join ...
0
votes
0
answers
800
views
Unix : How to convert HTML output from Shell script
How to display the sql query output to HTML table format output.
am having shell script code to display output as html table format. and input is taken form sql query but am not getting the proper ...
0
votes
1
answer
72
views
Sqlite table creation
Is it possible to create tables based on a columns data?
I currently have a table named Exchange which contains numerous columns
ID:NAME:PRICE
1:Stick:12
2:Stone:20
3:Water:1
4:Water:1
But I want to ...
0
votes
2
answers
11k
views
How to write a shell script to run a sql query and send the query results in table format in email?
I need to run a SQL query using SHELL script in PUTTY and send the results in email body in table format with headers along with a message line on top.
I have written this so far but I am not able to ...
0
votes
1
answer
1k
views
Cannot install Microsoft SQL Server to Ubuntu AWS /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.30' not found
I am trying to install SQL server onto a Ubuntu machine on AWS and it has been nothing but trouble. I get stuck on the last step, configuring the server after selecting edition and setting an ...
0
votes
0
answers
178
views
filewatcher script in ksh script
I wanted to edit a already created filewatcher script with the given logic
the source file path is stage path (stage/filewatcherwrap.ksh)
there are 4 files in the below given format in stage path
...
0
votes
1
answer
166
views
why when I execute a select it works and when I execute an update the script blocks?
when I try to execute a query of type update the script hangs and the sql console stays still.
This command executes all queries in the script:
res=$(mysql --defaults-file=conf_file --skip-column-...
0
votes
2
answers
984
views
Slackware and postgres
I want to install postgres and psql via a Slackbuild and I did so. After installing it I tried running the command as suggested in the readme of the Slackbuild but I get an error upon running it as ...
-1
votes
2
answers
195
views
Running SQL databases offline
I'm running a Debian 10 based distro. As an experiment, I downloaded one of these Wikipedia-like sites which gives you a download size of several gigabytes. I was hoping to run it offline.
I don't ...
2
votes
2
answers
2k
views
How to store query multiple result in shell script variable(Array)?
I'm trying to do a query and store every row result in an array element in ksh (maybe bash).
I do:
result=($($PATH_UTI/querysh "
set heading off
set feedback off
SELECT columnA,columnb FROM user....