Click here to Skip to main content
15,886,017 members
Home / Discussions / Database
   

Database

 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Eddy Vluggen30-Apr-18 8:13
professionalEddy Vluggen30-Apr-18 8:13 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Jörgen Andersson25-Apr-18 2:15
professionalJörgen Andersson25-Apr-18 2:15 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
JChrisCompton25-Apr-18 5:47
JChrisCompton25-Apr-18 5:47 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Jörgen Andersson25-Apr-18 10:49
professionalJörgen Andersson25-Apr-18 10:49 
PraiseRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
JChrisCompton26-Apr-18 4:17
JChrisCompton26-Apr-18 4:17 
QuestionEXCEPTIONS INTO Equivalent for SQL Server Pin
User 1205041720-Apr-18 4:59
User 1205041720-Apr-18 4:59 
AnswerRe: EXCEPTIONS INTO Equivalent for SQL Server Pin
Eddy Vluggen23-Apr-18 5:21
professionalEddy Vluggen23-Apr-18 5:21 
GeneralRe: EXCEPTIONS INTO Equivalent for SQL Server Pin
User 1205041723-Apr-18 5:24
User 1205041723-Apr-18 5:24 
Questionhow to access temp table field in subquery? Pin
joost.versteegen11-Apr-18 21:43
joost.versteegen11-Apr-18 21:43 
AnswerRe: how to access temp table field in subquery? Pin
Victor Nijegorodov11-Apr-18 22:18
Victor Nijegorodov11-Apr-18 22:18 
AnswerRe: how to access temp table field in subquery? Pin
Mycroft Holmes11-Apr-18 23:42
professionalMycroft Holmes11-Apr-18 23:42 
GeneralRe: how to access temp table field in subquery? Pin
joost.versteegen11-Apr-18 23:53
joost.versteegen11-Apr-18 23:53 
AnswerRe: how to access temp table field in subquery? Pin
Richard Deeming19-Apr-18 2:34
mveRichard Deeming19-Apr-18 2:34 
QuestionExporting Select statement values into csv with escape characters Pin
indian1439-Apr-18 12:16
indian1439-Apr-18 12:16 
AnswerRe: Exporting Select statement values into csv with escape characters Pin
Victor Nijegorodov9-Apr-18 20:27
Victor Nijegorodov9-Apr-18 20:27 
QuestionReading csv file data using selecte statement Pin
indian1439-Apr-18 6:50
indian1439-Apr-18 6:50 
AnswerRe: Reading csv file data using selecte statement Pin
Victor Nijegorodov9-Apr-18 8:37
Victor Nijegorodov9-Apr-18 8:37 
GeneralRe: Reading csv file data using select statement Pin
indian14311-Apr-18 9:18
indian14311-Apr-18 9:18 
hi,

I don't have permissions to run the open rowset and it needs the format file creation, I tried creating the format file, but some reason its not letting me do it.

I tried the same using the SSIS package, problem is its giving me error as below:
Error: 0xC0202055 at Data Flow Task 1, Source - ProviderDetails_csv [61]: The column delimiter for column "Column 18" was not found.
Error: 0xC0202092 at Data Flow Task 1, Source - ProviderDetails_csv [61]: An error occurred while processing file "C:\xxxxxxx\OPS\ProviderODS-ScriptsAndData\ProviderDetails.csv" on data row 542006.
Error: 0xC0047038 at Data Flow Task 1, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on Source - ProviderDetails_csv returned error code 0xC0202092.  The component returned a failure code when the 

