Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8526

Query with variables

$
0
0

I am using the syntax below in the query generator as part of a larger query.  It works fine, however, when the user prompt appears, both customer and vendors show up in the selection list.

 

/* SELECT FROM [WSB_LIVE].[dbo].[OCRD] T30 */ DECLARE @BPName AS nvarchar(20) /* WHERE */ SET @BPName = /* T30.CardName */ '[%0]'

 

I would like to limit the selection to customers only, so I modified the query above to the following but it did not change the selection list.

 

/* SELECT FROM [WSB_LIVE].[dbo].[OCRD] T30 */ DECLARE @BPName AS nvarchar(20) /* WHERE T30.CardType = 'C' */ SET @BPName = /* T30.CardName */ '[%0]'

 

Any suggestions?


Viewing all articles
Browse latest Browse all 8526

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>