×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Problem Creating view Pervasive 8

Problem Creating view Pervasive 8

Problem Creating view Pervasive 8

(OP)
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).


RE: Problem Creating view Pervasive 8

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
http://www.mirtheil.com

RE: Problem Creating view Pervasive 8

(OP)
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

RE: Problem Creating view Pervasive 8

Quote:

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
http://www.mirtheil.com

RE: Problem Creating view Pervasive 8

(OP)
Hi.
No i have only file, fields and index.
Alessandro

RE: Problem Creating view Pervasive 8

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
http://www.mirtheil.com

RE: Problem Creating view Pervasive 8

(OP)
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

RE: Problem Creating view Pervasive 8

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
http://www.mirtheil.com

RE: Problem Creating view Pervasive 8

(OP)
Thanks for all.

Alessandro

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close