Append Array

Results 1 to 2 of 2

Thread: Append Array

  1. #1
    Join Date
    Dec 1969

    Default Append Array

    Hello,<BR><BR>I currently past data in to an array using:<BR><BR>userListArray = userList.GetRows()<BR><BR>I would like to append another array to this, both arrays are the same size. Can this be done in ASP, I don&#039;t want to use a UNION SQL query.<BR><BR>Thanks<BR><BR>Carl

  2. #2
    Join Date
    Dec 1969

    Default Manually

    You can redim preserve the array to the total number of elements in both arrays combined. Then loop thru the second array populating the first.<BR><BR>Why would you not want to use a UNION query. Your array is going to require that both arrays have the same elements. The UNION query is most likely going to be faster.<BR><BR>If one array doesn&#039;t have the same column names as the second, you can force UNION to handle it.<BR><BR>select colA as MyColA,<BR> colB as MyColB<BR> from TableA<BR> union<BR>select somecolA as MyColA,<BR> somecolB as MyColB<BR> from TableB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts