Click here to Skip to main content
15,892,768 members

Comments by John d. Bartels (Top 22 by date)

John d. Bartels 26-Dec-13 9:51am View    
You can also use wmi to retrieve this information; I am not sure if the win32_product class has all of the same information that you need or not. The wmi query would be: "Select * from win32_product". If you want to verify that all of the info is there prior to coding out the solution, jump on powershell and perform a gwmi query to see the information. "gwmi -computername RemoteComp1 -query "Select * from win32_product""
John d. Bartels 26-Dec-13 9:38am View    
Are you inserting this record by calling a stored procedure? If so, then you could simply do this work in the sproc. If not, have you given thought to simply creating a stored procedure and then calling the sproc to do your insert? Also, the trigger should work on both Inserts and Updates, and then you could achieve the same results using the trigger. So, I just re-read your post, and it seems like you want to update the "Status" column when a Date is inserted into the time column. But, then your post title is "stored procedure to run at a particular time"... this sounds like two different problems. Might I ask why you want the stored procedures to run at a particular time vs. when the record is actually being inserted or updated?
John d. Bartels 22-Dec-13 10:49am View    
Not sure what your Process or Sale Process looks like..., but I would assume that if this is a SQL db, there are likely other tables that contain Sales or Order Data. You would need to add an additional predicate (like a where clause) in the following queries if you were looking for a particular orderID, or a particular orderDate, etc.

Select ItmName from ItemMaster imstr
inner join Sales.Orders ordrs
on ordrs.ItmNo = imstr.ItmNo

Select ItmNo from ItemMaster imstr
inner join Sales.Orders ordrs
on ordrs.ItmNo = imstr.ItmNo
John d. Bartels 4-May-13 0:19am View    
"'Query3.BCCHNO=AND" <-- this appears to be a problem. I am not sure what datatype the column BCCHNO is, SQL or Oracle the correct syntax for that would be "Query3.BCCHNO='Value'" (Unless its a number, but then And wouldn't make sense) This is depicted in the very next line of your query. The error is definitely in the SQL query generation, and stepping through the code should provide you with some insight as to how you can improve your query generation code. You can also just place a message box right before you open the query and then display the sql query in the message box. This would likely provide you with enough information to remedy the error without having to step through all of the code.
John d. Bartels 19-Feb-13 22:55pm View    
In the excel formula, there must be an equals sign:

dt["Percentage"]="=p2/f2 *100";