Click here to Skip to main content
15,900,258 members
Home / Discussions / Database
   

Database

 
AnswerRe: SET XACT_ABORT ON Pin
Pete O'Hanlon16-Sep-10 8:07
mvePete O'Hanlon16-Sep-10 8:07 
GeneralRe: SET XACT_ABORT ON Pin
eraser95019-Sep-10 21:23
eraser95019-Sep-10 21:23 
QuestionProblem in restoring SQL Server MDF File database Pin
kirankkk200915-Sep-10 20:06
kirankkk200915-Sep-10 20:06 
AnswerRe: Problem in restoring SQL Server MDF File database Pin
Mycroft Holmes15-Sep-10 22:59
professionalMycroft Holmes15-Sep-10 22:59 
QuestionIs this unique ID generation procedure correct ? Pin
virang_2115-Sep-10 19:11
virang_2115-Sep-10 19:11 
AnswerRe: Is this unique ID generation procedure correct ? Pin
Mycroft Holmes15-Sep-10 19:55
professionalMycroft Holmes15-Sep-10 19:55 
AnswerRe: Is this unique ID generation procedure correct ? Pin
David Skelly15-Sep-10 22:52
David Skelly15-Sep-10 22:52 
QuestionT-SQL 2005 Inner join data from a view to the resultset of a stored procedure. Pin
Steven J Jowett13-Sep-10 5:54
Steven J Jowett13-Sep-10 5:54 
I have a stored procedure that pivots data so that I have a row containing an ID column and a number of other columns which are named by a Product Code.

For example the original table would look something like this :-
OrderId
ProductCode
Quantity


with data like so...
1000, ProdA, 100
1000, ProdB, 200
1001, Prodc, 50
1002, ProdB, 200


Thus my stored procedure would produce a result set of :-

OrderId, ProdA, ProdB, ProdC
----------------------------
1000,      100,   200,     0
1001,        0,     0,    50
1002,        0,   200,     0


So far so good.

Now, the problem is that I need to attach this to the result of a view which contains other related details.

I've researched on the internet, but all the examples I find assume I know the structure (field names) that the Stored Procedure will return. All I know for sure is that there will be an Id column of type BigInt (which is common to both the view results and the Stored Procedure results), and a varible number of columns, with names that change, that are of type Decimal.

Any pointers, gratefully received.
Steve Jowett
-------------------------
Real Programmers don't need comments -- the code is obvious.

AnswerRe: T-SQL 2005 Inner join data from a view to the resultset of a stored procedure. Pin
Stryder_113-Sep-10 8:00
Stryder_113-Sep-10 8:00 
AnswerRe: T-SQL 2005 Inner join data from a view to the resultset of a stored procedure. Pin
David Mujica13-Sep-10 8:06
David Mujica13-Sep-10 8:06 
GeneralRe: T-SQL 2005 Inner join data from a view to the resultset of a stored procedure. Pin
Steven J Jowett13-Sep-10 12:08
Steven J Jowett13-Sep-10 12:08 
AnswerRe: T-SQL 2005 Inner join data from a view to the resultset of a stored procedure. Pin
Mycroft Holmes13-Sep-10 12:34
professionalMycroft Holmes13-Sep-10 12:34 
AnswerRe: T-SQL 2005 Inner join data from a view to the resultset of a stored procedure. Pin
PIEBALDconsult13-Sep-10 17:01
mvePIEBALDconsult13-Sep-10 17:01 
QuestionDB architecture Pin
adilsardar13-Sep-10 2:46
adilsardar13-Sep-10 2:46 
AnswerRe: DB architecture Pin
R. Giskard Reventlov13-Sep-10 3:38
R. Giskard Reventlov13-Sep-10 3:38 
AnswerCentralized DB Pin
David Mujica13-Sep-10 4:13
David Mujica13-Sep-10 4:13 
GeneralRe: Centralized DB Pin
adilsardar14-Sep-10 0:03
adilsardar14-Sep-10 0:03 
AnswerRe: DB architecture Pin
Luc Pattyn13-Sep-10 4:32
sitebuilderLuc Pattyn13-Sep-10 4:32 
AnswerRe: DB architecture Pin
Eddy Vluggen13-Sep-10 10:11
professionalEddy Vluggen13-Sep-10 10:11 
GeneralRe: DB architecture Pin
adilsardar14-Sep-10 0:06
adilsardar14-Sep-10 0:06 
GeneralRe: DB architecture Pin
Eddy Vluggen14-Sep-10 7:36
professionalEddy Vluggen14-Sep-10 7:36 
AnswerRe: DB architecture Pin
PIEBALDconsult13-Sep-10 15:13
mvePIEBALDconsult13-Sep-10 15:13 
GeneralRe: DB architecture Pin
adilsardar14-Sep-10 0:07
adilsardar14-Sep-10 0:07 
AnswerRe: DB architecture Pin
Bernhard Hiller13-Sep-10 22:06
Bernhard Hiller13-Sep-10 22:06 
QuestionChanging CommandText changes Parameters Pin
Trevortni10-Sep-10 10:04
Trevortni10-Sep-10 10:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.