Hello,

I'm using the Win32::SqlServer module to execute queries against my 
database.

Normally a query might look like:

our $mySQL = SQLfunctions->new;
$mySQL->createSQLConnection("localhost\\Company", "Import");

@results = $mySQL->runQuery("Select A,B from tablename;");

foreach my $rows (@results)
{
     print $$rows{A}."\n";
     print $$rows{B}."\n";
}

All values from columns A and B will be printed.

But now I want to use a query that will show me the difference between 
two tables, Table1 and Table2.  This query is:

select 'table1' as tblName, *  from
   (select * from table1
    except
    select * from table2) x
union all
select 'table2' as tblName, *  from
   (select * from table2
    except select *
    from table1) x

Based on the return from this query, any of the columns in the table 
could be represented.  How do I determine which keys are present so I 
can view the results?

Thanks,

Jason
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to