Forum Replies Created

Viewing 15 posts - 6,241 through 6,255 (of 8,753 total)

  • RE: Altering table to change datatype

    ramana3327 (1/21/2015)


    Need to change some columns datatype from nvarchar to varchar.

    Just need to drop the indexes that are on that column.

    Do we get any problems from changing nvarchar to varchar

    Here...

  • RE: Using a cursor in Sql trigger

    GilaMonster (1/21/2015)


    Bulk Inserts don't fire triggers. Nothing to do with the trigger code (which, from the looks of things needs a lot of work to optimise it). The Bulk Insert...

  • RE: Are the posted questions getting worse?

    Sioban Krzywicki (1/21/2015)


    Hi everyone,

    I have a bit of an announcement and a question.

    I'm Transgender. I've come out as a woman in nearly every aspect of my life now and am...

  • RE: Convert Iterative query to set based query

    ryanabr (1/21/2015)


    You are the MAN! look me up if you are ever in Minneapolis, I owe you a beer (keg really...) !

    Thanks again!

    No worries, glad to help.

    One of my favourites...

  • RE: Avoid using a Cursor

    Quick suggestion, use FOR XML PATH to concatenate the output into one dynamic sql string

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    IF OBJECT_ID(N'dbo.Control_Table') IS NOT NULL DROP TABLE dbo.Control_Table;

    CREATE TABLE [dbo].[Control_Table](

    [Server_Name] [varchar](50) NOT NULL,

    [Database_Name]...

  • RE: Tally OH! An Improved SQL 8K β€œCSV Splitter” Function

    I've been working on performance tuning and optimization of few special purpose functions which where derived from the DelimitedSplit8K function, wanted to share some of the findings related to the...

  • RE: how to return max from a varchar column

    This is possibly an overkill but can easily be extended

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    DECLARE @SAMPLE_DATA TABLE

    (

    THREE_PART_NUM VARCHAR(50) NOT NULL PRIMARY KEY CLUSTERED

    );

    INSERT INTO @SAMPLE_DATA (THREE_PART_NUM)

    VALUES

    ...

  • RE: how to return max from a varchar column

    Eugene Elutin (1/21/2015)


    ...

    Elementary;-)

    😎

    Not quite so, try ('1.0.100')

    πŸ˜‰

    :pinch:

  • RE: how to return max from a varchar column

    Eugene Elutin (1/21/2015)


    add one more sample and see what will happen:

    ('12.1.1')

    ...

    Elementary;-)

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    DECLARE @SAMPLE_DATA TABLE

    (

    THREE_PART_NUM VARCHAR(10) NOT NULL PRIMARY KEY CLUSTERED

    );

    INSERT INTO @SAMPLE_DATA (THREE_PART_NUM)

    VALUES

    ...

  • RE: how to return max from a varchar column

    Tex-166085 (1/21/2015)


    Hi,

    I need to return the max value from a fieldwhich contains a three part numeric, stored as a varchar. For example

    1.0.0

    1.0.1

    1.1.0

    1.2.1

    2.0.0

    2.1.1

    etc

    These represent processes, and sub tasks. ...

  • RE: using charindex

    Quick solution using the DelimitedSplit8K[/url] function

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    DECLARE @SAMPLE_DATA TABLE

    (

    SD_TEXT VARCHAR(100) NOT NULL

    );

    INSERT INTO @SAMPLE_DATA (SD_TEXT)

    VALUES ('PL:TW RR:1.8%,PL:TX RR:0.9%')

    ;

    ;WITH FIRST_SPLIT AS

    (

    ...

  • RE: select columns from different tables without join

    twin.devil (1/20/2015)


    .. unstoppable urge for asking from OP is WHY πŸ™‚

    One of those $M questions, boils down to trying to apply a technology specific solution to an incompatible problem.

    😎

    pietlinden (1/20/2015)


    ...and...

  • RE: select columns from different tables without join

    wannabe1 (1/20/2015)


    how to join 2 heap tables with out any common fields.

    It depends on the data in those tables and the properties of that data, there aren't any other options...

  • RE: Convert Iterative query to set based query

    Slight changes to accommodate for the multiple "State"

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    declare @temp as table

    (

    ID int identity,

    TS datetime2,

    Speed decimal(4,1),

    IgnitionOn bit

    )

    insert @temp select '1/17/2015 12:00',5,0

    insert @temp select '1/17/2015 12:02',0,0

    insert @temp select '1/17/2015...

  • RE: Are the posted questions getting worse?

    Jeff Moden (1/19/2015)


    Eirikur Eiriksson (1/19/2015)


    Jeff Moden (1/19/2015)


    Jack Corbett (1/19/2015)


    Jeff Moden (1/18/2015)


    Grant Fritchey (1/18/2015)


    WayneS (1/18/2015)


    I'm curious...

    How many folks have a home lab set up with servers?

    How many folks...

Viewing 15 posts - 6,241 through 6,255 (of 8,753 total)