0

I'm trying to insert some data to a database on a linked server but I'm getting the #215 error.

SQL:

INSERT INTO DBF...mone0012
   ('CODE', 'TIMES', 'BANK', 'INTCODE', 'AGENCY', 'DATE', 'DUE', 'VALUE', 
    'DISCOUNT', 'PAY', 'PDATE', 'OVER', 'ODATE', 'DOC', 'TYPE', 'EMITT', 'SIT', 
    'BUS', 'CLIENT', 'DEALER', 'LAST', 'DEVBACK', 'DESCONTADO', 'VENDOR', 'FRETE',
    'DATEB', 'TIPOC', 'OLDCLI', 'DESPESA', 'DESPDATE', 'DUPALOC', 'SACADO', 
    'CODSACADO', 'BXREAL', 'BXCONT', 'BXTERC', 'BXARBIT', 'DATAPAG', 'BANKANT', 
    'PROTESTO', 'ENDOSSO', 'SITENDOSSO', 'REEMBOLSO', 'CREDITO', 'ACERTO', 'DESPBANC', 
    'DESPCART', 'JUROS', 'DESPBANCP', 'DESPCARTP', 'JUROSP', 'LIQCNAB', 'NCOMIS', 
    'SEQRELATO', 'DEBINCOB', 'TXGER', 'TXVENDOR', 'COMPGER', 'COMPDEALER',  
    'COMPVENDOR', 'COMGER', 'COMDEALER', 'COMVENDOR', 'CODSEQ', 'COMPDEALE2', 
    'EMITCUSTOD', 'CONTRATO', 'SEND', 'BUSCDEB', 'SENDDATE', 'SENDTYPE', 'QUITEMIT', 
    'CONTRLOC', 'TXDEALER') 
VALUES 
   ('09431500A', 1, NULL, NULL, NULL, '2012-02-23 10:55:00.000', 
    '2012-02-23 10:55:00.000', 2500.50, 0, 2500.50, '2012-02-23 10:55:00.000', 0, 
    NULL, 'd', 0, NULL, 'D', '06', '6666', '666', NULL, 0, NULL, NULL, 0, NULL, NULL, 
    NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, 
    NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 
    0, 0, 0, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL)

Error:

Msg 215, Level 16, State 1, Line 1
Parameters supplied for object 'DBF...mone0012' which is not a function. If the parameters are intended as a table hint, a WITH keyword is required.

How can I solve this?

Thanks.

2
  • What is "DBF" here? A DBase file? Foxpro? Commented Feb 23, 2012 at 14:21
  • We don´t know. Following the steps of the 3rd reply of this link we found that the files is 3 Foxbase/Foxpro/dBaseIII/IV/V no memo. But exactly what we don't know... Commented Feb 23, 2012 at 15:02

2 Answers 2

1

maybe the 3 dots are the problem. I always use:

insert into [LINKED_SERVER].DB.SCHEMA.TABLE
select * from TABLE 

try updating with your information

also, I dont think you need single quotes on the names of the columns after the insert

Sign up to request clarification or add additional context in comments.

6 Comments

I've tried to insert without specifying the column names and worked. The problem is the number of columns, which is big and I just want to insert some values...
i dont think the number of columns matter. I think it was the quotes. Can you test it? It would be good to know
Yeah. It works. Now I've another problem. I have columns which are named with functions of MS SQL. How to solve this problem?
use [NAME] (again, without the quotes)
Thanks. Now just to realize. MS SQL escape tables and columns with [], right?
|
0

Try putting [] around your table name. I would guess that '...' might be confusing it.

INSERT INTO [DBF...mone0012]
('CODE',        'TIMES',    'BANK', 'INTCODE',  'AGENCY',   'DATE',                     'DUE',                      'VALUE',    'DISCOUNT', 'PAY',      'PDATE',                    'OVER', 'ODATE',    'DOC',  'TYPE', 'EMITT',    'SIT',  'BUS',  'CLIENT',   'DEALER',   'LAST', 'DEVBACK',  'DESCONTADO',   'VENDOR',   'FRETE',    'DATEB',    'TIPOC',    'OLDCLI',   'DESPESA',  'DESPDATE', 'DUPALOC',  'SACADO',   'CODSACADO',    'BXREAL',   'BXCONT',   'BXTERC',   'BXARBIT',  'DATAPAG',  'BANKANT',  'PROTESTO', 'ENDOSSO',  'SITENDOSSO',   'REEMBOLSO',    'CREDITO',  'ACERTO',   'DESPBANC', 'DESPCART', 'JUROS',    'DESPBANCP',    'DESPCARTP',    'JUROSP',   'LIQCNAB',  'NCOMIS',   'SEQRELATO',    'DEBINCOB', 'TXGER',    'TXVENDOR', 'COMPGER',  'COMPDEALER',   'COMPVENDOR',   'COMGER',   'COMDEALER',    'COMVENDOR',    'CODSEQ',   'COMPDEALE2',   'EMITCUSTOD',   'CONTRATO', 'SEND', 'BUSCDEB',  'SENDDATE', 'SENDTYPE', 'QUITEMIT', 'CONTRLOC', 'TXDEALER') VALUES
('09431500A',   1,          NULL,   NULL,       NULL,       '2012-02-23 10:55:00.000',  '2012-02-23 10:55:00.000',  2500.50,    0,          2500.50,    '2012-02-23 10:55:00.000',  0,      NULL,       'd',    0,      NULL,       'D',    '06',   '6666',     '666',      NULL,   0,          NULL,           NULL,       0,          NULL,       NULL,       NULL,       0,          NULL,       NULL,       NULL,       NULL,           NULL,       NULL,       NULL,       NULL,       NULL,       NULL,       0,          NULL,       NULL,           0,              0,          0,          NULL,       NULL,       NULL,       NULL,           NULL,           NULL,       0,          0,          NULL,           0,          0,          0,          0,          0,              0,              0,          0,              0,              NULL,       NULL,           0,              NULL,       NULL,   NULL,       NULL,       NULL,       0,          NULL,       NULL)

3 Comments

Didn't work. When using [DBF...mone0012] returns the following error: Msg 208, Level 16, State 1, Line 1 Invalid object name 'DBF...mone0012'. And when using [DBF]...[mone0012] returns the same error before.
Ok, have to ask, is DBF...mone0012 the actual name of the table?
DBF is the linked server and the mone0012 is the table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.