Click here to Skip to main content
15,394,193 members
Home / Discussions / Database
   

Database

 
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
Memberjoost.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
Memberindian1439-Apr-18 12:16 
AnswerRe: Exporting Select statement values into csv with escape characters Pin
Victor Nijegorodov9-Apr-18 20:27
MemberVictor Nijegorodov9-Apr-18 20:27 
QuestionReading csv file data using selecte statement Pin
indian1439-Apr-18 6:50
Memberindian1439-Apr-18 6:50 
AnswerRe: Reading csv file data using selecte statement Pin
Victor Nijegorodov9-Apr-18 8:37
MemberVictor Nijegorodov9-Apr-18 8:37 
GeneralRe: Reading csv file data using select statement Pin
indian14311-Apr-18 9:18
Memberindian14311-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
Memberemilyz788-Apr-18 8:42 
Questionwriting complex queries in Sql Pin
emilyz788-Apr-18 8:42
Memberemilyz788-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
Memberindian1432-Apr-18 14:18 
QuestionTrying to insert values into Table Variable in Dynamic Sql Pin
indian1432-Apr-18 13:17
Memberindian1432-Apr-18 13:17 
AnswerRe: Trying to insert values into Table Variable in Dynamic Sql Pin
Mycroft Holmes2-Apr-18 14:22
professionalMycroft Holmes2-Apr-18 14:22 
GeneralRe: Trying to insert values into Table Variable in Dynamic Sql Pin
indian1433-Apr-18 7:49
Memberindian1433-Apr-18 7:49 
AnswerRe: Trying to insert values into Table Variable in Dynamic Sql Pin
Richard Deeming3-Apr-18 8:44
mveRichard Deeming3-Apr-18 8:44 
GeneralRe: Trying to insert values into Table Variable in Dynamic Sql Pin
indian1434-Apr-18 12:35
Memberindian1434-Apr-18 12:35 
GeneralRe: Trying to insert values into Table Variable in Dynamic Sql Pin
Richard Deeming5-Apr-18 8:06
mveRichard Deeming5-Apr-18 8:06 
QuestionMysql database problem Pin
Member 1375522730-Mar-18 18:12
MemberMember 1375522730-Mar-18 18:12 
AnswerRe: Mysql database problem Pin
A_Griffin30-Mar-18 21:41
MemberA_Griffin30-Mar-18 21:41 
GeneralRe: Mysql database problem Pin
Member 1375522730-Mar-18 21:55
MemberMember 1375522730-Mar-18 21:55 
GeneralRe: Mysql database problem Pin
A_Griffin30-Mar-18 22:12
MemberA_Griffin30-Mar-18 22:12 
GeneralRe: Mysql database problem Pin
Victor Nijegorodov30-Mar-18 22:45
MemberVictor Nijegorodov30-Mar-18 22:45 

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.