Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)

  • RE: BULK INSERT - Limitation ?

    Yep, currently I am going with approach 2 that you suggested ! that is

    "Put case with explanations in front of your customer / management."

    Lets see how it goes 🙂

    Thanks for...

  • RE: BULK INSERT - Limitation ?

    Yes, it is not able find end of line.

    But I can't tell this reason to User who is importing this file.

    There should be some way to read this also ?

    OR...

  • RE: BULK INSERT - Limitation ?

    Yep, understood your comments.

    Is there any solution for

    --- Data in Sample.text (NOTICE: NO at the end of file & NO data at last row last column) --

    1,James,

    2,BK,

    ------- End of data----

    It...

  • RE: BULK INSERT - Limitation ?

    --- File Data---

    1,James,

    2,bk,

    3,

    -----------------

    Query:

    BULK INSERT CSVTest

    FROM '\\vmvertex11\import\sample.txt'

    WITH

    (

    FIELDTERMINATOR = ',',

    ROWTERMINATOR = '',

    ERRORFILE = '\\vmvertex11\import\Error'

    )

    ---

    2...

  • RE: BULK INSERT - Limitation ?

    Yep, verified that error file is created or not.

    Case 1:

    Added incorrect data (format) in file.

    Error file got created.

    Case 2:

    Valid data with 3 rows as

    BULK INSERT CSVTest

    FROM '\\mymachine\import\sample.txt'

    WITH

    (

    FIELDTERMINATOR = ',',

    ROWTERMINATOR...

  • RE: BULK INSERT - Limitation ?

    Hi Dev,

    Thanks for the reply.

    I have tried your suggestion to ERRORFILE in sql query.

    But as import is getting executed successfully, file is not getting created.

    File is getting created when there...

  • RE: BULK INSERT - Limitation ?

    Hi Dev,

    thanks for the reply.

    I have already tried *r*n approach in delimiter.

    But it does not work.

    Thanks again!

  • RE: SQL puzzle

    create TABLE xyz

    (

    id_xyz int

    )

    DROP TABLE pqr

    CREATE TABLE pqr

    (

    id_pqr int

    )

    INSERT INTO xyz VALUES (101)

    INSERT INTO pqr VALUES (101)

    INSERT INTO xyz VALUES (102)

    INSERT INTO pqr VALUES (102)

    INSERT INTO xyz VALUES (103)

    INSERT...

  • RE: Query HELP

    If you have alredy designed Table B then

    First you create temp table as

    Create table #TempTable

    ( ID identity(1,1)

    Name varchar(50)

    )

    -- This will insert data into  #TempTable

    insert into #TempTable(Name)

    select [Name]

    from TableA

    --...

  • RE: Tricky Join Question

    DECLARE @SaleId  int

    SET  @SaleId=3

    SELECT    TOP 1 'Final answers is:  '+ convert(varchar,C1.Cost)

    FROM       #CostHist C1,#CostHist C2

    WHERE     (C1.CostDate<>C2.CostDate)

     AND

     (

      (SELECT SaleDate FROM #sales WHERE SaleId=...

Viewing 10 posts - 1 through 10 (of 10 total)