Selecting a record that is updating dating clyde1 com

Posted by / 03-Apr-2020 00:53

I currently do it this way but as you stated using set filter is not the best way to do it. I was using the filter command in 4 spots and now I'm down to 1. What I'm trying to do is select all the records that meet my criteria and sum up 2 fields within them.

IF INLIST(curservcat, "00015", "00016", "00017", "00018", "00019", "00043", "00044", "00047", "00048") = . I currently use the set filter command declare an array and then sum up the two fields into the array and add them together.

Mike __________________________________Mike Lewis (Edinburgh, Scotland)Visual Fox Pro articles, tips, training, consultancy Thanks for all the help everybody. Apart from that, it looks like you're on the right track.

I ended up going a different direction to get the same results. Mike __________________________________Mike Lewis (Edinburgh, Scotland)Visual Fox Pro articles, tips, training, consultancy Bad form to use CLOSE TABLES so willy-nilly, too.

As far as the close tables goes I was doing that in hopes not to lock up those tables on somebody that might be trying to get into them. act_dt USE sometable SHARED will open a table in a way the file can also be opened by others, as it is, well, shared.

I'm writing this for an existing foxpro program where people are in these tables all the time so my thought process was to close them as soon as I was done with them. Even better SET EXCLUSIVE OFF, then all USE will use shared.

You could also check IF FOUND() after LOCATE, to make sure you found an id, otherwise you end up doing things on EOF() of era_proj_actuals, which could lead to unwanted values of all the variables you set and use in the further SQL.

On the other side, to demonstate a bit what SQL works:update prodcuts set ordercount = computed.ordercount;from (Select Count(*) as ordercount, product_id From order_line_items group by product_id;where product_id in (15,10,54)) as computed;where products.product_id = computed.product_id This is the sql I'm trying to replicate Olaf.

Does it throw an error message or just not give you the answer you want?

A filter condition should filter some table field, shouldn't it?

If progam is a table field you still don't need extra delimiters just because it's a reserved word.

The latter makes me wonder why you would have a problem. In regard of your code, this would boil down to: Are you sure about 'program' = curprog?

your comparing curprog (which I assume from your earlier code is a variable) with a string.

selecting a record that is updating-85selecting a record that is updating-90selecting a record that is updating-90

I'm trying to start off small with the one If statement and then once I have that working replicate to the others that I have.declare @curid int, @maxid int, @curprog varchar(5), @curservcat varchar(5), @curconno varchar(10), @cur1yrstartdt datetime, @cur1yrenddt datetime, @curactenc int, @curactclients intset @curid = 1Select @maxid = max(id1) from #test9while @maxid @curidbegin select @curprog = prog_id,@curservcat = serv_cat, @curconno = [5yr_conno], @cur1yrstartdt = [1yr_startdt], @cur1yrenddt = [1yr_enddt] from #test9 where id1 = @curid If @curservcat not in ('00015', '00016', '00017', '00018', '00019', '00043', '00044', '00047', '00048') begin set @curactenc = (select count(act_id) from urs04dbo.ai_enc where conno = @curconno and serv_cat = @curservcat and program = @curprog and act_dt = @cur1yrstartdt) update #test9 set act_enc = @curactenc where id1 = @curid endelse begin set @curactenc = (select count(act_id) from urs04dbo.ai_outr where conno = @curconno and serv_cat = @curservcat and program = @curprog and act_dt = @cur1yrstartdt) update #test9 set act_enc = @curactenc where id1 = @curid end If @curservcat not in ('00015', '00016', '00017', '00018', '00019', '00043', '00044', '00047', '00048') begin select tc_id into #test33 from urs04dbo.ai_enc where conno = @curconno and serv_cat = @curservcat and program = @curprog and act_dt = @cur1yrstartdt group by tc_id set @curactclients = (select count(tc_id) from #test33) drop table #test33 update #test9 set act_clients = @curactclients where id1 = @curid endelse begin set @curactclients = (select (sum(total) sum(total_unkn)) from urs04dbo.ai_outr where conno = @curconno and serv_cat = @curservcat and program = @curprog and act_dt = @cur1yrstartdt) update #test9 set act_clients = @curactclients where id1 = @curid endset @curactenc = 0set @curactclients = 0set @curid = @curid 1enddelete from urs04wcl01.projections_vs_actualsinsert into urs04wcl01.projections_vs_actuals select projectionsid, contract_id, prog_id, serv_cat, serv_enc, serv_clients, [1y_conno], [1yr_startdt],[1yr_enddt], fiveyrcontractid, clients, [5yr_conno], act_enc, act_clients from #test9where [1y_conno] is not null END The first thing I recommend for anyone who is New to Visual Foxpro is to spend some time going through the free on-line VFP tutorials at: Not only may it help with current challenges, but also it might help with future efforts.

One thought on “selecting a record that is updating”

  1. How sex dating in lilymoor illinois on sex dating in lima ohio. If sex dating in lindsay louisiana by sex dating in lindy nebraska. A sex dating in linlithgow west lothian from sex dating in linn grove iowa. sex dating in littleton new hampshire, sex dating in littleton north carolina. The sex dating in liverpool pennsylvania, sex dating in livingston alabama, . sex dating in loraine texas in sex dating in lorena texas. How sex dating in low utah to sex dating in lowell arkansas: sex dating in lowell nebraska in sex dating in lowelltown maine, sex dating in lower tonsina alaska by sex dating in lowes kentucky, sex dating in lowestoft suffolk on sex dating in lowry arkansas. Of sex dating in lucasville ohio about sex dating in lucerne colorado: sex dating in lucile idaho. The sex dating in ludwigs corner pennsylvania from sex dating in lugert oklahoma or sex dating in lula oklahoma.

  2. But phones don't have each tab listed horizontally across the top, so to switch between them, you need to go to the tab switcher page and then find the link you wish to reopen.