General information
Forum:
Microsoft SQL Server
Category:
Database management
Thank you for your reply.
I apologize for my ignorance but I am not an SQL Server programmer, I am just someone
who was told to go program a stored procedure by my boss.
I hope this is what you want.
CREATE VIEW dbo.vw_SMPaper_Orders_LineItem_Inventory
AS
SELECT dbo.Inventory.item_status, dbo.Lineitem.item_cost_center, dbo.Lineitem.fulfillment_id, dbo.Orders.orders_id, dbo.Lineitem.lineitem_id,
dbo.Inventory.item_id, dbo.Lineitem.item_primary_reference AS lineitem_primary_reference, dbo.Inventory.item_prefix, dbo.Inventory.short_desc,
dbo.Inventory.cost, dbo.Orders.primary_reference AS orders_primary_reference, dbo.Orders.customer_reference, dbo.Orders.order_date,
dbo.Orders.ship_date, dbo.Orders.consign, dbo.Orders.ship_postal_code, dbo.Orders.ship_city, dbo.Orders.ship_region, dbo.Orders.ship_address_1,
dbo.Orders.ship_attention, dbo.Lineitem.qty_shipped, dbo.Lineitem.qty_ordered, dbo.Inventory.primary_reference AS inventory_primary_reference,
dbo.Inventory.default_uom
FROM dbo.Inventory INNER JOIN
dbo.Lineitem ON dbo.Inventory.item_id = dbo.Lineitem.item_id INNER JOIN
dbo.Orders ON dbo.Lineitem.orders_id = dbo.Orders.orders_id
WHERE (dbo.Lineitem.item_cost_center IN ('SMS', 'SMP'))
If this is not what you need, where would I find a definition of my view
Thanks again.
Jim
>What's the defination of your View? You cannot index all kind of views. There are some rules you need to follow. Copy your View defination here and I will be able to tell you why.
>
>>I created a view in the Create schema sql and then tried to index it.
>>I received the message.
>>Cannot create index on view 'vw_SMPaper_Orders_LineItem_Inventory'
>> because the view is not schema bound.
>>how do I bind my view to a schema.
>>
>>Thanks
>>Jim
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only