Re: [Emerald] Big Query....Need Help
Dale E. Reed Jr. ( (no email) )
Fri, 26 Mar 1999 21:14:27 -0800
Jason Powell wrote:
>
> We are switching to Anniversary billing, and we need to make the following
> changes so we can bill our current people correctly. I am not sure what
> kind of query I need to run to get these results. Can someone please give
> me a hand?
>
> I need all credit card people under the default billing cycle to change the
> paid through date from */15/* to */01/*. Also, I need to change the billed
> through date from */15/* to */01/* and the expire date from */15/* to
> */05/*. Last, I need to give all of the credit card people permanent 10 day
> limit.
>
> */15/* is any month, and any year. I don't know if it is possible to just
> change the day. Or if I have to put a line for every month and year as a
> different line statement.
You would have to use DatePart to break it down and put it back together
like:
Update MasterAccounts
Set BilledThru = Convert(varchar(3), DatePart(Month, BilledThru)) +
'/1/' + Convert(varchar(4), DatePart(Year, BilledThru))
Where DatePart(Day, BilledThru) = 15
You can add the rest of the fields in the same manner.
--
Dale E. Reed Jr. Emerald and RadiusNT__________________________________________IEA Software, Inc. www.iea-software.com
For more information about this list, including removal,please see http://www.iea-software.com/maillist.html