|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Basically, when I link using odbc to a table in SQL, occasionally ODBC will return multiple unique records when there really is only one. It's starting to become a real issue as I have to group by to remove the extra records (that don't really exist), but that comes at a significant efficiency drop.
Here's the example, I have a table of customers. The employee, using a access form field, searches the name "John Quinn". There is only one "John Quinn" in the database, but it'll return two rows.
This problem spans many different tables.
Any help would be appreciated.
|
|
Can you post your Query? I think the problem has to be there. -Thanas
newsposter[ at ]orion-forever.com wrote:
[Quoted Text] > Basically, when I link using odbc to a table in SQL, occasionally ODBC > will return multiple unique records when there really is only one. > It's starting to become a real issue as I have to group by to remove > the extra records (that don't really exist), but that comes at a > significant efficiency drop. > > Here's the example, I have a table of customers. The employee, using a > access form field, searches the name "John Quinn". There is only one > "John Quinn" in the database, but it'll return two rows. > > This problem spans many different tables. > > Any help would be appreciated.
|
|
It really can't be in the query, no joins, the table does not have multiple records, but when I use obdc, it returns multiple records. this is the group by version, the one I'd rather use it just straight (grouping across the 300,000 records I have impacts efficiency).
SELECT tblTransactions.player_code, tblTransactions.mlb_id, tblTransactions.trans_date, tblTransactions.trans_code, tblTransactions.org_from, tblTransactions.org_to, tblTransactions.description, tblTransactions.trans_id, tblTransactions.append_date, tblTransactions.bulletin, tblTransactions.dl_detail FROM tblTransactions GROUP BY tblTransactions.player_code, tblTransactions.mlb_id, tblTransactions.trans_date, tblTransactions.trans_code, tblTransactions.org_from, tblTransactions.org_to, tblTransactions.description, tblTransactions.trans_id, tblTransactions.append_date, tblTransactions.bulletin, tblTransactions.dl_detail ORDER BY tblTransactions.trans_date DESC;
|
|
Now you got me curious. What kind of server was it again? You could also try to Select Distinct. That may help you only return distinct records. But you state that there is only one record in that table correct? The other thing is to check that you have the latest ODBC driver for whatever database you are using.
I am not sure if that really help any, but let me know. -Thanas
newsposter[ at ]orion-forever.com wrote:
[Quoted Text] > It really can't be in the query, no joins, the table does not have > multiple records, but when I use obdc, it returns multiple records. > this is the group by version, the one I'd rather use it just straight > (grouping across the 300,000 records I have impacts efficiency). > > > SELECT tblTransactions.player_code, tblTransactions.mlb_id, > tblTransactions.trans_date, tblTransactions.trans_code, > tblTransactions.org_from, tblTransactions.org_to, > tblTransactions.description, tblTransactions.trans_id, > tblTransactions.append_date, tblTransactions.bulletin, > tblTransactions.dl_detail > FROM tblTransactions > GROUP BY tblTransactions.player_code, tblTransactions.mlb_id, > tblTransactions.trans_date, tblTransactions.trans_code, > tblTransactions.org_from, tblTransactions.org_to, > tblTransactions.description, tblTransactions.trans_id, > tblTransactions.append_date, tblTransactions.bulletin, > tblTransactions.dl_detail > ORDER BY tblTransactions.trans_date DESC;
|
|
do you have a primary key? Is the primary key returned in the query dataset? can you post the code used to open the recordset?
(david)
<newsposter[ at ]orion-forever.com> wrote in message news:1156359012.886142.315230[ at ]p79g2000cwp.googlegroups.com...
[Quoted Text] > Basically, when I link using odbc to a table in SQL, occasionally ODBC > will return multiple unique records when there really is only one. > It's starting to become a real issue as I have to group by to remove > the extra records (that don't really exist), but that comes at a > significant efficiency drop. > > Here's the example, I have a table of customers. The employee, using a > access form field, searches the name "John Quinn". There is only one > "John Quinn" in the database, but it'll return two rows. > > This problem spans many different tables. > > Any help would be appreciated. >
|
|
|