>- see footer for list info -<
Is this an update or an insert?

But anyhow

it will be something like

update mytable m
from myothertable y
set id = y.id,
     thedate = y.thedate,
     thenum = y.thenum
where m.key = y.key
and y.othercriteria = 'foo'

or

insert into mytable
select id,thedate,thenum
from myothertable
where y.otherciteria = 'foo'

HTH :-)

On 3/22/06, Gary F <[EMAIL PROTECTED]> wrote:
>
> >- see footer for list info -<
> CF needs to periodically update about 1000 rows of data in MS SQL Server
> 2005 but I don't want it doing 1000 separate inserts when I'm sure it can
> be
> done using just 1 query. There's an id, date, and a numeric column.
>
> Please can someone divulge the secret on what the sql query should look
> like? This would be really efficient in comparison to doing 1000 updates.
>
>
--
Mike T
Blog http://www.socialpoints.com/
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to