How to execute proc in select query?

  • How to make this select query execute?

    select xyz,(exec dbo.GetCount 2)as abc from A

    ......................................................

    dbo.GetCount is a storeproc which return a single value. I want to execute proc in a select query.

    Is it possible? If not then please suggest me some another option.

  • [font="Verdana"]Its not possible to execute proc inside DML statements. Instead you go for UDF.

    Mahesh[/font]

    MH-09-AM-8694

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply