Saltar al contenido principal

SQL Year function not working for dynamic attachments in Print and Delivery

Comentarios

1 comentario

  • Alessandro Lopez Santinelli

    Hi Paul, try this:

    Select '\\b1_shr\attachements\picklists\'+SUBSTRING(CONVERT(varchar, docdate, 112), 1, 4)+'\'+CHOOSE(month(DocDate),'January','February','March','April','May','June','July','August','September','October','November','December')+'\P-'+cast(docnum as varchar)+'.pdf'from oinv where DocEntry=DocKey@

    regards

     

Iniciar sesión para dejar un comentario.