Hi
Thank you for your reply
I tried both now but still having problems here..
What I am trying to achieve here is an import of data from my Access 2003
tables in to SQL Server 2005, via SQL Server Management Studio (Import and
export wizard). All accesstables has been imported with no errors except for
this last one "Transaktionsrader"
I receive this error below:
- Copying to [MbaseMuseumServerNetSQL].[dbo].[Transaktionsrader] (Error)
Messages
Information 0x402090df: Data Flow Task: The final commit for the data
insertion has started.
(SQL Server Import and Export Wizard)
Error 0xc0202009: Data Flow Task: An OLE DB error has occurred. Error code:
0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client"
Hresult: 0x80004005 Description: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Native Client"
Hresult: 0x80004005 Description: "The INSERT statement conflicted with the
FOREIGN KEY constraint "ITransaktionsrader11". The conflict occurred in
database "MbaseMuseumServerNetSQL", table "dbo.Transaktionhuvud", column
'TransaktionhuvudTransaktionsnr'.".
(SQL Server Import and Export Wizard)
Information 0x402090e0: Data Flow Task: The final commit for the data
insertion has ended.
(SQL Server Import and Export Wizard)
Error 0xc0047022: Data Flow Task: The ProcessInput method on component
"Destination - Transaktionsrader" (115) failed with error code 0xC0202009.
The identified component returned an error from the ProcessInput method. The
error is specific to the component, but the error is fatal and will cause the
Data Flow task to stop running.
(SQL Server Import and Export Wizard)
Error 0xc0047021: Data Flow Task: Thread "WorkThread0" has exited with error
code 0xC0202009.
(SQL Server Import and Export Wizard)
Mattias
Allen Browne said:
What do you want when you say "unmatched"?
The query will find records in one table that have no match in the other
one. If you want the reverse as well, create another query with the join
going the other way, and the WHERE clause selecting from the other table:
SELECT Transaktionsrader.Transaktionsrad, Transaktionsrader.Transaktionsnr
FROM Transaktionhuvud LEFT JOIN Transaktionsrader ON
Transaktionhuvud.Transaktionsnr = Transaktionsrader.Transaktionsnr
WHERE Transaktionsrader.Transaktionsnr Is Null;
If you want both lots returned in one read-only query, you could UNION the
two together.