Skip to content

Sqlserver procedure cursor can't parse #14

Open
@csxuyang

Description

@csxuyang
        Declare MyCusror Cursor Scroll

              For Select * From Master_Goods Order By GoodsID

        Open MyCursor

        Fetch next From MyCursor
        Into @GoodsCode,@GoodsName

        While(@@Fetch_Status = 0)
              Begin

                     Begin
                           insert into B select  @GoodsCode,@GoodsName
                     End

                     Fetch next From MyCursor
                     Into @GoodsCode,@GoodsName

              End
        Close MyCursor
        Deallocate MyCursor

cursor can't parse . @goodscode,@GoodsName parse as a constant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions