diff --git a/scripts/import-printstream.php b/scripts/import-printstream.php index 7392d48..e933af5 100644 --- a/scripts/import-printstream.php +++ b/scripts/import-printstream.php @@ -143,7 +143,7 @@ WHERE ISNULL(s.[COMPLETED],'') <> 'Y' // Notes query — fetches all MDP notes for a list of QuoteNo values in one round-trip. // PHP concatenates lines per QuoteNo. Token placeholder: __QUOTENOS__ $psNotesSqlBase = " -SELECT n.[RELATED TO] AS QuoteNo, ISNULL(n.[NOTE],'') AS NoteLine +SELECT n.[RELATED TO] AS QuoteNo, ISNULL(CAST(n.[NOTE] AS VARCHAR(4000)),'') AS NoteLine FROM dbo.NOTES AS n WHERE n.[MODULE] = 'MDP' AND n.[RELATED TO] IN (__QUOTENOS__)