Forum Replies Created

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

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

  • RE: Why is this INSERT returning a recordset

    Has someone perhaps put a trigger on the table?

  • RE: INSERTING INTO A TEMPORARY TABLE OUT PUT OF BATCH QUERIES

    CREATE TABLE #Temp (

    ... -- columns matching output of stored proc

    )

    INSERT INTO #Temp

      EXEC StoredProcedure @Params ...

    The limitation is that the stored proc must return only one reordset.

  • RE: Stored Procedure column names

    Generated at runtime, as far as I know. Makes sense, since sps can return completely different resultsets for different callings.

  • RE: MCDBA - Which Exam?

    Thanks for the comments. I'm leaning towards 70-290. I'll probably do 291 at a later date.

    Yelena: you're right, I don't work for a small company. I work for the corperate...

  • RE: stored procedure question

    The way I wrote that query it should only return one reply per post, unless you have replies with identical dates.

    Can you please post some example data and your...

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