Forum Replies Created

Viewing 15 posts - 7,621 through 7,635 (of 8,756 total)

  • RE: How do I loop through rows and populate data?

    You might want to try something like this:

    😎

    USE tempdb;

    GO

    CREATE TABLE dbo.TBL_PLANT

    (

    PLANT_ID INT IDENTITY(1,1) NOT NULL CONSTRAINT PK_DBO_PLANT_PLANT_ID PRIMARY KEY CLUSTERED

    ,PLANT...

  • RE: Converting Hour and Minute to Decimal

    Quick solution, returns the hour + time fraction (minutes and seconds / 3600)

    😎

    USE tempdb;

    GO

    DECLARE @DATE_VAL DATETIME = '2014-07-29 08:16:31.000'

    SELECT @DATE_VAL

    SELECT DATEPART(HOUR,@DATE_VAL) + (DATEDIFF(SECOND,'00:00:00.000',DATEADD(HOUR, - DATEPART(HOUR, CONVERT(time(3),@DATE_VAL)),CONVERT(time(3),@DATE_VAL))) / 3600.0)

    Result

    8.275277

    Edit: Oops, feel...

  • RE: DBA vs Developer

    Sean Pearce (8/2/2014)


    GilaMonster (8/1/2014)


    Sean, do you have the actual execution plan for comparison? I've seen obscene row estimations before, I suspect caused by the optimiser thinking that a one-to-many join...

  • RE: Get next 2 weeks

    Daniel Matthee (8/2/2014)


    Please give your feeling about this method

    Although your code works fine, it wouldn't be my first choice as if the OP could change the schema, normalizing the data...

  • RE: Update row Beginning Balance with Prev Row Trial_Balance

    jameslauf (8/1/2014)


    Fixed my CODE and attaching Excel sheet to show desired output. see column N, O, P for results.

    Looking at the expected results prompts few questions:

    😎

    1. Is this dataset for...

  • RE: Get next primary key without identity

    Just a quick thought on the problem, why not use the ROWLOCK hint?

    To try it out, run the create script first and then the Update and the Select code...

  • RE: Trouble using proxy to run SSIS pacakage

    Elizabeth.Block (8/1/2014)


    I'm sorry, I don't know what you mean. Can you give me more information?

    Unfortunately I do not have BIDS 2K8 at hand so I'm going by my gay cell...

  • RE: SSIS - Dynamic XML Configuration File Path while running the Package

    windows_mss (8/1/2014)


    I'm using VS 2008 BIDS.

    No option to do dynamic file config from within the package then, either dynamically modified/created package or database configuration are your best bets. If you...

  • RE: Trouble using proxy to run SSIS pacakage

    Quick thought, what are the security properties of the package? Have you tried initiating the download from the application server using the package runtime credentials?

    😎

  • RE: Trace Updated records

    Using a trigger is probably the most straight forward approach, if you add a table holding the primary key value and a date, then you can use the output clause...

  • RE: SSIS - Dynamic XML Configuration File Path while running the Package

    windows_mss (8/1/2014)


    Hi,

    I have done with the SSIS Package and it's working as expected in my local machine, I have one problem is that how I can give my XML configuration...

  • RE: Cannot be perform write operation in database sql server 2008 r2

    As Lynn said, give us something to work with! My guess is that Grant is dead on, just in case, check free space on all relative volumes, auto growth limits/settings,...

  • RE: Adding unique int key using max

    tshad (8/1/2014)


    That worked fine.

    Not sure what this means:

    ROW_NUMBER() OVER (ORDER BY (SELECT NULL))

    How does that work?

    This adds an incremental number to the output, by stating (SELECT NULL), one indicates that...

  • RE: handle resultset in SP

    The code below demonstrates how to use output parameters in a stored procedure

    😎

    CREATE PROCEDURE dbo.WasInsertSuccessfulQuestionMark

    (

    @ValueToInsert INT

    ,@ThisTellsMeIfSuccessful INT OUTPUT

    )

    AS

    /*

    usage

    ...

  • RE: Update is Slow in SQL server 2014

    Quick question, do you need assistance providing the necessary information.

    😎

Viewing 15 posts - 7,621 through 7,635 (of 8,756 total)