Forum Replies Created

Viewing 15 posts - 16 through 30 (of 30 total)

  • RE: Rebuild fk constraints?

    Greg, this may DROP the constraints but I cant see how I can re-create them afterwards.

  • RE: DTS Failure (fk constraint)

    thanks greg

  • RE: an ugly way of counting

    thanks davidt. works fine and looks more effiecient.

  • RE: Invalid column

    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...

  • RE: Sum of the count

    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...

  • RE: Obese log file

    thanks Jonathan. very informative.

  • RE: Obese log file

    thanks dragon_1973

  • RE: Obese log file

    thanks yogi

  • RE: Obese log file

    Thanks for your answers. All sorted now.

  • RE: Repeating Formulae

    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...

  • RE: Where are you? Where are you?

    ok.

    Thanks for your help. Much appreciated.

  • RE: Where are you? Where are you?

    quote:


    Gary

    thanks 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...

  • RE: Where are you? Where are you?

    ???

    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...

  • RE: A SUM problem

    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...

  • RE: A SUM problem

    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....

Viewing 15 posts - 16 through 30 (of 30 total)