TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Navaz
NA
96
44.7k
Sql
Dec 17 2014 6:47 AM
SELECT Sales_Master.Customer_Name,
ISNULL(Sales_Master.[Address],'') +','+ ISNULL(Sales_Master.[Address1],'')+','+ ISNULL(Sales_Master.[Address2],'') as 'Customer_Address',
Sales_Master.Customer_ID,
(SUM(Sales_Discount_Point_Details.Points_Earned)-Sum(Sales_Discount_Point_Details.Points_Deducted)) As Points,
[OB_Debit],
[OB_Credit]
FROM Sales_Master
INNER JOIN
Sales_Discount_Point_Details ON Sales_Master.Serial_No = Sales_Discount_Point_Details.Sales_Master_Id
INNER JOIN
Customer ON Customer.Customer_ID =Sales_Master.Customer_ID
Group by
Sales_Master.Customer_Name,
Sales_Master.[Address],
Sales_Master.[Address1],
Sales_Master.[Address2],
Sales_Master.Customer_ID,
[OB_Debit],
[OB_Credit]
End
how can i group by only customer Id
Reply
Answers (
3
)
Generate number
import export in different encoding