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.

634,734 questions
0votes
0answers
2views

'[HY004] [Microsoft][ODBC Driver 17 for SQL Server]Invalid SQL data type (0) (SQLBindParameter)' Issue

Like on title Im having this problem on this line. mycursor.execute("UPDATE slot SET plaka=?,girisTarih=?,girisSaat=?,musaitlik=?, WHERE slotAd=?",plaka1,girisTarih,girisSaat,musaitlik,...
0votes
1answer
4views

Athena query get the index of any element in a list

I need to access to the elements in a column whose type is list according to the other elements' locations in another list-like column. Say, my dataset is like: WITH dataset AS ( SELECT ARRAY ['...
0votes
0answers
7views

SQLite Closure Tabe: How to improve my SQL to split a tree

here is a classic tree paths table: CREATE TABLE treepaths( tpa_ance INTEGER NOT NULL, -- ancestor tpa_desc INTEGER NOT NULL, -- descendant tpa_leng INTEGER NOT NULL, -- lenght ...
-3votes
0answers
10views

Microsoft SQL Servermanagement Studio 18 error on startup

If i want to open MMS 18.12 i got this error message 1 I still reinstalled MMS or MS Shell 2015. Thank you.
0votes
1answer
10views

Create table with multiple timetable sequences when start and end dates are given (Oracle SQL)

I'm studying SQL and just started to use it for business. The client has a database with Oracle system. As a response a query, I have a table as follows, /* Defined as START_END_DATE_TABLE*/ Members ...
0votes
0answers
3views

Getting hql error for unexpected token- e

I'm trying to get count of user events, but Im getting "unexpected token: e" that's inside countAllEvents method. I'm getting it with and without "as" key word. Code: @Override ...
0votes
0answers
14views

How to insert a row if the value from other table doesn't exist?

I have three tables: person, lead and legal_entity. legal_entity.personId references person.Id and lead.personId also references person.Id. What I need to do is to insert a new row with the value of ...
1vote
0answers
13views

How to self join only a subset of rows in PostgreSQL?

I am using a self join to compare each value of a specific column with all the other values of the same column. My query looks something like this: SELECT DISTINCT A.name as child FROM people A, ...
  • 333
0votes
0answers
6views

Kafka JDBC Connector with Timestamp mode to fetch data from Oracle table

I am working on JDBC source connector with timestamp mode.I am fetching data from "X" table . The scenario is : If one row is updated with timestamp i need to take all the data where the ...
2votes
3answers
39views

How to keep NULL values in STRING_SPLIT

Please excuse formatting, this is my first post. I have a table like the one below: id code Fig 1 AAA [email protected]@2-2-3 2 AAB [email protected]@2-2A-2-4 3 AABA NULL 4 AAC [email protected] My code is ...
0votes
0answers
17views

Postgersql change the label for a query in case condition [duplicate]

I have a query like this SELECT "source"."User Profile__user_type", case when "User Profile__user_type" = 4 then cast("User Profile__user_type" as text)="...
0votes
0answers
10views

How to get value of FieldObject in Visual Studio Crystal Reports

I am loading a value from my SQL table as a FieldObject to the Crystal Report. Here in the picture I am trying to create a dynamic text that changes with the Field Object(there is no property). The ...
0votes
0answers
25views

Finding 90th percentile when data is in aggregated format in SQL

I have data in following format: Score Count of student 100 12 99 32 98 13 97 12 96 33 95 42 94 13 93 14 Basically score and a count of student scoring that much score. How do I find 90th ...
  • 2,403
0votes
0answers
10views

Replace NULL with Zeros MS ACCESS PIVOT

I'm trying to create a VBA routine to export some data from a MS Access Database table. The data is used by another system and, for this reason, needs to be in a specific format, similar to a PIVOT ...
0votes
0answers
10views

Snowflake parse_json on varchar column seeing error JSON: unknown keyword "None"

I've ingested into a table the following rows in varchar column breakdown : [{'platform': 'facebook', 'total': 20701, 'likes': 10106, 'shares': 3774, 'comments': 6168, 'tweets': None, 'favorites': ...

153050per page