Tiffany-
It looks like the Images field is Attachment data type, correct? Any asset that
has more than one image saved will show multiple rows because the multiple
attachments are stored in a hidden table. When you include ask for the
individual properties of the attachment field (FileData, FileFlags, FileName,
FileTimeStamp, FileType), you're effectively doing a 1 to many join to the
hidden table. Remove those "property" fields to see one row per asset.
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of cc0623
Sent: Friday, November 04, 2011 3:33 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Query showing duplicates.
Does anyone know why this is happening? The table is fine, but the query is
showing duplicates of every record.
SELECT Assets.[Unit], Assets.[Last Month], Assets.[Current], Assets.[CO],
Assets.[Acc Code], Assets.[Well No], Assets.[Model], Assets.[Year],
Assets.[Description], Assets.[Driver], Assets.[Mobile Phone],
Assets.[Department], Assets.[Vin#], Assets.[License], Assets.[Acquired],
Assets.[Fuel], Assets.[Weight], Assets.[Supervisor], Assets.[Images],
Assets.[Images].[FileData], [Images].[FileFlags] AS Expr1,
Assets.[Images].[FileName], [Images].[FileTimeStamp] AS Expr2,
Assets.[Images].[FileType], [Images].[FileURL] AS Expr3, Assets.[Retired],
Assets.[Total], Assets.[Sold], Assets.[Notes]
FROM Assets;
Tiffany
------------------------------------
Yahoo! Groups Links
Jumat, 04 November 2011
RE: [MS_AccessPros] Query showing duplicates.
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar