How is SQL Prompt helping your team? Share your experience.

Variable is declared but never used - Issue


The following SQL gives Issue code: MI005 for @date.

declare @date date = getdate()
declare @xml xml = '<root/>'
set @xml.modify('insert attribute testDate {sql:variable("@date")} into (root)[1]');
select @xml

Is this a bug or am I missing something?

Version -



Best Answer

  • DustinMDustinM Posts: 66 Bronze 1

    Hi Dave,

    Thank you for your patience with us regarding this issue.

    Our development team has now reviewed the bug you have identified and highlighted it to us alongside our current workload and available resources. Unfortunately, on this occasion, this is not something they are able to provide a fix for.

    We do appreciate the effort our customers go to working with us to better our products, so please continue to highlight anything you find that needs our attention.




Sign In or Register to comment.