Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem Creating view Pervasive 8

Status
Not open for further replies.

hotzambo

Programmer
May 17, 2007
6
0
0
IT
I all.
I have this problem.
command...

create view vistamom (NumFattura, Data, importo, Causale, contropartita)

as
SELECT F.NumFattura, F.Data, F.Importo1 as importo, F.Causale1 as causale, '1' as contropartita
FROM RIWTE_Fatture as F
WHERE F.Importo1 is not null AND F.Importo1 <> 0 AND F.Categoria = 'Libera'


Error reported.
The table has index on NumFattura, Data
The table is empty
When the table is compiled no duplicate rows are in.
Please Help.
Thenka Alessandro Zambonin
---
****************************************************
ODBC Error: SQLSTATE = S1000, Native error code = 0
Unable to create table vistamom.
The record has a key field containing a duplicate value(Btrieve Error 5)



create view vistamom (NumFattura, Data, importo, Causale, contropartita)

as
SELECT F.NumFattura, F.Data, F.Importo1 as importo, F.Causale1 as causale, '1' as contropartita
FROM RIWTE_Fatture as F
WHERE F.Importo1 is not null AND F.Importo1 <> 0 AND F.Categoria = 'Libera'
Some error(s) encountered while executing SQL statement(script).


 
Sounds like you've already got a view or table names "vistamom".
What happens if you change the name of the view?
What happens if you run the SELECT by itself? Does it work?

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Oh, no.
I have not already this table.
I have read some post about this before write my post.
Select run ok.
I have not the possibilities to create any view.
I have tried with other table, but the result is ever the same.
Compatibility is 6.5.
Thanks.

More help ?
Alessandro
 
I have not the possibilities to create any view.
Just to confirm, you cannot create any view? Can you create a view in another database (like DEMODATA)?
If so, then the problem is in your database. You might have a bad entry in the DDFs. Do you have a VIEW.DDF?

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Hi.
No i have only file, fields and index.
Alessandro
 
Sounds like you've got a bad set of DDFs.. Can you create a view in DEMODATA using the statement below:
Code:
CREATE VIEW view1 AS SELECT * FROM CLASS
Are the DDFs from a third party application or did you develop the application yourself?

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Third part application.
Esatto from Esa of Rimini.
I have checked tables and all not passed.
Only tables created by me have passed test.
This is the first time i use pervasive sql....
:(
Alessandro
 
You need to contact the vendor of the application to get DDFs that work and allow you to create views.

There's not much else that can be done.

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top