9,247 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
40
views
GraphQl Query - Not Equal condition
Trying to figure out the opposite of '=' in this example query from this page:
https://www.ibm.com/docs/en/filenet-p8-platform/5.6.0?topic=development-search-api-considerations
{
documents(
...
1
vote
1
answer
56
views
Filtering Out Null Keys in JSON Output Using Apache AGE Cypher Query with json_object_agg
Is there a way to filter out null keys for my json? This is using Apache AGE extension:
SELECT json_object_agg(k, v)
FROM cypher('hermech', $$
MATCH (a:contact_name)
WHERE id(a) = ...
0
votes
1
answer
97
views
DB2 (i Series) how to write SELECT query on bit data using hex string value
I'm trying to troubleshoot some C# .NET code that interacts with a DB2 database on iSeries/AS400. These tables have several fields that are type CHAR() FOR BIT DATA which are populated as a hex byte ...
1
vote
1
answer
107
views
Force Python-SQLite3 to report non-existing columns in WHERE clause
This is my code:
import sqlite3
conn = sqlite3.connect(':memory:')
cursor = conn.cursor()
cursor.execute('''
CREATE TABLE schools (
county TEXT,
statustype TEXT
)
''')
cursor.execute('''
...
0
votes
2
answers
115
views
Where clause evaluation choose original if blank [closed]
select [itemcode], [uom], [price], [branch]
from [testTable]
where [uom] <> 'SQ' AND [branch] = '90001'
If I have a query like this, is it possible to have [uom] <> 'SQ' ignored if the ...
0
votes
2
answers
82
views
SQL filtering with lateral join on key and path
I am querying a database from a table of product IDs and location codes, stored in the nested format below. I'm trying to write a query to filter for only products that exist in the location South3. ...
-1
votes
1
answer
59
views
transform pyspark a single row of input condition values into multiple rows of individual conditions
I have a PySpark DataFrame that contains a single row but multiple columns (in context of sql where clause). It just like column start_date with value >date("2025年01月01日") then new column ...
0
votes
0
answers
64
views
How to filter out rows that is less than 5 decimal places on 4 float 64 columns?
I am trying to clean a dataset for a case study, here is a problem that I have encountered:
I am trying filter out rows that is less than 5 decimal places (leaving .12345 or .12346 etc.) while ...
0
votes
1
answer
79
views
Filtering by month name after EXTRACT(MONTH) – best practice or mistake?
I’m writing a query to calculate the total monthly sales per employee and display only the data for April. I’m using PostgreSQL, and while the logic seems fine to me, the output isn’t working as ...
1
vote
1
answer
58
views
Unusual use of subquery in WHERE? [closed]
I pretty much understand
SELECT xxx WHERE yyy in (SELECT ...)
But I am baffled by
SELECT xxx WHERE (SELECT ...) IN (SELECT ...)
How can you use a SELECT in the WHERE part of that expression?
0
votes
1
answer
228
views
Use AND and OR within where clause for dates
I need to filter a collection of records that satisfies a single date OR satisfies a range of dates. How is this done in conjunction? For example, I need to filter records that has the date 02-FEB-24 ...
0
votes
0
answers
73
views
Does SQLPackage support extract with per table filtering?
I am working on automatically cloning part SQL Server database content.
With SQLPackage extract and publish commands, I can clone the whole database or a subset of its tables.
Now, I want to filter ...
3
votes
1
answer
110
views
How do I DELETE with WHERE and IN using a composite primary key?
My table:
create table x(
name text,
group integer,
primary key(name, group)
)
I want to delete from it by primary key:
delete from x where primary key in (["a", 1], ["a", 2]...
1
vote
2
answers
69
views
SQL - WHERE - variable dynamic filter
I'm trying to write a WHERE clause that will filter data differently for respective entities, based on time frames that are unique to each entity, like so:
import pandas as pd
product_dates = [
...
0
votes
3
answers
115
views
Error trying to filter dates from text column
I am trying to use the isdate() function to retrieve rows from sComment column (defined as nvarchar(max)). However, I keep getting an error
string or binary data would be truncated
I tried using the ...