dbTalk Databases Forums  

merge two records.

comp.databases.ms-access comp.databases.ms-access


Discuss merge two records. in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mcolson
 
Posts: n/a

Default merge two records. - 04-27-2010 , 08:42 AM






I have a query produces two records for each of my tank I have. The
only item in my query that is different in the two records is my
Model#. The can be tied to a location that I'm not showing in my
query. Is it possible to create two separate fields in my query and
only return 1 record that show both model numbers? I know this is
possible in sql with a case statement.

MFG_SN# Model#1 Model#2 LeakCode (Model#1 when Location is equal to
inner, Model#2 when location is equal to outer)

SELECT dbo_MaterialProducedActualEpa.EpaValue AS Model,
dbo_MaterialProducedActualEpa.GenealogyId AS MFG_SN,
dbo_ResourceActualEpa.EpaName, dbo_MaterialProducedActualEpa.Location
FROM dbo_MaterialProducedActualEpa RIGHT JOIN dbo_ResourceActualEpa ON
dbo_MaterialProducedActualEpa.GenealogyId =
dbo_ResourceActualEpa.ProductionRequestId
GROUP BY dbo_MaterialProducedActualEpa.EpaValue,
dbo_MaterialProducedActualEpa.GenealogyId,
dbo_ResourceActualEpa.EpaName, dbo_MaterialProducedActualEpa.Location
HAVING (((dbo_MaterialProducedActualEpa.GenealogyId)>"000 100") AND
((dbo_ResourceActualEpa.EpaName)="Leak1"))
ORDER BY dbo_MaterialProducedActualEpa.GenealogyId;

Reply With Quote
  #2  
Old   
mcolson
 
Posts: n/a

Default Re: merge two records. - 04-27-2010 , 09:02 AM






I've given this a try
Model1:
DLookUp("[EpaValue]","dbo_MaterialProducedActualEpa","[Location]=Inner")
But I get the error
"The expression you entered as a query parameter produced this error:
'Microsoft Office Access can't find the name 'Inner' you entered in
the expression'" followed by a ODBC call fail. I've played with where
I place the quotation marks, but with no luck.

Reply With Quote
  #3  
Old   
Salad
 
Posts: n/a

Default Re: merge two records. - 04-27-2010 , 09:18 AM



mcolson wrote:

Quote:
I've given this a try
Model1:
DLookUp("[EpaValue]","dbo_MaterialProducedActualEpa","[Location]=Inner")
But I get the error
"The expression you entered as a query parameter produced this error:
'Microsoft Office Access can't find the name 'Inner' you entered in
the expression'" followed by a ODBC call fail. I've played with where
I place the quotation marks, but with no luck.
I sometimes use something like
"Location = 'Inner'")
"Location = """ & YourFieldName & """")

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.