开发者

Using System/User Variables as Parameters in an OLE DB Source Query

I have got a SQL command like th开发者_Python百科e following :

SELECT *
FROM temp1 a
inner join (SELECT ID from temp2 where ID = ?) b on a.ID = b.ID
WHERE a.ID = ?

I know the query has incorrect logic. But my question is How will I set Variables as parameters here in the place of "?". If I exclude the joined part, it will work.


Edit the OLE DB Source. On the Connections Manager tab, click the Parameters... button. The Parameters dialog will display the parameters in the sequence they appear in the SQL statement. The sequence is determined by reading the SQL statement from left-to-right, top-to-bottom.

To make an assignment to a parameter, select the variable from the Variables column.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