on 03-07-2024 8:45 AM
Hi All,
I am working on SAP B1 10 , SQL 2017
When I execute this Query :
DECLARE @M1 AS varchar(10)
SET @M1 = '20240301'
Exec [dbo].[GIP_SIT_J] @M1
SELECT * FROM [dbo].[@GIP_SIT_J]
It runs OK ; But when I try to use parameters Like this :
--SELECT * FROM OIGE T0 WHERE T0.[DocDate] = [%cs1]
DECLARE @M1 AS varchar(10)
SET @M1 = [%cs1]
Exec [dbo].[GIP_SIT_J] @M1
SELECT * FROM [dbo].[@GIP_SIT_J]
I get Error : Must Specify Table to Select From .....
Thanks for helping to solve this issue.
Hi,
I recommend that you change the parameter data type in the [dbo].[GIP_SIT_J] stored procedure to DATETIME first. Then please give this a try:
/* select * from OIGE x */
DECLARE @M1 AS DATETIME
SET @M1 = /* x.DocDate */ [%cs1]
Exec [dbo].[GIP_SIT_J] @M1
SELECT * FROM [dbo].[@GIP_SIT_J]
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 |
---|---|
82 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.