365体育足球滚球比分

Questions tagged [sql]

Structured Query Language (SQL) is a language for querying databases. Questions should include code examples, table structure, sample data, and a tag for the DBMS implementation (e.g. MySQL, PostgreSQL, Oracle, MS SQL Server, IBM DB2, etc.) being used. If your question relates solely to a specific DBMS (uses specific extensions/features), use that DBMS's tag instead. Answers to questions tagged with SQL should use ISO/IEC standard SQL.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

counting Tasks/Users - easier/more efficient way?

Im working on a simple Task Scheduler, the code is working, but im not satisfied with it, especially with the count-function. It counts the Task of every User, so new Tasks can get distributed ...
0
votes
0answers
11 views

Designing a hierarchical database in same table (Postgresql)

Below is the flow of database im planning to design: Table: Branch Column: ID{SERIAL, PRIMARY KEY}, Parent_id Row Examples: 1, {NULL} 2, 1 3, 1 4, 2 5, 4 Parent_id = null <= Headquarter Using PK ...
0
votes
0answers
11 views

How to reproduce the bahavior of SQL NVARCHAR in Python when generating a SHA-512 hash?

I have the following SQL query SELECT CONVERT(VARCHAR(254), HASHBYTES('SHA2_512', CONVERT(NVARCHAR(24), '2020-05-27 00:00:00.000', 127)), 2) that generates the hash value ...
0
votes
0answers
7 views

SQL PDO Wrong syntax near “@P1”

I try to use LIMIT with PDO SQL. My code is this: $sql = "SELECT * FROM TblWerte LIMIT :limit1"; $result = $db->prepare($sql); $result->bindParam(':limit1', $limit1); $limit1 = 15; $result->...
0
votes
0answers
5 views

SQL DB connection trough Citrix Receiver doesn't work

I recently created a Master image for my VDI environment on Citrix? One application of the apps delivered for de desktop VDI users, uses a sql connection to a SQL server, but fails. I think the citrix ...
-1
votes
2answers
18 views

What is the SQL Statement to delete all entries of an ID after a certain activity occurs?

I am struggling with the Vertica SQL Statement to delete all entries of an OrderID after a certain event had occurred. This is a representation of my data. **OrderID Activity** 1 ...
0
votes
2answers
24 views

mutidimensional “WHERE IN” condition?

As is well-known, we can simplify SELECT * FROM A WHERE X=1 OR X=4 OR X=9 as follows: SELECT * FROM A WHERE X IN (1,4,9) Is there a similar shortcut possible for "multidimensional" conditions as ...
0
votes
0answers
24 views

HIVE - INSERT into table using WITH CLAUSE

with cte AS ( SELECT cust_id, COUNT(cust_id) OVER (PARTITION BY cust_id) cnt,named_struct('id', concat(cast(split(acct_id,'_')[0] as string),"_",acct_type),'name', cast(acct_name as string)) as ...
0
votes
1answer
14 views

Return array of deleted elemems postgresql JDBC

This is my database: dragons id, key, name, age, creation_date users id, name, user, pass users_dragons user_id, dragon_id So this is my code for deleting dragons from the database that have a ...
0
votes
1answer
17 views

Maximo search completed order yesterday SQL where clause

I'm trying to create a "dynamic" query to run a scheduled report every morning. I have a client that wish to have a report sent every morning where he gets information about closed tickets yesterday. ...
0
votes
2answers
23 views

Get the min of one column but select multiple columns

I have a table as following: ID NAME AMOUNT ______________________ 1 A 3 1 B 4 2 C 18 4 I 2 4 P 9 And I want the ...
1
vote
1answer
37 views

How to update “row number” column values 1..N after rows are DELETED?

I have this table: When I make a delete of a box in this table, I need to make an increment of all the following rows. For example: if I delete BoxNo '4' then the rows which are after the last row ...
0
votes
1answer
10 views

How to fix runtime error '3048' “Cannot open any more databases.”

I have a form with a button that calls and filters a couple of union queries with about 40 SELECT queries total in between them. It then displays the data in a report. Each SELECT query in the Union ...
0
votes
0answers
9 views

Select query from view in Unidata

I want to perform the below SQL in Unidata Select tab.col1, tab.col2 from (select col1, col2 from table1) tab; Please help me for Unidata database
0
votes
0answers
6 views

How to read file in chunks from database with Dapper in dot net standard app

I have created a dot net standard app for central place for storing files. I've managed to upload file in chunks cuz basically I leave the client to send the chunks and just append them as a stream in ...

15 30 50 per page
1
2 3 4 5
36268