Forum Replies Created

Viewing 15 posts - 1 through 15 (of 26 total)

  • RE: Computed Column weirdness

    I posed this question mid-way through another thread about a week ago and Paul gave me the following reply this morning.

    Note that this is straight from the other thread and...

  • RE: query optimizing

    Paul-

    Thanks for the input! This has been bothering me for a while now. This makes sense though, we had a sneaking suspicion that this may...

  • RE: Rows in a table

    For the first question, look up ROW_NUMBER(), you should be able to apply it to a query pretty easily.

    For the second, i'm not too sure what exactly you're looking for...

    BUT,...

  • RE: TSQL query

    Minaz,

    FETCH NEXT FROM RepliesCUR into @cat,@subcat,@topic,@sub,@body

    Set @tid = (select topic_id

    from phpbb_topics

    where Forum_id =@subid

    and topic_title =@topic)

    insert into phpbb_posts(forum_id,topic_id,post_subject,post_text)

    values (@subid,@tid,@sub,@body)

    It looks like the select is not returning any values in your table...

  • RE: query optimizing

    While we're on the topic of computed columns and execution plans, I have a question that has been nagging at me.

    If you check out the execution plan of the last...

  • RE: query optimizing

    Wow.. that really took me by surprise, i didn't expect that!

    I see what you're saying about the sorting after the math is done and not just sorting the column- but...

  • RE: query optimizing

    mtassin (10/8/2009)


    It's not the Order by so much as the ABS function in the Order by I'm pretty sure.

    But wouldn't it only need to ABS() the rows that meet the...

  • RE: query optimizing

    Jeff- Thanks for the follow up, good to know I wasn't too far off 🙂

    I do have a question though- why would the order by cause a scan on the...

  • RE: query optimizing

    where ((avg_cost - std_cost)*in_stock >= @a

    or (avg_cost - std_cost)*in_stock <= -1* @a)

    will cause a scan every time, as well as the computation.

    I don't know...

  • RE: Dates and previous Date and average daily gain

    Troy,

    I'm a litte fuzzy on what exactly you need done here. The attached script is assuming that you're looking for an animal's ADG over every...

  • RE: SQL Query

    I agree that this looks a lot like homework, but I'll bite and at least give you a couple functions to look into.

    Note that this is taking some guesses as...

  • RE: Insert into multiple rows, autonumber headache

    Dunster-

    From what I understand you've got the following: A table that ends at say 20,000 in an "identity column" and you'd like to start from...

  • RE: Insert into multiple rows, autonumber headache

    EDIT: Another instance of me typing faster than I can think. Sorry.

  • RE: Cannot insert PK higher than 10

    Definitely an odd problem, as for why the 10 is showing up after the 1, it looks like since you've got it set to a char, it's sorting it in...

  • RE: Wierd Join--Is this possible?

    EDIT: Misread what lmu was saying

Viewing 15 posts - 1 through 15 (of 26 total)