Systems Engineer II

Results 1 to 2 of 2

Thread: Systems Engineer II

  1. #1
    John A Scholl Guest

    Default Systems Engineer II

    I have two tables with an equal number of records. There is one field that identifies a server. The same server name may appear more than once. Another field is a date/time field.There are no unique fields.How may I write a query to produce a third table such that the records<BR>in the table will appear thusly:<BR><BR> 1st Table-1st record, 2nd Table- 1st record<BR> 1st Table - 2nd record, 2nd Table -2nd record<BR>etc.

  2. #2
    Join Date
    Dec 1969

    Default what an odd subject title...

    ...that has nothing to do with your question.<BR><BR>Anyway...<BR><BR>I don&#039;t think you can write a SQL query that will do this. There is no way to guarantee that you will get 1-2-1-2-1-2 ordering in the output. <BR><BR>I think you have to resort to VBScript to loop through the pair of tables producing the third one as output. Slow, but it would work.<BR><BR>The only other thing I see would be to write a Stored Procedure to do the same thing. I don&#039;t use SQL Server, so I dunno if its "language" is flexible enough to do this, but I suspect it is.<BR><BR>

Posting Permissions

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