Viewing 10 posts - 1 through 10 (of 10 total)
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...
January 2, 2012 at 3:43 am
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...
January 2, 2012 at 3:31 am
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...
January 2, 2012 at 3:20 am
--- File Data---
1,James,
2,bk,
3,
-----------------
Query:
BULK INSERT CSVTest
FROM '\\vmvertex11\import\sample.txt'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '',
ERRORFILE = '\\vmvertex11\import\Error'
)
---
2...
January 2, 2012 at 2:54 am
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...
January 2, 2012 at 2:17 am
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...
January 2, 2012 at 1:35 am
Hi Dev,
thanks for the reply.
I have already tried *r*n approach in delimiter.
But it does not work.
Thanks again!
January 2, 2012 at 12:04 am
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...
April 16, 2007 at 3:08 am
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
--...
April 2, 2007 at 6:31 am
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=...
March 20, 2007 at 4:03 am
Viewing 10 posts - 1 through 10 (of 10 total)