Viewing 15 posts - 16 through 30 (of 30 total)
Greg, this may DROP the constraints but I cant see how I can re-create them afterwards.
December 18, 2003 at 10:17 am
thanks davidt. works fine and looks more effiecient.
December 2, 2003 at 6:03 am
Thanks GRN and DavidBurrows, both solutions work very well.
I am a little surprised that
exec ('alter TABLE #temptable add TEMPCOL int identity (1,1) NOT NULL ')
works diferently to
alter TABLE...
November 25, 2003 at 5:31 am
I had a similar problem before. I slved it by doing the following in a stored procedure:
SELECT datepart(mm,date_requested) as my_month, datepart(year,date_requested) as the_year,count(date_requested) as my_count
into #temp_table
from accident_reg group by...
November 24, 2003 at 2:38 pm
thanks npeeters. Looks like we have to live with it.
strange that this is so as it seems so straightforward to do:
select
gym + park + hall as mysum,
3 * mysum...
September 8, 2003 at 1:46 pm
ok.
Thanks for your help. Much appreciated.
September 5, 2003 at 2:47 am
quote:
Garythanks for your reply
I took your advice and, with a similar version of your code:
SELECT
o.organisation_shortname as org_shortname,
sum(q.media_cost_per_pos) as tot_media_cost,
sum(q.prod_cost_per_pos) as tot_prod_cost
FROM...
September 4, 2003 at 12:23 pm
???
but you just dropped both WHERE clauses
???
I think I need the where criteria
-- Are saying to put the WHERE claus at the end ie:
SELECT
dbo.organisations.organisation_shortname as org_shortname,
sum(dbo.qry_positions_with_costs.media_cost_per_pos) as tot_media_cost,
sum(dbo.qry_positions_with_costs.prod_cost_per_pos) as...
September 4, 2003 at 11:21 am
i think that I sorted the problem [see script below] by using 2 select statements: a. SELECT INTO a temp table
b. doing a SUM on the temp table
if there is...
September 3, 2003 at 7:36 am
thank you both for excellent answers.
However where it fails though, is because I have to repeat the FROM clause. In the above example I really simplified my FROM clause....
September 3, 2003 at 2:53 am
Viewing 15 posts - 16 through 30 (of 30 total)