cancel
Showing results for 
Search instead for 
Did you mean: 

Golden arrow does not appear in Alert Query

former_member232354
Participant
0 Kudos

We have a query at Query Manager, which is query 1, and when we use it, it appear us the golden arrow. But, when we use the query 2, it does not appear us the golden arrow,as you can see below.

Could you advice us, how can we solve this issue?

King Regards,

Alexandros Karadimitropoulos

query 1:SELECT * FROM OOPR

query 2: SELECT OOPR.OpprId ,T0.Descript ,N'Reminder' ,CAST(T1.OpenDate AS DATE) ,T1.Step_Id ,T4.UserID ,T4.U_Name FROM OOPR INNER JOIN OPR1 T1 ON T1.OpprId = OOPR.OpprId INNER JOIN OOST T0 ON T0.[Num] = T1.[Step_Id] INNER JOIN OHEM T3 ON T1.[Owner] = T3.empID INNER JOIN OUSR T4 ON T4.UserID = T3.UserID WHERE DATEDIFF(DAY,CONVERT(VARCHAR(10),T1.OpenDate,10),CONVERT(VARCHAR(10),GETDATE(),10)) >= '3' AND T1.Step_Id = '7' AND T4.UserID = '1' ORDER BY OOPR.[OpprId] FOR BROWSE

former_member185682
Active Contributor
0 Kudos

Hi Alexandros,

Try to put an alias in OOPR like T5.

Hope it helps.

Diego Lother

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member185682
Active Contributor

Hi Alexandros,

I ran an alert with this query:

SELECT 
	T0.OpprId,
	T2.Descript,
	N'Reminder',
	CAST(T1.OpenDate AS DATE),
	T1.Step_Id,
	T4.UserID,
	T4.U_Name 
FROM 
	OOPR T0 
	INNER JOIN OPR1 T1 ON T1.OpprId = T0.OpprId 
	INNER JOIN OOST T2 ON T2.Num = T1.Step_Id 
	INNER JOIN OHEM T3 ON T1.Owner = T3.empID 
	INNER JOIN OUSR T4 ON T4.UserID = T3.UserID 
WHERE 
	DATEDIFF(DAY, T1.OpenDate, GETDATE()) >= 3
	AND T1.Step_Id = 7
	AND T4.UserID = 1
ORDER BY T0.OpprId FOR BROWSE

In my test, I have changed step id to 1 in the where clause for return some values.

The result of my test was this. It worked fine.

I have tested on SAP 9.1 PL 12.

Hope the query above helps you.

Kind Regards,

Diego Lother

0 Kudos

Im a little late, but this is in Note 2556074

former_member232354
Participant
0 Kudos

Dear Diego Lother,

I used your advice and I changed my query as you can see below. But, after that, golden arrow does not appear.

Could you give us any other advices?

King Regards,

Alexandros Karadimitropoulos

query: SELECT T5.OpprId ,T0.Descript ,N'Reminder ,CAST(T1.OpenDate AS DATE) ,T1.Step_Id ,T4.UserID ,T4.U_Name FROM OOPR AS T5 INNER JOIN OPR1 T1 ON T1.OpprId = T5.OpprId INNER JOIN OOST T0 ON T0.[Num] = T1.[Step_Id] INNER JOIN OHEM T3 ON T1.[Owner] = T3.empID INNER JOIN OUSR T4 ON T4.UserID = T3.UserID WHERE DATEDIFF(DAY,CONVERT(VARCHAR(10),T1.OpenDate,10),CONVERT(VARCHAR(10),GETDATE(),10)) >= '3' AND T1.Step_Id = '7' AND T4.UserID = '1' ORDER BY T5.[OpprId] FOR BROWSE