DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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
    >
    >
    >




Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links