Cool

thanks.

Marty

> -----Original Message-----
> From: Fay Jason-W13246 [mailto:[EMAIL PROTECTED]]
> Sent: Monday 18 February 2002 16:22
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: RE: [Perl-unix-users] Joining Databases
> 
> 
> In your code, you are using what Oracle calls a database link.  
> When you declare the tables to query from, the \@STAGE001 is 
> specifying a link to another database.  I don't know if mysql or 
> postgreSQL have database links.  In Oracle, you need to have the 
> link set up before the SQL will work.
> 
> Good Luck!
> 
> Jason Fay
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, February 18, 2002 10:08 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: [Perl-unix-users] Joining Databases
> 
> In Oracle, I believe that the answer to your question is yes ( I am not
> familiar with the others ).
> 
> Here is a snippet of a .pm that I run using Oracle as the database, it is
> ugly but maybe it is what you are looking for.
> 
>    my $sth = $self->{'dbc'}->prepare("select c.TAG_NAME
>                                      ,a.COLUMN_DATA_TYPE
>                                      ,a.COLUMN_STARTING_POS
>                                      ,a.COLUMN_ENDING_POS
>                                      ,a.COLUMN_LENGTH
>                                      ,a.COLUMN_DATA_TYPE
>                                      ,a.DATE_CONVERSION_MASK
>                                      ,b.SQLLDR_DATATYPE
>                                      from
>                                       META_TAB_COL\@STAGE001 a
>                                      
> ,FEED_DATATYPE_CONVERSIONS\@STAGE001 b
>                                      ,FDMS_COLUMN_TRANSLATION c where
>                                      a.COLUMN_NAME = 
> c.BASELINE_COL_NAME and
>                                      a.FIELD_NUMERIC_MASK =
> b.FEED_DATATYPE(+) and
>                                      a.FEED_NAME = $feedName
>                                      order by a.COLUMN_STARTING_POS" );
> 
> $sth->execute();
> 
> #Declare the variables for database values.
> my ($tagName ,$dataType ,$colStartPos ,$colEndPos ,$colLength 
> ,$colDataType
> ,$colDateFmt ,$colNumFmt );
> 
> #Bind the variables to the sql statement.
> $sth->bind_columns( \($tagName ,$dataType ,$colStartPos ,$colEndPos
> ,$colLength ,$colDataType ,$colDateFmt ,$colNumFmt ));
> 
> AND SO ON...
> 
> Regards,
> 
> Bryan
> 
> 
> 
> 
> -----Original Message-----
> From: Martin Moss [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 18, 2002 7:38 AM
> To: [EMAIL PROTECTED]
> Subject: [Perl-unix-users] Joining Databases
> 
> 
> Daft question,
> 
> Is it possible to join databases without making two calls. I.e. 
> can the join
> be done within SQL, not using 2 $db references?
> Not sure which databases yet, but probably mysql, oracle, postgreSQL.
> 
> 
> Regards
> 
> Marty
> 
> _______________________________________________
> Perl-Unix-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> _______________________________________________
> Perl-Unix-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to