HOW CAN I CREATE ARRAY IN SQL 6.5


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: HOW CAN I CREATE ARRAY IN SQL 6.5

  1. #1
    Toms Ng Guest

    HOW CAN I CREATE ARRAY IN SQL 6.5


    I am a visual foxpro programmer
    I want to create array in SQL 6.5 to perform some tasks.
    # Visual coding
    Local lnArrayLength , lni

    Dimension laDbf[2]
    laDbf[1] = "a"
    laDbf[2] = "b"
    lnArrayLength = alen(laDbf)

    for lni = 1 to lnArrayLength
    if used(laDbf[lni])
    use in (laDbf[lni])
    endif
    next lni
    #

    Now in SQL 6.5
    I have create a lot of view
    i just want to create an array , and than i assign all the view-name
    in the array
    than loop all the elements in array and test if the view is exists ,
    drop the view.

    if exists (select * from sysobjects where name = "view")
    drop view "view"

    since the if command is same to all the view
    i want to create array and use a loop to loop until the end of array.

    Toms




  2. #2
    DaveSatz Guest

    Re: HOW CAN I CREATE ARRAY IN SQL 6.5

    see http://www.mssqlserver.com/faq/development-array.asp and
    http://www.mssqlserver.com/faq/development-array.asp
    "Toms Ng" <tomsng@sinaman.com> wrote in message
    news:3c1ee001$1@147.208.176.211...
    >
    > I am a visual foxpro programmer
    > I want to create array in SQL 6.5 to perform some tasks.
    > # Visual coding
    > Local lnArrayLength , lni
    >
    > Dimension laDbf[2]
    > laDbf[1] = "a"
    > laDbf[2] = "b"
    > lnArrayLength = alen(laDbf)
    >
    > for lni = 1 to lnArrayLength
    > if used(laDbf[lni])
    > use in (laDbf[lni])
    > endif
    > next lni
    > #
    >
    > Now in SQL 6.5
    > I have create a lot of view
    > i just want to create an array , and than i assign all the view-name
    > in the array
    > than loop all the elements in array and test if the view is exists ,
    > drop the view.
    >
    > if exists (select * from sysobjects where name = "view")
    > drop view "view"
    >
    > since the if command is same to all the view
    > i want to create array and use a loop to loop until the end of array.
    >
    > Toms
    >
    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center