Forum Replies Created

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

  • RE: Guarantee entire flat file loaded

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


    My only thought here is that if you know you have windows formatted files with a \r at the end, you can count these with...

  • RE: derived column error

    arkiboys (1/15/2016)


    Hello,

    Using the foreachloop I loop through excel files to get the filename andthen start loading the data into sql server using oledb...

    1- I get the filename

    2- Then...

  • RE: change dinamically value of parameters inside stored procedure

    simone.hagiu (1/15/2016)


    Hi all,

    Im struggling with a problem here. I have an app with a lot of screens based on an sql database using a lot of stored procedures. The app...

  • RE: Getting SQL Server Error 7303

    jacksonandrew321 (1/14/2016)


    unable to create linked server to access excel file. getting below error while creating linked server:

    Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server...

  • RE: Are the posted questions getting worse?

    GilaMonster (1/14/2016)


    He's asking MySQL questions on a SQL Server site and appears to be about at the level of spelling 'SQL'. I won't be surprised if he asks "What's a...

  • RE: Stop deletes on a table

    krypto69 (1/14/2016)


    Thanks everyone - very intersting input.

    I ended up using:

    CREATE TRIGGER NoDeleteMedicalGroup ON dbo.Medical_Group

    INSTEAD OF DELETE

    AS

    BEGIN

    ROLLBACK;

    END;

    No items in the Medical group table should ever be deleted. So, this...

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

    Jeff Moden (1/14/2016)


    Orlando Colamatteo (1/13/2016)


    Be careful anyway, FORMAT is very slow when compared to other date functions. CONVERT does not contain a style option for the format you need but...

  • RE: Alternative to splitting text

    sqlquaker (1/13/2016)


    You may want to check this article by Aaron Bertrand. He explains various methods to split values in a string separated by delimiter such as #.

    http://sqlperformance.com/2012/07/t-sql-queries/split-strings

    Also check out...

  • 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...

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