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.
578
questions
0
votes
0
answers
3
views
Why is installation of MySQL on my mac is always halted
I've been trying to install MySQL on my mac and an issue kept happening. I downloaded macOS 14 (x86, 64-bit), DMG Archive. Everything seemed fine until the final step. It says "the software was ...
0
votes
0
answers
9
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 ...
0
votes
0
answers
37
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 ...
0
votes
0
answers
7
views
Snowflake sql apply function once per partition [migrated]
In Snowflake, we can perform a window function like this:
array_agg(a) over (partition by b) as c
Since my partitions are large (big data), and my f is expensive, I need to make f(c) evaluate only ...
1
vote
0
answers
10
views
Snowflake won't allow an analytic function to be renamed [migrated]
In the code below, I can do the LAG and PARTITION BY with no problem as a query. But I need it as a table. If I do CTAS, I need an alias on the column. But when I try to put an alias on it, it fails....
10
votes
2
answers
1k
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
172
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
70
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 ...
1
vote
1
answer
3k
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
6
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
votes
1
answer
244
views
Attuinity connectors SSIS package migrate to SSIS 2022
I have 2015 SSIS solution with attuinity oracle connectors, I am unable to open the package in VS 2022 since it does not support attuinity any more, I get Object reference not set to instance of the ...
1
vote
0
answers
39
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 ...
0
votes
0
answers
34
views
SQL Server Connection to Excel Workbook
Upon re-opening my excel workbook, the SQL Server connection and associated queries are not saved and unable to be refreshed. How do I resolve this issue? I am accessing the DB via a remote connection ...
-1
votes
1
answer
2k
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
0
answers
80
views
How do I navigate with the dBeaver suggestion blocks?
I always use the shortcut for selects (ctrl+shift+space) but then I need to click to edit thing like the where clause. Is there a keyboard shortcut for me to go from the table block to the column ...
0
votes
1
answer
91
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
147
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
336
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
204
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
231
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
1k
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 ...
0
votes
0
answers
197
views
MSSQL Server working on RH9 or Centos9
Has anybody running mssql-server on RH9 or Centos9?
I got this Error when trying to setup:
Red Hat Enterprise Linux 9.2 (Plow)
Capturing core dump and information to /var/opt/mssql/log...
Hint: You ...
3
votes
0
answers
3k
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
47
views
Query for Employees with Laptops Only
I'm using a MySQL database and trying to figure a query upon 2 tables:
Employee table where the status needs to be active
Asset table where the status needs to also be active
The asset table ...
0
votes
0
answers
28
views
Is it possible to step through an SSRS Expression?
I have a very complicated IIF statement. Is there a way to step through that expression to see where it goes into either the true or false paths through report builder or another tool?
0
votes
0
answers
156
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 ...
0
votes
0
answers
79
views
Paste formatted SQL queries from text file into Excel (one Excel row for each query)
I have a .TXT text file that has formatted SQL queries in it.
--The corresponding Excel row ID is: 2
select
main.active_transportation.objectid,
main.active_transportation.type,
main....
1
vote
0
answers
118
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
208
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
247
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
30
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
239
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
1k
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
704
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
5k
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 ...
1
vote
1
answer
2k
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
136
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
971
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
171
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
211
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
55
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
392
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
647
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
53
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
4k
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
271
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
111
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
319
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
737
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 ...