Re: SQL Query Command

Dale E. Reed Jr. ( (no email) )
Tue, 18 Mar 1997 09:07:27 -0800 (PST)

On Tue, 18 Mar 1997, Will LaSala wrote:

> Hey guys,
> I need an SQL command to change all of the pay periods.
> like I need to make anyone that has a SBR that is 15 hours set the pay period to quarterly
> and everything else needs to be set to monthly

Try Something like:

Update MasterAccounts
Set PayPeriod = "Monthly"
Where Exists (
Select AccountID From SubAccounts
Where SubAccounts.CustomerID = MasterAccounts.CustomerID
AND AccountType = "15 Hours"

Repeat the above changing PayPeriod and AccountType. You can
also change PayPeriod and "Where Not Exists" to get all others,
without changing AccountType.