Skip to Content
Apr 01, 2014 at 11:50 AM

Results table difference when running query from Alert compared to Query Manager



I have following query - Aim is to create alert to tell employee which customers to make visit to in next 4 weeks

SELECT DISTINCT T1.CardName, T1.U_VisitDue, T1.U_VisitReason, T1.U_Priority, T1.U_Region as 'Area', T1.U_VNotes


WHERE DateDiff(d,T1.U_VisitDue, GETDATE()) <29

Group BY T1.CardName, T1.U_VNotes, T1.U_VisitDue, T1.U_VisitReason, T1.U_Priority, T1.U_Region


My problem is that when I run query through alert the field U_VNotes is displayed differently.

Running the query from Query Manager the contents of this field appear in one field of the result table.

Running the query via Alery the content of this field is split into several fields in results table according to 'new line' in field entry.

This makes the results table from the Query less 'user-friendly' because if you want to sort the table by 'Date' column for example it makes a mess of the table because of the extra rows.

I want results table to look like top version in picture below ... but i want to run from alert.

Is this possible?

How can I achieve it?

Thanks for any assistance

Regards, Karen


visits query.jpg (162.5 kB)