![]() I cannot post data or actual queryI think the example i gave is the closest onewhat its doing is in the result is:for vendor ID 1 it returns values of vendor ID 2 as wellso i though if its possible to create a primary key on a view (which i think u can in oracle not sure about SQL)then that might not be the problem Also, we'll need to see the query that you are using that shows this data issue as well as the code in both views.Tara Kizeraka tduggan Please us show a data example of what you mean. You'll need to explain what you mean by data discrepancy in order for us to help. This is what i did but the join gives some data descripency But you'd have to tell us what you want in order for us to help.Tara Kizeraka tduggan In the example above, I am using an inner join. ![]() FROM view1 v1INNER JOIN view2 v2ON v1.vendor_id = v2.vendor_idThe type of join to use is based upon your data requirement. In the join condition, you do not have to use a primary key constraint. You can not add a primary key constraint to views. HOW DO I CHANGE MY VIEWS TO MAKE VENDOR_ID as primary keys in them I need to create 2 views and then join them to get all the columns into another view.can i create primary keys on both the viewsboth views have vendor_id as one column that is the only column common in themview 1 has vendor_id, address, startdate, enddate, city, statevendor_id address startdate enddate city state 1 abc may 10 june 10 Kansas MO view 2 has vendor_id, service offered, employee nameview 2 will have multiple services and each vendor ID will have multiple employee who will offer multiple services as well so there will be repititons like this: Vendor ID EmployeeName Service Offered1 Albert Tech Support1 Albert Desktop Technician1 Albert Lotus Notes Admin2 Tony Developer2 Tony Adminwhich would be the best join to use. We've got lots of great SQL ServerĮxperts to answer whatever question you can come up with.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |