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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
18 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 ...
user avatar
  • 1
1 vote
1 answer
49 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 ...
user avatar
  • 13
1 vote
1 answer
23 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 ...
user avatar
  • 113
0 votes
2 answers
19 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....
user avatar
0 votes
0 answers
15 views

mariadb find overlapping date ranges

I have a mariadb table of approximately 12M rows. Fields within each row contain a timestamp for the start time and end time for a process. The timestamps are actually seconds since the Linux epoch. ...
user avatar
  • 401
0 votes
0 answers
19 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 ...
user avatar
0 votes
0 answers
18 views

Is total MySQL memory usage scaled by innodb_buffer_pool_instances?

I seem to remember reading somewhere that: Total InnoDB pool usage = innodb_buffer_pool_size * innodb_buffer_pool_instances but I can't find the original reference. Is this true? or true for certain ...
user avatar
  • 317
0 votes
1 answer
39 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?
user avatar
0 votes
0 answers
120 views

Cannot install PostgreSQL 14 because it failed to start database server

I try to install the PostgreSQL 14 in my windows 10 laptop. But it shows the "Problem Running post-install step" when the cluster initialization start. The eror message image What I have ...
user avatar
0 votes
0 answers
10 views

SQL developer error

hope y'all doing great. So, I'm trying to set up my SQL Developer, but I'm having some issues. First, when I try to connect it, I have this error: First problem. I tried to solve it, then I found ...
user avatar
0 votes
1 answer
31 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 ...
user avatar
0 votes
1 answer
136 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 ...
user avatar
0 votes
0 answers
24 views

Is there a way to let a SQL formatter change only a selection within a file in Visual Studio Code / vscode / Codium?

In VIM, you can do this: setup your config so that you can choose just a selection to be reformatted in SQL. See Is there a way to let sqlformat or another SQL formatter change only a selection within ...
user avatar
0 votes
0 answers
10 views

Is there a way to make "sqlformat" reformat only a selection within a file?

