2PTTechnology

The platform that enables you to build rich, interactive communities
Welcome to 2PTTechnology Sign in | Join | Help
in Search

example of a Cursor

Last post 09-16-2009, 1:21 PM by twaligora. 0 replies.
Sort Posts: Previous Next
  •  09-16-2009, 1:21 PM 217

    example of a Cursor

    -- ---- CURSOR FOR INSERT

    DECLARE @CUST_IDS INT

     

    DECLARE CU_GET_CUSTOMER_IDS CURSOR FOR

     

    SELECT ID FROM FT_CUSTOMER WHERE NAME = @CUST_NAM

     

    OPEN CU_GET_CUSTOMER_IDS

    FETCH NEXT FROM CU_GET_CUSTOMER_IDS INTO @CUST_IDS

    WHILE @@FETCH_STATUS = 0

    BEGIN

     

     

     

    FETCH NEXT FROM CU_GET_CUSTOMER_IDS INTO @CUST_IDS

    END

    CLOSE CU_GET_CUSTOMER_IDS

    DEALLOCATE CU_GET_CUSTOMER_IDS

View as RSS news feed in XML
Powered by Community Server (Personal Edition), by Telligent Systems