Forum Replies Created

Viewing 15 posts - 7,846 through 7,860 (of 8,760 total)

  • RE: In control flow: how to create date time stamp to use in downstream tasks.

    You can use an ExecuteSql task with a query that returns the date time string, here are two of quite few options.

    😎

    SELECT CONVERT(VARCHAR(32),GETDATE(),112)

    ...

  • RE: Cursors

    Just throwing in my 2 cents here, some different looping and different type of cursors. Note that the STATIC cursor is the fastest of the lot.

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    DECLARE @SAMPLE_SIZE...

  • RE: The "Numbers" or "Tally" Table: What it is and how it replaces a loop.

    Jeff Moden (7/10/2014)


    Performance test code?

    Firstly, apologies for the late response, slightly busy period:-D

    I am not going to even bother with the code I posted earlier, it doesn't stand a chance;...

  • RE: How to call a stored proc once per each row of a table, without using CURSOR

    From what I can gather, there is no need for a cursor. It can change depending on the actual work required!

    😎

    USE tempdb;

    GO

    IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.ROUTINES

    ...

  • RE: Insert text in a text field

    Claudio Pinto (7/12/2014)


    Thanks a lot Eirikur 🙂

    You are welcome Claudio;-)

    😎

    You should anyway look into replacing the text data type, as according to MSDN "ntext , text, and image data types...

  • RE: Insert text in a text field

    First a quick question, why use [text] data type? Better change that to a (n)varchar(max)!

    Below is a quick example of the replace function (on varchar(max)), does not work on text.

    😎

    USE...

  • RE: Splitting time span into multiple entries

    Just a quick thought on this problem; there is no need for any string manipulation.

    😎

    DROP TABLE #Sample

    CREATE TABLE #Sample (Startdate DATE, [start-time] INT, [end-time] INT, duration INT)

    INSERT INTO #Sample (Startdate,...

  • RE: The "Numbers" or "Tally" Table: What it is and how it replaces a loop.

    More for fun but fitting the discussion, kind of before and after:-D

    😎

    Before

    create function sys.fn_numberOf1InBinaryAfterLoc (@byte binary, @loc int)

    returns int

    as

    begin

    declare @index int, @mark-3 int, @counter int

    ...

  • RE: OpenRowset Issue

    What are the data types of the stored procedure's parameters? Is it possible that the @IdEmployee is a character type?

    Better yet, can you post the procedure code (remove any sensitive...

  • RE: OpenRowset Issue

    Quick question, can you do a normal select with the same openrowset statement, something like select * from sysobject?

    😎

  • RE: OpenRowset Issue

    KGJ-Dev (7/9/2014)


    When i execute the above query here is the error am getting

    Msg 7357, Level 16, State 2, Line 1

    Cannot process the object "

    ...

  • RE: Are the posted questions getting worse?

    Koen Verbeeck (7/9/2014)


    GilaMonster (7/9/2014)


    WHERE Coalesce(NotNullableColumn,-1) = 0

    and CategoryID = @CategoryID

    Group By CategoryID

    ......

    Imo there is not necessarily something wrong with the group by.

    The coalesce on the other hand is for people...

  • RE: Compress table timelines

    Alan.B (7/9/2014)


    Eirikur Eiriksson (7/8/2014)


    No need to complicate things, the only thing needed here is correct window specification for the row_number function.

    😎 ...This brings the cost of execution for this...

  • RE: Are the posted questions getting worse?

    Luis Cazares (7/9/2014)


    GilaMonster (7/9/2014)


    WHERE Coalesce(NotNullableColumn,-1) = 0

    and CategoryID = @CategoryID

    Group By CategoryID

    ......

    What where they thinking? They need to use ISNULL to preserve the data type from the column. :hehe:

    Do you...

  • RE: Maximum Tenancy Ref

    Quick question, do you have some sample data?

    😎

Viewing 15 posts - 7,846 through 7,860 (of 8,760 total)