dbTalk Databases Forums  

Btrieve Error 5 on Create View

comp.databases.btrieve comp.databases.btrieve


Discuss Btrieve Error 5 on Create View in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
hotzambo@cheapnet.it
 
Posts: n/a

Default Btrieve Error 5 on Create View - 09-24-2007 , 02:28 AM






Hi.
I have a select command that work fine.
No duplicate values.
If i want to create a view i receive Btrieve error 5. Duplicate Key
Error, SQL State 1000.
I dont understand.
Anyone can help me ?
Btrieve 8.59.189.00


Thanks in advance.
Alessandro Zambonin

Create View RIWTE_vwRigFatt (IdFattura, Iva, EsenteIva, Conto, Costo )
as

SELECT FR.IdFattura, FR.Iva, FR.EsenteIva,
if(CC.ContoEsatto is null, PA.ContoGenerico, CC.ContoEsatto) as
Conto ,
Sum(FR.Quantita * FR.Prezzo) as Costo
Quote:
From RIWTE_FattRec FR left outer join RIWTE_CorrConti CC
ON FR.Codice = CC.Codice
Inner Join RIWTE_Parametri PA on PA.Id = 1
group by FR.IdFattura, FR.Iva, FR.EsenteIva, if(CC.ContoEsatto is
null, PA.ContoGenerico, CC.ContoEsatto)



Reply With Quote
  #2  
Old   
Bill Bach
 
Posts: n/a

Default Re: Btrieve Error 5 on Create View - 09-28-2007 , 08:03 AM






What data types are the fields in question? If any of them are
"AutoInc" fields, then you will need to cast them to INTEGER data type
first.

Also, you may wish to patch to PSQLV8.7 (Service Pack 3) to take
advantage of any other bug fixes in the ewer patches.
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Chicago: Pervasive Service & Support Class - 11/12/2007 ***


hotzambo (AT) cheapnet (DOT) it wrote:

Quote:
Hi.
I have a select command that work fine.
No duplicate values.
If i want to create a view i receive Btrieve error 5. Duplicate Key
Error, SQL State 1000.
I dont understand.
Anyone can help me ?
Btrieve 8.59.189.00


Thanks in advance.
Alessandro Zambonin

Create View RIWTE_vwRigFatt (IdFattura, Iva, EsenteIva, Conto, Costo )
as

SELECT FR.IdFattura, FR.Iva, FR.EsenteIva,
if(CC.ContoEsatto is null, PA.ContoGenerico, CC.ContoEsatto) as
Conto ,
Sum(FR.Quantita * FR.Prezzo) as Costo
From RIWTE_FattRec FR left outer join RIWTE_CorrConti CC
ON FR.Codice = CC.Codice
Inner Join RIWTE_Parametri PA on PA.Id = 1
group by FR.IdFattura, FR.Iva, FR.EsenteIva, if(CC.ContoEsatto is
null, PA.ContoGenerico, CC.ContoEsatto)


--



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.