on 10-14-2021 6:11 AM
I have developed a query which accepts parameter while executing. I have used this syntax,
SeriesName ='[%1]'
In the above query , all the names of series are loaded. I want to load the series name as per my requirement. I don't want entire list. Is there any way to load customized list of parameters ?
I tried this code ,
/* select * from NNM1 x */
DECLARE @SeriesName AS NVARCHAR(100)
/* WHERE x.SeriesName like 'RND%'*/
SET @SeriesName = /* x.SeriesName */ '[%0]'
select @SeriesName FOR BROWSE
How do I specify where condition ? I am getting list of all series. I want series whose name starts with RND'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can't do it this way. Theoretically you would do this:
/* select * from NNM1 x where x.SeriesName like'RND%' */
DECLARE @SeriesName AS NVARCHAR(100)
SET @SeriesName = /* x.SeriesName */ '[%0]'
However, B1 simply ignores the WHERE clause. The method I suggested is currently the only possibly viable one.
Regards,
Johan
Hi,
Currently this might be possible with a somewhat complicated workaround, that I have not tested:
/* select * from [@YOUR_UDT] x */
DECLARE @SeriesName AS NVARCHAR(100)
SET @SeriesName = /* x.U_SeriesName */ '[%0]'
SELECT *
FROM SomeTable
WHERE SeriesName = @SeriesName
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.