Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

Returning multiple records when only one is specified Expand / Collapse
Author
Message
Posted Wednesday, February 5, 2014 6:53 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, September 19, 2014 7:01 AM
Points: 81, Visits: 101
I have no idea sorry
Post #1538165
Posted Wednesday, February 5, 2014 7:04 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:16 AM
Points: 6,866, Visits: 14,167
Can't you ask your boss?

The reason I'm asking is because - if (s)he isn't aware that your script can't be shaped into a view, (s)he probably isn't aware that such a result set can be difficult or impossible to consume.
Are you absolutely sure that the "variable" columns aren't meant to be concatenated into one for output? It would solve so many future problems for you.


“Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
Exploring Recursive CTEs by Example Dwain Camps
Post #1538172
Posted Wednesday, February 5, 2014 10:53 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, September 19, 2014 7:01 AM
Points: 81, Visits: 101
When he explained to me what he wants I did ask if i should have it in one column and he said no, im not sure even why he wants this.
Post #1538474
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse