Forum Replies Created

Viewing 15 posts - 3,976 through 3,990 (of 8,753 total)

  • RE: Alternative to splitting text

    imba (1/13/2016)


    Hello,

    I am in need of some assistance. I have a column that have values that look like this:

    111#222#33333#44#555#66

    The length of the values can change. I...

  • RE: how to Select getdate () in yyyy/M format ?

    sushantkatte (1/13/2016)


    I want to select getdate() in the format yyyy/M. i tried to write a query as SELECT FORMAT(GETDATE(),'yyyy/M') but it is giving me error.I am a beginner in sql....

  • RE: Stop deletes on a table

    Eric M Russell (1/13/2016)


    But an INSTEAD OF DELETE trigger will prevent anything (users, stored procedures, the DBA) from completing delete operations on the table. Is that what you really want?

    If...

  • RE: Stop deletes on a table

    abdullah.zarour (1/13/2016)


    Hello This is a sample empty code body for your reference :

    CREATE TRIGGER DeleteMedicalGroup ON dbo.MedicalGroup

    INSTEAD OF DELETE

    AS

    BEGIN

    ROLLBACK;

    END;

    Don't do this, the rollback is neither needs...

  • RE: Stop deletes on a table

    Quick example

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

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

    CREATE TABLE dbo.TBL_TEST_DELETE_TRIGGER

    (

    TDT_ID INT IDENTITY(1,1) NOT NULL CONSTRAINT PK_DBO_TBL_TEST_DELETE_TRIGGER_TDT_ID PRIMARY...

  • RE: Stop deletes on a table

    Hugo Kornelis (1/13/2016)


    You probably have users that have dbo rights. Those bypass all security checks. (Or users do the deletes through stored procedures that are owned by the table owner,...

  • RE: distinct from STUFF

    Quick untested guess

    😎

    SELECT DISTINCT t1.ProjectUID,t1.BWF , t1.Deliverable ,

    --Supressed data columns

    STUFF(

    (SELECT DISTINCT ', ' + (t2.[GeoMarket])

    FROM #deploys t2

    where t1.ProjectUID = t2.ProjectUID AND t1.BWF = t2.BWF AND t1.Deliverable = t2.Deliverable

    FOR...

  • RE: Row Number in SQL Server - need certain rows only

    monilps (1/13/2016)


    I am sorry about that, later on I just realized it. I will be careful next time.

    Didn't meant to waste anyone time.

    No, this is similar but not the same....

  • RE: Row Number in SQL Server - need certain rows only

    monilps (1/13/2016)


    Hi,

    I have updated below table:

    Col1Col2 Col3 Col4 RowNumber

    123AX ...

  • RE: Row Number in SQL Server - need certain rows only

    monilps (1/13/2016)


    Hi,

    I have below table:

    Col1Col2 Col3 RowNumber

    123AXC 12/1/2015 1

    123AXCVV 12/1/20152

    345XSW 12/5/20151

    345XSW-SE12/5/20152

    567ERW ...

  • RE: Today's Random Word!

    crookj (1/13/2016)


    Grumpy DBA (1/13/2016)


    djj (1/13/2016)


    DonlSimpson (1/13/2016)


    Girl

    Tatoo

    Dragon

    Tiamat

    Fáfnir

  • RE: CROSS APPLY on named sets

    SQLRNNR (1/13/2016)


    Jacob Wilkins (1/13/2016)


    edwardwill (1/13/2016)


    Jacob Wilkins (1/13/2016)


    edwardwill (1/13/2016)


    Eirikur Eiriksson (1/12/2016)


    SQLRNNR (1/12/2016)


    I dunno about the "correct" answer on this one. The statements compile for me but produce an error at run-time....

  • RE: Guarantee entire flat file loaded

    Jeff Moden (1/13/2016)


    Even with this, you still have a bit of the "mouse guarding the cheese". The only true method of knowing how many rows should be in a...

  • RE: Guarantee entire flat file loaded

    Steve Jones - SSC Editor (1/13/2016)


    I think you'd need a separate process that counts rows, knowing what a "row" is in the file format as a

    delimiter.

    You can look for...

  • RE: Guarantee entire flat file loaded

    How big are these files? One option is to load the file into a variable using t-sql and openrowset, then count the lines by comparing the length against the length...

Viewing 15 posts - 3,976 through 3,990 (of 8,753 total)