Hello,
I'm trying to peform an Insert, but I also need to perform a Select within the Insert. Unfortunately, I have not been too efficient with my sql. I'm using C# on a windows application and using Access 2003 as the Database. Any help would be greatly appreciated! thanks in advance.
I'm trying to peform an Insert, but I also need to perform a Select within the Insert. Unfortunately, I have not been too efficient with my sql. I'm using C# on a windows application and using Access 2003 as the Database. Any help would be greatly appreciated! thanks in advance.
Code:
strSQL = "Insert into Jobs(CustomerID, StartDate, EndDate, Labor, Materials, Days) Values(Select MAX(CustomerID) from Customers,'" + txtStartDate.Text + "','" + txtEndDate.Text + "','" + intLabor + "','" + intMaterials + "' ,'" + txtDay.Text + "')";