Click here to Skip to main content
16,013,605 members
Home / Discussions / Database
   

Database

 
QuestionRequire StoredProc Pin
yadlaprasad31-Dec-09 22:00
yadlaprasad31-Dec-09 22:00 
AnswerRe: Require StoredProc Pin
Blue_Boy31-Dec-09 22:16
Blue_Boy31-Dec-09 22:16 
AnswerRe: Require StoredProc Pin
yadlaprasad31-Dec-09 22:20
yadlaprasad31-Dec-09 22:20 
GeneralRe: Require StoredProc Pin
Blue_Boy31-Dec-09 22:33
Blue_Boy31-Dec-09 22:33 
AnswerRe: Require StoredProc Pin
Niladri_Biswas3-Jan-10 15:27
Niladri_Biswas3-Jan-10 15:27 
QuestionLooking for field name standards documents Pin
Ray Cassick31-Dec-09 21:54
Ray Cassick31-Dec-09 21:54 
AnswerRe: Looking for field name standards documents Pin
Eddy Vluggen2-Jan-10 7:27
professionalEddy Vluggen2-Jan-10 7:27 
QuestionUsing Stored Procedures as a field (SQL Server 2008) Pin
willempipi31-Dec-09 0:34
willempipi31-Dec-09 0:34 
Hi,

I have made a stored procedure witch returns a field that i want to use in a query. There is 1 parameter that I give to the stored procedure witch comes from the normal query. The info about the stored procedure:

Name: SP_Calculate
Input: ID
Output: table with 1 column: Amount and 0 or 1 row.

And this is what I want to do in the query:

SELECT 
db1.dbo.table1.ID as ID, 
db1.dbo.table1.Field1 as Field1, 
db2.dbo.table2.Field2 as Field2, 
( SELECT Amount FROM db1.dbo.SP_Calculate(db1.dbo.table1.ID) ) As Amount

FROM db1.dbo.table1

INNER JOIN db2.dbo.table2
ON db1.dbo.table1.ID = db2.dbo.table2.ID


Of course this code doesn't work, but i hope it gives you a good view of what I try to do. This query is a example query, the actual query is really long.
AnswerRe: Using Stored Procedures as a field (SQL Server 2008) Pin
Corporal Agarn31-Dec-09 0:59
professionalCorporal Agarn31-Dec-09 0:59 
GeneralRe: Using Stored Procedures as a field (SQL Server 2008) Pin
willempipi31-Dec-09 1:30
willempipi31-Dec-09 1:30 
GeneralRe: Using Stored Procedures as a field (SQL Server 2008) Pin
Corporal Agarn31-Dec-09 2:27
professionalCorporal Agarn31-Dec-09 2:27 
AnswerRe: Using Stored Procedures as a field (SQL Server 2008) Pin
willempipi31-Dec-09 2:17
willempipi31-Dec-09 2:17 
GeneralRe: Using Stored Procedures as a field (SQL Server 2008) Pin
Corporal Agarn31-Dec-09 2:29
professionalCorporal Agarn31-Dec-09 2:29 
QuestionSQL Server Simultaneous Update with WHERE EXISTS Pin
c0der200930-Dec-09 22:14
c0der200930-Dec-09 22:14 
AnswerRe: SQL Server Simultaneous Update with WHERE EXISTS Pin
c0der200930-Dec-09 23:51
c0der200930-Dec-09 23:51 
QuestionConnection string loaded from config file Pin
Nigel Mackay30-Dec-09 18:44
Nigel Mackay30-Dec-09 18:44 
AnswerRe: Connection string loaded from config file Pin
Eddy Vluggen31-Dec-09 4:59
professionalEddy Vluggen31-Dec-09 4:59 
GeneralRe: Connection string loaded from config file Pin
Nigel Mackay31-Dec-09 19:32
Nigel Mackay31-Dec-09 19:32 
QuestionSQL Server 2005 Express edition Registration. Pin
TinyDevices30-Dec-09 1:41
professionalTinyDevices30-Dec-09 1:41 
AnswerRe: SQL Server 2005 Express edition Registration. Pin
Andy_L_J30-Dec-09 3:23
Andy_L_J30-Dec-09 3:23 
GeneralRe: SQL Server 2005 Express edition Registration. Pin
TinyDevices30-Dec-09 19:32
professionalTinyDevices30-Dec-09 19:32 
AnswerRe: SQL Server 2005 Express edition Registration. Pin
Eddy Vluggen30-Dec-09 6:04
professionalEddy Vluggen30-Dec-09 6:04 
GeneralRe: SQL Server 2005 Express edition Registration. Pin
TinyDevices30-Dec-09 19:34
professionalTinyDevices30-Dec-09 19:34 
QuestionRe: SQL Server 2005 Express edition Registration. Pin
Eddy Vluggen31-Dec-09 5:02
professionalEddy Vluggen31-Dec-09 5:02 
QuestionC# SQL express Login Pin
kadaen29-Dec-09 22:56
kadaen29-Dec-09 22:56 

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.