I tried this through Visual Studio and Lastly entering it directly into SQL Server Management Studio where I received 38 Error lines. It looked like virtually everything was rejected with red zigzag underlines. I am not sure where I am going wrong. Example in SQL Management Studio______ Query window on the right with this query filled in. I hoovered the cursor over ORDER BY OrderDate "I get "invalid column name" I look on the left at the columns listed under CustomerOrders table and there is is a column called OrderDate with data type (Date, Null) By the way in the where clause WHERE (OrderComplete = '0') OrderComplete has data type bit I just want to show orders that are not complete.
The following is definitely true in SQL Server (Nothing is networked - all is local):
Data base name: jandmmfg
Table used: dbo.CustomerOrder
I won't repeat the fields here, but they were auto filled in in Visual Studio where I am developing a program. I checked most of them and they were right. But like I said; everything was rejected so I am guessing that something obvious is wrong or missing.
SELECT OrderNumber, CustomerNumber, Contact, OrderDate, ShipDate, OrderComplete, [Drop Ship info?], [Freight Charges], Item_a_Qty, Item_a_description, Item_b_Qty,
Item_b_description, Item_c_Qty, Item_c_description, Item_d_Qty, Item_d_description, Item_e_Qty, Item_e_description, Item_f_Qty, Item_f_description, Item_g_Qty,
Item_g_description, Item_h_Qty, Item_h_description, Item_i_Qty, Item_i_description, Item_j_Qty, Item_j_description, Item_k_Qty, Item_k_description, Item_l_Qty,
Item_l_description, Item_m_Qty, Item_m_description, Notes
WHERE (OrderComplete = '0')
ORDER BY OrderDate