Union Queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

After i runa union query in my access project i am unable to run most other queries. I get an error message saying that the microsoft jet database engine could not find the object 'Query Name'. Can anyone tell me why this is happening and how it can be fixed?
 
This error message typically indicates that one of the components (a table
or a query) you've indicated in a query design is missing.

If I had to take a wild guess (you didn't provide a SQL statement for our
inspection), I'd guess you have the phrase "Query Name" embedded somewhere
in a SQL statement.

Just a guess, though...
 
Actually, I was asking you to post your SQL statements, so the 'group can
take a look.
 
Sorry Jeff...Here is the query. Let me know what you think

SELECT [Date], Int(Right$([dbo_CatsSwapHistTb]![TesId],Len([dbo_CatsSwapHistTb]![TesId])-1)) AS TicketId, [Type], IIf( dbo_CatsSwapHistTb.CatsType not in(select [NPV Not Produced by CATS] from [NON CATS NPV]),IIf([Type]="BORROW",([Pay1NPV]/IIf(Int(Abs([Pay1FxRate]))<1,1,[Pay1FxRate])),[Pay2NPV]/[Pay2FxRate]-[Pay1NPV]/[Pay1FxRate]),0) AS [Net Exposure], [Pay1FxRate] AS [FX Rate],0 AS [Price] ,0 AS [AccrInt], [MaturityDt],1 as Facto
FROM dbo_CatsSwapHistT
WHERE (((dbo_CatsSwapHistTb.Date)=[Report Date]) AND ((dbo_CatsSwapHistTb.Type)<>"BORROW")

UNION Select [COB_Date], Int(IIf(Int(InStr(1,[TicketId]," "))=0,[TicketId],Left([TicketId],InStr(1,[TicketId]," ")))) AS [Deal Id],[Type],IIf([Type]="FOREX",[LoanVal]-[CollVal],-(([LoanVal]+IIf(IsNull([LoanIntr]),0,[LoanIntr]))/[LoanFxRate]+([CollVal]+[CollIntr])/[CollFxRate])) AS [Net Exposure],[LoanFxRate] AS [FX Rate],[Price],[AccrInt],0,[factor
FROM dbo_ceDetailRecord
WHERE (((dbo_ceDetailRecords.COB_Date)=[Report Date]))
 
Back
Top