Forum Replies Created

Viewing 15 posts - 136 through 150 (of 182 total)

  • RE: Insert fails

    I'd be interested in knowing how to reference either result in an ado recordset.

  • RE: help needed with a set based update

    --this code will set up the test data set

    DROP TABLE [mytable]

    GO

    CREATE TABLE [mytable] (

    [barcode] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,

    [datetimestamp] [datetime] NOT NULL ,

    [myflag] [bit] NULL ,

    CONSTRAINT [PK_mytable] PRIMARY...

  • RE: Execute a large text string

    maybe use a cursor to concat into a varchar() variable

  • RE: help needed with a set based update

    sorry dude...I was in a bit of a hurry yesterday, so I wasn't able to get all my thoughts clear or do any testing. I try to understand code...

  • RE: Scalar Function PRoblem

    --Your IsNull is in the wrong spot

    CREATE FUNCTION dbo.CurrentRevisionNo

    (

    @DocumentID int

    )

    RETURNS int

    AS

    BEGIN

    RETURN

    (

    SELECT ISNULL(MAX(RevNo),0) AS CurrentRev

    FROM dbo.tblRevision

    WHERE (DocumentID = @DocumentID)

    )

    END

    GO

    SELECT

    DocumentID,

    dbo.CurrentRevisionNo(DocumentID) CurrentRevNo,

    dbo.CurrentRevisionNo(DocumentID) + 1 AS NextRevNo

    FROM tblDocuments

  • RE: usp stored procedure prefix

    good information to know, Michelle. thank you.

  • RE: help needed with a set based update

    24/4 = 6

    0:00-5:59 = period 1

    6:00-11:59 = period 2

    etc.

    try on your cursor loop...

    10:58 <--gets flag

    12:01 <-- min in time group, but no flag

    17:58 <--should get flag but doesn't

  • RE: usp stored procedure prefix

    If I wrote the application and created a view called "customers", and then you came in and you were trying to learn the system.... You would think Customers was...

  • RE: usp stored procedure prefix

    it matters when you're in a team environment. are you selecting from a view or from a table?

  • RE: how to move data

    step 1: create a mirror table with NO key.

    step 2: insert distinct records into new table

    INSERT INTO t2

    SELECT DISTINCT key1, f2, f3

    FROM t1

    step 3: query to find dupes/repeats with...

  • RE: Mulitple entries for one Parameter

    I have 2 ways I do this...

    WHERE ISNULL(@EmployeeID, tbl.EmployeeID) = tbl.EmployeeID

    --using null is cleaner in SQL, but a pain to extract from the drop down.

    WHERE CASE @EmployeeID

    WHEN...

  • RE: help needed with a set based update

    Sorry Jesper...I didn't notice the Left Join in your Sub Query. I think that does the same thing in a loop that I did in my first post (which...

  • RE: help needed with a set based update

    I agree with Fred. If you want an approximation, there's a few quick fixes. I just figure, if you're going to do it only one time, then do...

  • RE: usp stored procedure prefix

    hey Jeff...

    Is Customer a view or table?

  • RE: covert numeric (19,5) to string (10,4)

    This is what DTS is good for. You can use a vb script on a datapump for that particular column.

Viewing 15 posts - 136 through 150 (of 182 total)