But when I trying to import using
if not exists (select * from sysobjects where name='Import_21Columns' and xtype='U')
    CREATE TABLE Import_21Columns(
    [Column 0] <a href="max">varchar</a> NULL,
    [Column 1] <a href="max">varchar</a> NULL,
    [Column 2] <a href="max">varchar</a> NULL,
    [Column 3] <a href="max">varchar</a> NULL,
    [Column 4] <a href="max">varchar</a> NULL,
    [Column 5] <a href="max">varchar</a> NULL,
    [Column 6] <a href="max">varchar</a> NULL,
    [Column 7] <a href="max">varchar</a> NULL,
    [Column 8] <a href="max">varchar</a> NULL,
    [Column 9] <a href="max">varchar</a> NULL,
    [Column 10] <a href="max">varchar</a> NULL,
    [Column 11] <a href="max">varchar</a> NULL,
    [Column 12] <a href="max">varchar</a> NULL,
    [Column 13] <a href="max">varchar</a> NULL,
    [Column 14] <a href="max">varchar</a> NULL,
    [Column 15] <a href="max">varchar</a> NULL,
    [Column 16] <a href="max">varchar</a> NULL,
    [Column 17] <a href="max">varchar</a> NULL,
    [Column 18] <a href="max">varchar</a> NULL,
    [Column 19] <a href="max">varchar</a> NULL,
    [Column 20] <a href="max">varchar</a> NULL 
) 

if not exists (select * from sysobjects where name='Import_18Columns' and xtype='U')
    CREATE TABLE [Import_18Columns](
    [Column 0] <a href="max">varchar</a> NULL,
    [Column 1] <a href="max">varchar</a> NULL,
    [Column 2] <a href="max">varchar</a> NULL,
    [Column 3] <a href="max">varchar</a> NULL,
    [Column 4] <a href="max">varchar</a> NULL,
    [Column 5] <a href="max">varchar</a> NULL,
    [Column 6] <a href="max">varchar</a> NULL,
    [Column 7] <a href="max">varchar</a> NULL,
    [Column 8] <a href="max">varchar</a> NULL,
    [Column 9] <a href="max">varchar</a> NULL,
    [Column 10] <a href="max">varchar</a> NULL,
    [Column 11] <a href="max">varchar</a> NULL,
    [Column 12] <a href="max">varchar</a> NULL,
    [Column 13] <a href="max">varchar</a> NULL,
    [Column 14] <a href="max">varchar</a> NULL,
    [Column 15] <a href="max">varchar</a> NULL,
    [Column 16] <a href="max">varchar</a> NULL,
    [Column 17] <a href="max">varchar</a> NULL,
    [Column 18] <a href="max">varchar</a> NULL
) 

if not exists (select * from sysobjects where name='Import_4Columns' and xtype='U')
    create table Import_4Columns (
        [Column 0] varchar(max) null
        , [Column 1] varchar(max) null<br />
        , [Column 2] varchar(max) null
        , [Column 3] varchar(max) null
)

if not exists (select * from sysobjects where name='Import_2Columns' and xtype='U')
    create table Import_2Columns (
        [Column 0] varchar(max) null
        , [Column 1] varchar(max) null<br />
)

truncate table Import_21Columns
SET QUOTED_IDENTIFIER OFF
BULK INSERT Import_21Columns FROM 'D:\Users\Abdul\Provider.csv' WITH (FIELDTERMINATOR = '","', ROWTERMINATOR = '\n') 

with FIELDTERMINATOR = ',' I tried both the FIELDTERMINATOR values

Its putting couple of new rows into one single column which is not an expected behavior, the openrowset is giving me linked server error means the dbas are not allowing developers to run certain sql commands. any help please.

Thanks,

Abdul Aleem

"There is already enough hatred in the world lets spread love, compassion and affection."
Questionwriting complex queries in Sql Pin
emilyz788-Apr-18 8:42
emilyz788-Apr-18 8:42 
Questionwriting complex queries in Sql Pin
emilyz788-Apr-18 8:42
emilyz788-Apr-18 8:42 
AnswerRe: writing complex queries in Sql Pin
Mycroft Holmes8-Apr-18 12:57
professionalMycroft Holmes8-Apr-18 12:57 
AnswerRe: writing complex queries in Sql Pin
CHill608-Apr-18 23:33
mveCHill608-Apr-18 23:33 
AnswerRe: writing complex queries in Sql Pin
Eddy Vluggen9-Apr-18 2:16
professionalEddy Vluggen9-Apr-18 2:16 
QuestionConfiguring multiple properties or values in SSIS Package using Package Configuration file Pin
indian1432-Apr-18 14:18
indian1432-Apr-18 14:18 
QuestionTrying to insert values into Table Variable in Dynamic Sql Pin
indian1432-Apr-18 13:17
indian1432-Apr-18 13:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.