Try this please. I checked it and it’s working:
SELECT *
FROM Table
WHERE ARIDNR IN (
SELECT ARIDNR
FROM Table
GROUP BY ARIDNR
HAVING COUNT(distinct LIEFNR) > 1
)
More Related Contents:
- SQL Selecting from three tables
- How to cast the DateTime to Time
- Inner join vs Where
- Computed / calculated / virtual / derived columns in PostgreSQL
- Generate a resultset of incrementing dates in TSQL
- Find a string by searching all tables in SQL Server
- Xcode 4 and Core Data: How to enable SQL Debugging
- Database Design for Revisions?
- How to use parameters “@” in an SQL command in VB
- JPQL IN clause: Java-Arrays (or Lists, Sets…)?
- Finding similar strings with PostgreSQL quickly
- Why use a JOIN clause versus a WHERE condition?
- Window Functions or Common Table Expressions: count previous rows within range
- sql varchar(max) vs varchar(fix)
- Optimize groupwise maximum query
- Huge performance difference when using GROUP BY vs DISTINCT
- Use email address as primary key?
- Convert Date format into DD/MMM/YYYY format in SQL Server
- Get execution time of PostgreSQL query
- SQL Script to alter ALL Foreign Keys to add ON DELETE CASCADE
- How to combine results of two queries into a single dataset
- SQL Server 2005 and temporary table scope
- psql invalid command \N while restore sql
- How to select a record and update it, with a single queryset in Django?
- Select SQL Server database size
- SQL INSERT INTO from multiple tables
- How to Execute SQL Query without Displaying results
- Retrieve Oracle last inserted IDENTITY
- RegEx to Detect SQL Injection
- PostgreSQL – dynamic value as table name [duplicate]