Forum Replies Created

Viewing 15 posts - 49,336 through 49,350 (of 49,571 total)

  • RE: Temp Tables and Dynamic SQL

    Why a gobal temporary table?

  • RE: Temp Tables and Dynamic SQL

    Why do you not know what database the table is in?

    Could you expalin in a bit more detail the situation and what you're trying to do?

  • RE: URGENT help with statement please

    Select * from tbl

     where ID IN (SELECT ID FROM tbl WHERE transaction='1000')

     AND ID IN (SELECT ID FROM tbl WHERE transaction='2000')

    Messy, but it'll work

  • RE: Temp Tables and Dynamic SQL

    If you're using temp tables in order to get values out of dynamic sql, look at sp_executesql. It lets you pass parameters to dynamic sql, both input and output parameters.

  • RE: performance and number of variables in Triggers

    Triggers should be as small as possible. I shudder at the thought of anythihng (especially a trigger) that requires that many variables.

    > is it the right way to programm the...

  • RE: cursor Help

    Why are you using a cursor?

    UPDATE #Sales

     SET sQty = Agg.qty, Jan=Agg.jan, Feb=Agg.feb

     FROM (SELECT    

      product,

      SUM(qty) AS qty,

      SUM(CASE WHEN MONTH(invoice_date) =...

  • RE: 1 Record From Each Group

    This should work. It will always return

    Cat Pet

    Jack Owner

    SELECT Min(Name), Type FROM tbl GROUP BY Type

    You can use Max and that'll return John and Monkey

  • RE: Memory Problem

    Do you have AWE switched on? What's sql's memory settings? Dynamic or fixed maximum?

    What's the CPU utilisation like? Disk IOs? Network card queue length?

    Locking? Index usage vs table scans?

    There's a...

  • RE: Do loops to recreate indentity tags

    If the ids are plain numeric, define the id column on the new table as an identity and don't put any values into it. SQL will assign identity values automatically...

  • RE: Validate string

    No, but users do enter values.

    eg. User selects to filter on company code and lists companies 'ABC123','DEF789','XYZ000'

    or, he selects company name and would like to do a wildcard match for...

  • RE: Validate string

    OK, a few things that maybe weren't clear.

    I'm rewriting this proc because it's a performance hog. I didn't write the code in the first place. I hate cursors.

    The app's a...

  • RE: conversion error

    Another example is the JobHistory table in the msdb database where the job start datetime is in two columns: "date" is recorded as an integer and "time" is a seperate...

  • RE: conversion error

    Personally I'd suggest converting the time into seconds and storing as number of seconds. It can be converted back to hh:mm:ss for display purposes easily enough

    SELECT CAST(SUBSTRING(WCVideoAmount,1,2) As INT)*3600 +...

  • RE: help with subqueries

    I don't know why you're using a subquery for this...

    SELECT itaps_users.username, itaps_users.id,  itaps_rights.RAENID

    FROM itaps_users INNER JOIN itaps_rights on itaps_users.id=itaps_rights.userID

    WHERE itaps_rights.RAENID=3

  • RE: Question of the Day for 03 Nov 2005

    I don't think so.

    The UMS relies on threads been cooperative - voluntarily yielding the processor to another thread.

    The windows scheduler doesn't rely on any behaviour from the thread but...

Viewing 15 posts - 49,336 through 49,350 (of 49,571 total)