troubleshooting Question

Select single row of data for each ID in Select Statement

Avatar of mburk1968
mburk1968Flag for United States of America asked on
SSRSMicrosoft SQL Server
7 Comments2 Solutions173 ViewsLast Modified:
I have a need to select a single row of data based on a date range from field UDF_Date_Data for each ID to use as a dataset in my SSRS report. So I need the following Columns. That being said the UDF_FIELD Stores the names of the columns I need "In Bold Below" so I get multiple rows as seen in my data set for an ID so for instance I need all of ID 7482 in one row

'SHPMH.shpm_ref' ,   'JoinFromHdrPKey' ,'FOB1VENDOR', 'FOB1DATE', 'FOB1AMT', 'FOB2VENDOR', 'FOB2DATE', 'FOB2AMT', 'MISC1VENDOR', 'MISC1DATE', 'MISC1AMT', 'MISC2VENDOR', 'MISC2DATE', 'MISC2AMT',  'DUTY1VENDOR', 'DUTY1DATE', 'DUTY1AMT', 'DUTY2VENDOR', 'DUTY2DATE', 'DUTY2AMT',  'INLAND1VENDOR', 'INLAND1DATE', 'INLAND1AMT',  'INLAND2VENDOR', 'INLAND2DATE', 'INLAND2AMT',  'OCN1VENDOR', 'OCN1DATE', 'OCN1AMT', 'OCN2VENDOR',  'OCN2DATE', 'OCN2AMT'
Sample-Data.xlsx
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros