Click here to Skip to main content
16,004,944 members
Home / Discussions / Database
   

Database

 
GeneralRe: slow updating Pin
Blue_Boy4-Apr-08 8:01
Blue_Boy4-Apr-08 8:01 
GeneralRe: slow updating Pin
Xmen Real 4-Apr-08 14:51
professional Xmen Real 4-Apr-08 14:51 
QuestionCalling Web Service From SQL Stored Procedures Pin
Adewale3-Apr-08 5:25
Adewale3-Apr-08 5:25 
GeneralRe: Calling Web Service From SQL Stored Procedures Pin
pmarfleet3-Apr-08 9:38
pmarfleet3-Apr-08 9:38 
QuestionPassing IN clause to SP via Parameter Pin
stuebbie3-Apr-08 3:53
stuebbie3-Apr-08 3:53 
GeneralRe: Passing IN clause to SP via Parameter Pin
Mark J. Miller3-Apr-08 4:13
Mark J. Miller3-Apr-08 4:13 
AnswerRe: Passing IN clause to SP via Parameter Pin
stuebbie3-Apr-08 21:57
stuebbie3-Apr-08 21:57 
GeneralRe: Passing IN clause to SP via Parameter Pin
SimulationofSai3-Apr-08 13:04
SimulationofSai3-Apr-08 13:04 
The simplest thing would be to convert the whole thing to dynamic sql and use sp_executesql.

declare @sql nvarchar(500)<br />
set @sql = '<br />
SELECT<br />
a.ID AS 'refNumber',<br />
c.Description AS 'Area',<br />
d.Description AS 'Region'<br />
from<br />
tPty_Property a<br />
INNER JOIN tLkp_PropertyGuideDistrict c<br />
ON a.lkpPropertyGuideDistrictID = c.ID<br />
INNER JOIN tLkp_PropertyGuideSection d<br />
ON a.lkpPropertyGuideSectionID = d.ID<br />
WHERE <br />
a.ID IN (' + @refNumber + ')<br />
ORDER BY<br />
a.ID'<br />
<br />
exec sp_executesql @sql<br />


Having said that, implementing Mark Millers method would be the ideal thing to do.

SG
Cause is effect concealed. Effect is cause revealed.

QuestionHow to register custom control Pin
lav naphade3-Apr-08 2:13
lav naphade3-Apr-08 2:13 
AnswerRe: How to register custom control Pin
pmarfleet3-Apr-08 9:34
pmarfleet3-Apr-08 9:34 
GeneralRegarding SQL Query Pin
sandhya143-Apr-08 1:28
sandhya143-Apr-08 1:28 
GeneralRe: Regarding SQL Query Pin
Rob Philpott3-Apr-08 2:37
Rob Philpott3-Apr-08 2:37 
QuestionWhat is the diffrence between CTE(Common Table Expression) and Derived table Pin
Krishnraj3-Apr-08 0:27
Krishnraj3-Apr-08 0:27 
GeneralRe: What is the diffrence between CTE(Common Table Expression) and Derived table Pin
Mark J. Miller3-Apr-08 4:50
Mark J. Miller3-Apr-08 4:50 
Generalselect distinct, but only on one column Pin
phimix2-Apr-08 21:50
phimix2-Apr-08 21:50 
GeneralRe: select distinct, but only on one column Pin
Rob Philpott2-Apr-08 22:27
Rob Philpott2-Apr-08 22:27 
GeneralRe: select distinct, but only on one column Pin
phimix2-Apr-08 23:12
phimix2-Apr-08 23:12 
QuestionHow grant ALTER on all tables to an user? Pin
blackjack21502-Apr-08 21:11
blackjack21502-Apr-08 21:11 
AnswerRe: How grant ALTER on all tables to an user? Pin
Mark J. Miller3-Apr-08 4:47
Mark J. Miller3-Apr-08 4:47 
GeneralRe: How grant ALTER on all tables to an user? Pin
blackjack21503-Apr-08 10:03
blackjack21503-Apr-08 10:03 
GeneralRetrieve the second biggest amount from a table Pin
Daniel_Logan2-Apr-08 21:03
Daniel_Logan2-Apr-08 21:03 
GeneralRe: Retrieve the second biggest amount from a table Pin
blackjack21502-Apr-08 21:16
blackjack21502-Apr-08 21:16 
GeneralRe: Retrieve the second biggest amount from a table Pin
Daniel_Logan2-Apr-08 21:24
Daniel_Logan2-Apr-08 21:24 
GeneralRe: Retrieve the second biggest amount from a table Pin
Rob Philpott2-Apr-08 22:33
Rob Philpott2-Apr-08 22:33 
GeneralRe: Retrieve the second biggest amount from a table Pin
Daniel_Logan2-Apr-08 23:13
Daniel_Logan2-Apr-08 23:13 

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.