I want to reformat a SQL string that is embedded in another language. How can I let "sqlformat" run only on a selection? Example: def test(): query = """ SELECT 1 from ...
user avatar
0 votes
1 answer
18 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....
user avatar
  • 1,462
0 votes
1 answer
52 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 ...
user avatar
  • 1
0 votes
1 answer
41 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 ...
user avatar
  • 111
0 votes
0 answers
139 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 ...
user avatar
  • 395
0 votes
0 answers
14 views

How to work SQL query rule set from a database table?

I'm running Postgres, and have to deal with some quite long rule sets to do data quality checks. At the moment, these are in my query the usual way like this: case when (var1 = 0) then '1' when (...
user avatar
0 votes
3 answers
101 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 ...
user avatar
  • 1
0 votes
0 answers
19 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 '...
user avatar
0 votes
0 answers
33 views

phpmyadmin monitor metrics are not showing the real usage

I have a Laravel's web app that is taking too long to retrieve a set of results from a sql database query. It has to do some complex queries on a very large tables with a lot of rows and joins. On the ...
user avatar
  • 101
0 votes
0 answers
36 views

How we can hide sql Database , that one domain user don't have any permission on this database

In my SQL server, there is more than 10 database. I want to restrict one domain user to one database. ie I want to assign one user to one database and he can view only his database. Can you give ...
user avatar
0 votes
0 answers
17 views

Join SQL query filtered by Excel 365 table column

I have a short list of typically 50 unique rows from one heavy MSSQL query to table Master, with a key field of part_number In sheet2 I would like to join the part_number's from another SQL query ...
user avatar
0 votes
1 answer
43 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, ...
user avatar
  • 285
0 votes
0 answers
25 views

Oracle "between" not recognizing the full string

I have a oracle sql query to get me the dates from 18/05/2021 to '28/05/2021'. For some reason the the value after slash is not read, as the values from month 4 is also outputed. I dont know where i ...
user avatar
0 votes
0 answers
59 views

MYSQL error reading communication packets

I get 2021-06-03 11:04:07 5559 [Warning] Aborted connection 5559 to db: 'mydbname' user: 'mydbusername' host: 'localhost' (Got an error reading communication packets) every 10 minutes in mysql log ...
user avatar
  • 1
1 vote
1 answer
21 views

Combine one set of time series data with another when some dates are missing in one data set

I have a LibreOffice Calc spreadsheet which contains two sets of time series data e.g. |Date-A |A | | | |Date-B |B | |2020-01-01|101| | | |2020-01-01|201| |2020-01-02|102| | | |2020-01-02|202| ...
user avatar
  • 1,860
0 votes
0 answers
19 views

How is the solution to solve the syntax of this select with update query and inner join tables?

I could not understand the problem that is occurring in this update syntax: UPDATE OPN SET OPN.points = (case when OPN.nivel_id=70 then ...
user avatar
0 votes
0 answers
12 views

Impact of scaling Azure SQL elastic pool on existing connections

I have an Azure SQL SQL elastic pool configured for a few hundred databases with shared compute and storage resources. Every day, we initiate a scale process where we upgrade the compute power of the ...
user avatar
0 votes
0 answers
730 views

Unable to install MS SQL Server or SSMS due to missing DLL, how do I find and install this DLL?

I have the exact issue as the OP of this question but their fix did not work for me: Related Stack Overflow Question I need to install MS SQL Server and SQL Server Management Studio on my computer. No ...
user avatar
0 votes
1 answer
5k views

selecting from SQL with LEFT JOIN and multiple conditions

I am trying to fetch posts with multiple filters, my database is as below, "Meta" Table id meta_key meta_value object_name object_id 2 location new city post 2 1 post_type section post 2 ...
user avatar
2 votes
1 answer
180 views

How to put a comment in a SQL query of JSON items from Azure Cosmos DB?

For an existing Azure Cosmos DB, I am testing SQL queries following this guidance. I would like to insert comments in my query, but the following fails, SELECT * FROM c /* Example comment */ While ...
user avatar
  • 1,753
0 votes
1 answer
406 views

bash - passing an sql query as an argument to psql

I have the following SQL query that executes correctly in the psql shell: SELECT c.component_name AS "Component", c.component_version_name AS "Component Version", c....
user avatar
1 vote
2 answers
71 views

Select statement using 'EXISTS' and 'IN' operator

I hit an issue to get data using 'IN' operator from another database. I need help fixing this please. My query looks like this: SELECT i.EXTERNAL_CODE, tc.SITE_NAME, tr.TRANSACTION_DT FROM ...
user avatar
  • 571
0 votes
1 answer
59 views

How can I create a custom view in outlook that searches shows emails in all folders that have been unresponded to in the past 3 hours?

I currently have the following SQL line in the view filter to search for unresponded emails but need the remaining two pieces, can someone help? Unresponded emails: http://schemas.microsoft.com/mapi/...
user avatar
0 votes
1 answer
50 views

MS Access 2019 - questions about editing and running SQL queries

In the past I've worked with SQL Server and PostgreSQL, using SQL to run queries. At the moment I'm trying to get more familiar with MS Access, and I run into some problems. I prefer to write queries ...
user avatar
  • 6,680
1 vote
2 answers
104 views

Notepad++ split line at variable characters preceding symbol

I am looking to split one line of data into a line for each state regarding a senate nomination vote. I have truncated all fifty states' data into two states' worth for the purposes of this question. ...
user avatar
0 votes
1 answer
906 views

Solve Error without installing PostgreSQL on Mac? dyld: Library not loaded: libpq.5.dylib

I am using a Mac OS X software called TablePlus which throws an error when trying to perform a backup of a PostgreSQL 13 database that is running inside a Docker container. dyld: Library not loaded: ...
user avatar
  • 325
0 votes
1 answer
27 views

mysql report multiple values on same line

I have a bunch of temperature sensors in my house. I poll the sensors every minute and store the data in a mysql database that looks like this: +------------+--------------+------+-----+---------+----...
user avatar
  • 361
2 votes
1 answer
725 views

Turn .sql file into a table

I have an sql file (from the following link). I need to get the table which is supposedly encoded in that file. I have no SQL experience and tried several things that have been suggested elsewhere: I ...
user avatar
  • 29
0 votes
1 answer
108 views

From Powershell, Open Multiple SQL files in a single SSMS Instance

I have an automated Powershell process that ends with an Invoke-Item command to open multiple SQL files (currently 4 SQL files) for the testers, so they can run their scripts. Keep in mind, I am not ...
user avatar
  • 409
0 votes
1 answer
48 views

MS Access how to show records where in Field is "XYZ"

I Have a Query to show me records. I want it to show me all records when in a Field (let's name it Letters), is "XYZ". The thing is some entries start with XYZ, in some it's somewhere in the ...
user avatar
  • 3
2 votes
0 answers
364 views

Can not connect to SQL DB: Lost connection to MySQL server at 'handshake: reading inital communication packet', system error: 0uery

I am trying to connect with HeidiSQL to the SQL DB which is running on the remote server to which I connect through the VPN. I am receiving an error message: Lost connection to MySQL server at '...
user avatar
  • 205
0 votes
1 answer
48 views

Understanding versioning with MySQL and MariaDB?

I'm trying to understand the relationship between MySQL versions and MariaDB versions and hoping someone can clarify? I was under the impression that MariaDB was forked from MySQL many years ago and, ...
user avatar
0 votes
1 answer
157 views

How can I make SQL Server 2017 retry to start if startup fails?

We have a SQL Server that is used internally for testing. We shut down the server every night to save on Azure costs. Sometimes it fails to startup due to the paths it uses not being available like ...
user avatar
  • 469
0 votes
1 answer
135 views

Virus / malware stored inside database

I have a small network of several Windows 10 machines (all protected by BitDefender 2020 Total Security), one of which acts as server with Firebird database. For some time the database is ...
user avatar
0 votes
1 answer
73 views

On an VDI that allows multiple users to connect at a time, how can I configure SQL to run with a different port for each user?

I am trying to launch an application named Aura, which uses SQL as its database engine, in a VDI that allows multiple users to connect at the same time. When the program is first launch, it works fine,...
user avatar
1 vote
1 answer
30 views

How can I delete multply rows from a table with another condition?

I have a table like this: 1 Apple 1 2 Apple null 3 Apple 2 4 Orange 1 5 Orange 2 6 Pear null 7 Lemon 1 8 Lemon null I want to delete a row if it's ProductId is ...
user avatar
1 vote
1 answer
850 views

Microsoft Access: Query to delete duplicate data but keep most recent

To my surprise, I've been having trouble finding an answer to this question for my specific case. I have a table with ID and date and I would like to keep only one ID, and that is the most recent one. ...
user avatar

1
2 3 4 5
12