Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : What can I do with Employee Earnings (EmployeeEarning)?Search Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Sample Scripts Forum

 New Topic 
 
 Post Reply 
[1]  
 What can I do with Employee Earnings (EmployeeEarning)? 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-02-26 17:07:23

Various example scripts to insert, update and delete payroll info.

Create a new Employee and EmployeeEarning Line
INSERT INTO EmployeeEarning (FirstName, MiddleName, LastName, PayrollInfoEarningsPayrollItemWageRefListID, PayrollInfoEarningsRate, FQSaveToCache) VALUES ('Tom','T.','QODBC', '10000-933272656', 30000.0, 0)

Create a new EmployeeEarning Line for an Existing Employee
INSERT INTO EmployeeEarning (ListID, PayrollInfoEarningsPayrollItemWageRefListID, PayrollInfoEarningsRate) VALUES ('300000-934380930', '20000-934380928', 40000)

Destroy the new EmployeeEarning Line
DELETE FROM "EmployeeEarning" WHERE "ListID" = 'AA0000-1197773926' AND "PayrollInfoEarningsPayrollItemWageRefListID" = '10000-933272656'

Note: The ListID's will vary depending on your company file

Further Examples
UPDATE "EmployeeEarning" SET PayrollInfoEarningsRate = 25000.0 WHERE "ListID" = '390000-933272659' AND "PayrollInfoEarningsPayrollItemWageRefListID" = '10000-933272656'

UPDATE "EmployeeEarning" SET PayrollInfoEarningsRate = 20.000 WHERE "ListID" = '390000-933272659' AND "PayrollInfoEarningsPayrollItemWageRefListID" = '50000-933272657'

DELETE FROM "EmployeeEarning" WHERE "ListID" = '390000-933272659' AND "PayrollInfoEarningsPayrollItemWageRefListID" = '10000-933272656'

DELETE FROM "EmployeeEarning" WHERE "ListID" = '390000-933272659' AND "PayrollInfoEarningsPayrollItemWageRefListID" = '50000-933272657'

Note: If you have trouble seeing your changes, try running your queries in unoptimized mode like this:-

SELECT Name, ListID, PayrollInfoEarningsPayrollItemWageRefListID, PayrollInfoEarningsRate FROM EmployeeEarning unoptimized

 

  Top 
  KofK 
  
 Group: Members 
 Posts: 43 
 Joined: 2006-04-04 
 Profile
 Posted : 2006-04-25 01:23:47
If I execute:
DELETE FROM EmployeeEarning WHERE ListID = '300000-934380930'
I get en error "invalid bookmark value", but it DELETES ONE record.
If I keep on executing it, it eventually deletes all the records and when there are no more records left it executes seccessfully. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-04-25 10:37:17

Sorry, you MUST specifiy PayrollInfoEarningsPayrollItemWageRefListID in the delete as per:

DELETE FROM "EmployeeEarning" WHERE "ListID" = '390000-933272659' AND "PayrollInfoEarningsPayrollItemWageRefListID" = '50000-933272657'

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to