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
Martin James
NA
100
15.5k
UNPIVOT with NULL values
Mar 31 2021 2:51 PM
I have the following query :
SELECT
Custid, Shipperid, Freight
FROM
Sales.FreightTotals
UNPIVOT( Freight
FOR
Shipperid
IN
([1],[2],[3]) )
AS
U;
I have the following result :
custid shipperid freight
1 1 98
1 3 55
2 2 75
This is my expected output :
custid shipperid freight
1 1 98
1 2 NULL
1 3 55
2 1 NULL
2 2 75
2 3 NULL
Reply
Answers (
1
)
How to get spare no from categories 1 table where not exist per same s
There is already an object named 'items' in the database.