Thread Verwendung von Datenbanklinks in SELECT-Abfrage (29 answers)
Opened by Hanna at 2009-09-23 15:00

Gast Hanna
 2009-09-23 17:20
#126148 #126148
2009-09-23T15:05:40 sid burn
Soetwas liefert dir also ergebnisse?

Code: (dl )
1
2
$sth = $dbh->prepare('SELECT PRODUCT_ID FROM schema.products@dblink_to_testdb where (product_id=10)');
$sth->execute();

--> quasi, bis auf die Hochkommata!
Code (perl): (dl )
$sth = $dbh->prepare('SELECT PRODUCT_ID FROM schema.products@dblink_to_testdb where (product_id=\'10\')'); 

Quote
und soetwas nicht?
Code: (dl )
1
2
3
my $id = 10;
$sth = $dbh->prepare('SELECT PRODUCT_ID FROM schema.products@dblink_to_testdb where (product_id=?)');
$sth->execute($id);

--> genau!
Komisch...ich finde aber auch kein Beispiel, wo mal jm. einen DB-Link in ein Select baut...

edit betterworld: quote-Tags aufgerÀumt. Bitte den eigenen Text nicht innerhalb des Quotes schreiben.
Last edited: 2009-09-23 17:31:17 +0200 (CEST)

View full thread Verwendung von Datenbanklinks in SELECT-Abfrage