Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

avoid duplicate in one to many relationship join in sql

SELECT columnlist, 
rn = ROW_NUMBER() OVER (PARTITION BY sales.salesID ORDER BY payment.paymentID)
FROM sales JOIN payments ON sales.salesID=payments.salesID
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #avoid #duplicate #relationship #join #sql
ADD COMMENT
Topic
Name
3+6 =