In response to the previous post - cast nText to varchar mid-query.
select pvt. as slideContent
, pvt. as link
, pvt. as startDate
, pvt. as endDate
, pvt. as setPriority
, convert(varchar(8000),content) as myContent
join moodle.dbo.mdl_data_records on mdl_data_content.recordid = mdl_data_records.id
where dataid = 12 and approved = 1) as ps
for fieldid in
(, , ,,)
NOTES: DataID and pvt[x] needs to be updated to correct values for live table, but otherwise this query is exactly what is required to extract the full dataset.
Additional development required - limit the returned data to display ONLY those records where startDate < Now < End Date