Category "sql"

Snowflake error in RStudio which limits the size of rows to fetch - Error: nanodbc/nanodbc.cpp:2695: HY000

I have an issue where I kind of know what it is but do not know the solution to it. When I fetch data from an external Snowflake DB, it limits the size of the d

AEM JCR SQL2 query to find all pages contains specific component

I wish to build a sql2 jcr query to find all pages under /content that contains this component, e.g /apps/platform/aem-core/components/content/form/form I read

SQL data, selecting and searching in the same table

id1 id2 v1 v2 v3 P1 I1 A B C P1 I2 D E F P2 I1 A B D P3 I1 A D E P2 I2 B D E How can I get from the table above to following: First, I need all entries with a

Is there a faster way of using NOT LIKE for a long list of search terms instead of {AND "Column" NOT LIKE '%word1%'} etc, in an SQL Query?

So I'm trying to exclude a bunch of different entries with specific words from my query and I was wondering if there was a more efficient/faster way of doing th

Dynamic SQL Query in C#

I'm trying to create a query with a variable number of parameters, giving to the program the name of the table and an Array for the names of parameters and anot

SQL guest house - finding an empty room on a given date

I'm attempting to learn SQL and currently doing the guest house questions found on sqlzoo. I'm stuck on Question 13 and can't seem to figure it out how to fix i

SQL How To Display Month Difference Between Return And Purchase Date

I need help with writing the query that will say month difference between return and purchase dates, see the example below. Product PurchaseDate (dd/mm/yy) Ret

SQLite3 database is Locked in Azure

I have a Flask server Running on Azure provided by Azure App services with sqlite3 as a database. I am unable to update sqlite3 as it is showing that database i

How do I use the same parameter multiple times in my Query using JPA?

How do I use a parameter multiple times in the same query? Here is my Query: @Query(value = """ SELECT * FROM person WHERE first_name = ? or last_name =

Hibernate createNativeQuery returns duplicate rows

I have 2 database tables Customer and Items with 1 -> many relation. To fetch data from database i am using the following query. select customer.id, cust

Using Distinct in Aggregate Select query

I am using oracle DB. I have a Aggregated script. We found that some of the rows in the table are repeated, unwanted and hence, is not supposed to be added in

How to Check Which Record is non-numeric in a String Column in Delta Table

I am working on Delta table using Databricks on Azure. The Delta table contains about 100 million records with many columns. One column data type of which is S

How to get distinct value and specific count from a query

Suppose I have the following table "Person": id name friends 1 matt jim 1 matt ray 1 matt ray 2 tim fry 3 sally jack 3 sally tim 4 matt harold I want to outpu

EF Core one-one relationships

I need to configure following one-one relationship with ef-core public class Player { public long Id { get; set; } public string Name { get; set; }

OTBI analytic to function value is not null in any one of the columns for a particular employee

My OTBI(Oracle Transactional Bi report) report have the following columns - Person number Date_to Person Name comp Specialization

particular column has multiple data separated with comma, how to write a query to return that particular row if it has at least one data

For example col1 col2 1 2,3,4 Referring to the table shown here, if I want to return a row if col1=1 and col2 has 2,3. How to write query for this scenario? B

JPA Specification predicate for querying latest/newest/most recent records

I'm trying to convert the below query into a JPA specification in order to enable more flexible querying of my Rule entities, but i don't find any way of transl

How to check if SQLAlwaysON is existing in server using powershell without a SQL DBA Admin access?

I want to check if SQLAlwaysON exists in server. I already know that typing and getting the powershell commands Enable-SQLServerAlwaysON and Disabled-SQLServerA

Snowflake. How to check if the sub-array is presented in another array?

I want to check if all the items from one array are presented in another array. I've been looking through Snowflake docs but can't find any good approach. For e

How to calculate frequency percentages for a table using SQL?

Let's say I have some data as follows: ID data fingers rating 001 hello y 0 002 hello n 0 003 bye n 0 004 hell