Create a table from a view & retrieve data

Anthony04
Member Posts: 3
Hello everybody,
I ask you if someone know why my table can't retrieve data from my view ?
I show what I've got :
- My SQL view and my Navision table are in the same SQL Server database.
- My SQL view asked a database on another server, it works (only for the user "A")
So, in order to anyone can read data I have to create a table in Navision which retrieves the view result.
I understood that I have to create a table with the same name and the same column names and modify properties of my table :
- My View :

- My table in Navision :

-My table's properties :

When I try to run the table I have this message :

Help please
I ask you if someone know why my table can't retrieve data from my view ?
I show what I've got :
- My SQL view and my Navision table are in the same SQL Server database.
- My SQL view asked a database on another server, it works (only for the user "A")
So, in order to anyone can read data I have to create a table in Navision which retrieves the view result.
I understood that I have to create a table with the same name and the same column names and modify properties of my table :
- My View :

- My table in Navision :

-My table's properties :

When I try to run the table I have this message :

Help please
0
Comments
-
Hi!
Well, first of all you have to assure that the names of all fields and the table/view itself are identical - seems to be the case.
The datatypes must be compatibel - looks OK.
Further, NAV requires a unique PK also for such linked objects, thus you view must ensure the "invoicenumber" is unique, maybe using the DISTINCT operator in the view?! Are your values unique?
Then you also need to set the appropriate rights on your view, e.g.GRANT SELECT ON [Sales-Invoices-PID] TO PUBLIC
Should work ... !?Jörg A. Stryk (MVP - Dynamics NAV)
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool0 -
And if Joerg's trick doesn't work, just a wild guess:
Don't use the '-' in the name but use blanks or don't use anything to separate the words of the tablename like "SalesInvoicesPID".
Another wild guess: maybe the collation is not correct.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
It doesn't work but thanks for your advices.
I'm trying something else and I'll tell you0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions