jeudi 26 mai 2016

Query is giving error

Below is my query which is giving error as

A SELECT statement that assigns a value to a variable must not be combined with data-retrieval operations.

select @Total = count(*), 'Total' stage,doc_date Till_date
from  inward_doc_tracking_hdr    
where doc_date between convert(datetime,@From_date,103) and     convert(datetime,@To_date,103)  
group by doc_date

Aucun commentaire:

Enregistrer un commentaire