Questions tagged [sql]
Structured Query Language (SQL) is a declarative query language for relational databases. Consider also using the tag for the specific database software if your question involves vendor extensions or language quirks.
573 questions
0
votes
0
answers
18
views
Tool (preferably online) to parse then transform INSERT INTO to an html table [closed]
INSERT INTO queries are difficult for humans to read and parse, especially those with many columns.
I'm looking for a tool (preferably online) that would make this analysis easier.
The idea would be:
...
0
votes
0
answers
12
views
MYSQL GROUP_CONCAT filled with NUll for fixed lenght
Can MYSQL GROUP_CONCAT filled with NUll for max lenght?
FOR EXAMPLE
Arch Lisa Maria
Anna NULL NULL
Explanation
Arch Lisa Maria are three rows for group 1
Anna has one for group 2
So fill group by ...
0
votes
0
answers
23
views
What is wrong with the function
CREATE FUNCTION MAX(v1 integer, v2 integer)
RETURNS integer AS $$
BEGIN
IF (v1>v2) THEN
RETURN v1;
ELSE
RETURN v2;
END IF;
END;
$$ LANGUAGE plpgsql;
Error message:
ERROR: syntax error at ...
0
votes
0
answers
21
views
In BigQuery, why did it accept this one syntax over the other one?
So, I created a table within a dataset in BigQuery Studio of movie data which includes release dates, movie titles, Wikipedia website links, etc. and I uploaded the table as a .csv file and the column ...
1
vote
0
answers
68
views
sqlcmd how to find current port number on server
I'm trying to find TCP port which sql server uses to test one Jira connector, did my homework but that tcp: option doesn't work trying everything. In my example 1432 is actual port I got from DBAs
...
0
votes
1
answer
141
views
Azure SQL Server - Is ApplicationIntent=ReadOnly always honored?
I am using Azure SQL database instance (Business Critical, Read Scale-out enabled) and I would like to offload some of the traffic to Read-Only replicas.
Does adding ApplicationIntent=ReadOnly to ...
0
votes
0
answers
86
views
I can't start the MSSQLSERVER on new esxi host
I am a student currently studying virtualization and SQL. After obtaining approval from my instructor, I attempted to transfer a virtual machine (VM) to my personal laptop.
However, upon doing so, I ...
0
votes
0
answers
70
views
Retrieving specific text data from all files present in a folder
I've some SQL queries (DBT) in a folder. I've to run the dbt sql files and validate them. Before running, I've to clone the sources used in the queries. I'm going through each file and making note of ...
1
vote
1
answer
107
views
MySQL: Converting Row to Columns Based on Field Values
I am using MySQL Workbench 8.0.
I will break my question into two parts as I believe the first part will be straightforward (but is slightly beyond my current SQL knowledge level) but the second part ...
13
votes
2
answers
4k
views
How to find which senders use the most space in my Gmail account?
How could I sort email senders (distinct "from" addresses) by the total amount of space each sender's cumulative messages (including bodies and attachments) are occupying in my Gmail account?...
2
votes
1
answer
197
views
Could interrupting a SQL query that was taking too long lead to a decrease in disk space?
For a personal data analysis project, I was trying to find the most frequent 3 products that were being sold together by doing a self join (twice).
As the query was taking over 15 mins and the laptop ...
0
votes
0
answers
89
views
Power Query SQL bring in cell contents for the where statement
I am trying to build a flexible sql where statement so that my power query can pull the exact data the user specifies. I have an excel worksheet with about 18 cells that the user populates. I use ...
4
votes
1
answer
13k
views
How to solve The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
I am trying to install SQL server on Linux using Ubuntu from this link: https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-ver16&tabs=ubuntu2204
And, in ...
0
votes
1
answer
21
views
How to replay recent Influx queries
I want to load test Influx, how do I replay the recent queries that were executed? I have not found anything meaningful on Google.
1
vote
0
answers
48
views
Is SQL a good way to optimise data access to just one huge table?
TLDR; Is SQL the way to go when trying to access one huge data table?
As title. In astronomy we often must deal with huge data files. Usually, we can manage to do it using different optimisation ...
-1
votes
1
answer
4k
views
How to resolve SQL error 772
Using the preloaded ODBC driver version 10.00.22621.1992 on Windows 11 and added the data source in System DSN. When it tries to test the connection I get this error (picture below).
SqlState:01000
...
0
votes
1
answer
216
views
Deleted SQL folder in Program files, now program needing SQL wont launch, or reinstall
I got a little click happy and deleted the SQL folder out of Program files not think if it's connection to a design application I am using. I have tried uninstalling SQL Server 2019 by using the ...
0
votes
0
answers
268
views
OneDrive variable in Oracle SQL Developer
We are storing SQL scripts in a shared Onedrive.
Since colleagues have personal and a shared OneDrive I want to use the %OneDriveCommercial% variable.
This one works fine (I run this in Oracle SQL ...
2
votes
1
answer
670
views
Microsoft SQL Server 2014 Standard Edition - Minimum Setup
We have a corporate license for Microsoft SQL Server 2014 Standard Edition and for time to time I have to install (or re-install it) on different Servers and computers. The setup folder size is about ...
0
votes
2
answers
321
views
How to properly and efficiently query Lots of data from SQL Server putting it into specific cells?
Recently I was asked to make a real-time project in Excel which evolves huge amount of data.
I have this data stored in SQL Tables and managed to successfully bring it into Excel.
SQL Table on Excel:
...
0
votes
2
answers
492
views
Create a double entry accounting table by separating transactions
I have an Excel table with accounting transactions that are stored on a single line:
Date
To Account
From Account
Amount
Type
2023-06-01
2192
2281
$100.00
Transfer
I'm attempting to convert that ...
0
votes
0
answers
2k
views
"Error encountered during SQL installation"
During my internship at a company that utilizes Sage software, I faced challenges while attempting to install Microsoft SQL Server, which is required for Sage. I encountered multiple errors during the ...
4
votes
0
answers
5k
views
Can't install ODBC Driver 17 for SQL server On Windows 11
i want install SSMS 19.1
this is stuck like picture
the problem for "microsoft ODBC Driver 17 for SQL Server" cant install
i download it manually and try install it but this error appear
0
votes
0
answers
330
views
Snowflake Execute button not appearing in VS Studio
Apologize if this is a silly question. I use VS studio to connect to snowflake. And all of a sudden when I'm coding, no execute button appears to click. Sometimes I can get it to appear but then it's ...
1
vote
0
answers
152
views
influxDB v1.8 : InfluxQL : Continous Query in a bash script
I wrote a bash script for inserting the summary of the daily energy database "xxx_d" into the monthly database "xxx_m" - triggered on every 1st day of the month at 02 o'clock by a ...
0
votes
1
answer
354
views
Installed SQL Express on IaaS VM in Azure, SQL Virtual Machine resource appeared in resource group?
I installed SQL Express on a Windows Server VM in Azure, a few days later a new resource appeared in the RG with the same resource name of the VM but as a SQL Virtual Machine.
I take it this won't ...
0
votes
0
answers
401
views
MariaDB (mysql like) How to get the index value of a selected row in a sql table? This the unique index, not a row count
Say you have a table... Index is primary key...
Index Sensor
1 BME280
2 BMP280
And want to return the Index value only of a matching select query?
SELECT * FROM Sensor WHERE Sensor = 'BME280'...
0
votes
1
answer
36
views
Is there a way to run a SQL on excel to create another table on the same spreadsheet?
I have a spreadsheet on Microsoft Excel with a formmated table similar to the attached picture. It is a long table (1000 lines or more) with ~30 columns and I would like to know if there is an easy ...
1
vote
0
answers
406
views
Is it possible to connect a SQL file in VS Code to a .mdb database in MS Access?
Is it possible to connect the .mdb database file open in Microsoft Access with a .sql file that you edit in Visual Studio Code?
I want to be able to create seperate queries in a .sql file that I edit ...
3
votes
2
answers
2k
views
How to flush Firefox storage SQLite database files to eliminate large SQLITE-WAL files?
I've noticed that the WAL (Write Ahead Log) files (*.sqlite-wal) associated with the SQLite databases (*.sqlite) used by the Firefox web browser often get quite large. They literally can get over 150 ...
1
vote
1
answer
953
views
How to test in VSCode a postgreSQL SQL expression in Python's interactive notebook (= Jupyter Notebook, iPython) in a venv with package manager conda?
How to test in VSCode a postgreSQL SQL expression in Python's interactive notebook (= Jupyter Notebook, iPython) in a venv with package manager conda?
-1
votes
3
answers
8k
views
running into permission issues when using the COPY command with postgresql 14.6-1 on linux 6.0.12-arch1-1
Hello everyone :) noob here,
trying to learn sql with postgresql 14.6-1 on arch linux kernel: 6.0.12-arch1-1 ,
the current topic of the book i'm reading, has me doing this command
COPY char_data_types ...
2
votes
1
answer
3k
views
MariaDB: Should I configure the db-server using "/etc/my.cnf" or a file in "/etc/my.cnf.d"?
I am trying to configure MariaDB on a machine with Fedora 37: Workstation as its operating system.
I expected to use /etc/my.cnf to configure the ports and such, however, the file contained an include ...
0
votes
0
answers
176
views
How to uninstall PostgreSql user on Mac Monterey
I already deleted pgadmin 4 and the PostgreSQL apps and I don't know why the PostgreSQL user profile is listed on my task bar. I checked the official "System Preferences", and I don't see ...
1
vote
1
answer
1k
views
SQL Can connect by server name but not by instance name
I just install SQL 2017 in two servers with default options. I also have configured the cluster role in both servers and activated the Allways On option.
Testing the enviroment before beging creating ...
0
votes
1
answer
191
views
Joining MySQL table
in my database there are 2 tables : posts, room
Posts tables include ID and Title columns and includes many rooms and hotels titles and IDs.
In the room table there are 3 columns : room_id, hotel_id ...
1
vote
1
answer
2k
views
How to find a character in a string using Powershell?
Using Contains to find a value using PowerShell is not working.
Full Story:
I have to get the PartNo, Ver, and Rev values from an SQL DB, and check if these values occur in the first line of the text ...
1
vote
1
answer
272
views
Search the contents of a SQL file without extracting it from an archive
I have a 128GB .sql file that's located in a .7z archive.
For reasons of storage space, I can't extract the file.
Is there any way to search for a specific line within that .sql file, without ...
0
votes
2
answers
62
views
ORA-00979 Group by clause error
I am trying to execute a SQL command
select distinct T1.dbid,T1.id,T6.user_name,T6.action_name,T6.action_timestamp,T2.filename from promotion T1,history T6,attachments T2 where T1.dbid = T6....
0
votes
0
answers
475
views
Text to Column has now changed my Excel's pasting preferences permanently
I recently used the text to columns functionality in excel. It was used to split out one singular column that was delimited by commas. After I successfully made the adjustment, my excel now will not ...
1
vote
1
answer
886
views
"Advanced Copy" greyed out in DBeaver menu when trying to copy SQL table output as TXT
I often copy some sample rows and the frame in DBeaver as text for a quick markdown chat note.
Now the "advanced copy" is greyed out.
How can I get it back?
0
votes
1
answer
83
views
Excel 365 - Dynamically importing data into excel from a Database
I have a spreadsheet with 40k rows or so which is added onto every week. Each row has an Employee ID, Employee’s Shift Number and Hours worked column (see attached image for sample data). Sample data
...
2
votes
1
answer
6k
views
DBeaver "Format" --> "Format SQL" --> "To Upper Case" applies to all words. How to format only the SQL command words reserved by the system?
When I right-click on a selected SQL query and choose "Format SQL" it changes the SQL to lower case.
The other command "To upper case" is not SQL-intelligent, meaning it changes ...
0
votes
1
answer
377
views
Microsoft SQL server management studio 18 commandline replacement
I have created an SQL file for my SQL server. When I double-click on that, Microsoft SQL server Management Studio 18 is opened, username and password are asked, the query is opened and I can launch it....
0
votes
1
answer
130
views
Why is the excel date cell-format, date and time is so low
Does anyone have a workaround for formatting datetimes copied from sql into excel?
When I copy a date field into excel from sql, it looks like the following 43299.7088541667, I then want to format it ...
0
votes
1
answer
454
views
Is it possible to exclude a line of code from a Visual Studio 2019 code analysis warning (sr0014)?
I am using Visual Studio 2019 and Azure SQL Database Instance.
I have a lot of stored procedures that follow the same pattern. A warning is raised on the build for each stored procedure where data ...
0
votes
0
answers
895
views
SQLCMD Error 0xc000007b
The Environment:
Windows Server 2019 Standard
SQL Server 2019 Standard
SQL CMDLINE Utitlies V15 for x64
ODBC Driver 17 for x64
The Problem:
I am trying to run the sqlcmd command in Powershell and ...
0
votes
3
answers
117
views
How to pull up data written between seperators?
I am a digital marketer with zero experience at coding.
I'd like to pull up only the first data which is written between separators (|||)
[VP/NNP] ||| talk here ||| walk here ||| PPDB2.0Score=6.03040 ...
0
votes
0
answers
28
views
Getting the result of this SQL query in Excel
I have a table containing the columns for employee name, date, and how late they are that date
I want to fill a cell with the content of the column 'Late By' using the criteria 'Employee Name' and '...
0
votes
1
answer
66
views
How to report on least values in each category in MS Access?
IN MS Access, I have a table with a few different parameters, like this:
Element
Weight (g)
Smallest Dimension (cm)
Orange
100
5
Apple
90
4
Banana
130
2
Grape
40
1
These are grouped into sets, ...