Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Running a Job / Parse Issues

 
   Database Forums (Home) -> ODBC RSS
Next:  Linked Server ... Can I use a File DSN?  
Author Message
Brian Piotrowski

External


Since: Apr 15, 2008
Posts: 1



(Msg. 1) Posted: Tue Apr 15, 2008 2:46 pm
Post subject: Running a Job / Parse Issues
Archived from groups: microsoft>public>sqlserver>odbc (more info?)

Hi All,

I'm having a problem with a job on an SQL 2000 Server that is linked to pull
data from an SQL 2005 server. When I enter my infromation into the Job Step
properties and parse the SQL, the system tells me it is fine. When I run
the code through query analyzer, it also works fine as well. However, when
the job is run, I am getting a syntax error on the file name because (I
think) it is in double quotes.

Here is the SQL I am trying to parse:

insert into starscream.NAPROD_40.dbo."SPS 4_0$AFON DTS Import Staging"
(vin,productionDateDT,plantcode,UnitReferenceNo,ProductionLotNo,
KDLotNo,LotPosition,MTOC,ModelGrade,Returned,Completed,GhostBody)
select a.vin, (CONVERT(varchar(10), a.pdate ,101) + ' '
+ CONVERT(varchar(10), a.ptime ,108)), a.plantcode, a.lrnum, a.prod_lot,
a.kd_lot, a.lot_position, a.mtoc, 'N/A', 'N/A', 'N/A','N/A'
from bos_data a
where vin COLLATE DATABASE_DEFAULT not in
(select vin from starscream.NAPROD_40.dbo."SPS 4_0$AFON DTS Import Staging")

Again, it fails with a syntax error on the "SPS 4_0$AFON DTS Import Staging"
in both areas of the SQL.

Any ideas would be most appreciated.

Thanks!

Brian.

 >> Stay informed about: Running a Job / Parse Issues 
Back to top
Login to vote
Sylvain Lafontaine1

External


Since: Dec 13, 2003
Posts: 247



(Msg. 2) Posted: Sun Apr 20, 2008 6:46 pm
Post subject: Re: Running a Job / Parse Issues [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

The SET QUOTED_IDENTIFIER option is probably set to OFF when you try to
parse this sql string. See
http://msdn2.microsoft.com/en-us/library/aa259228(SQL.80).aspx

Another possible solution would be to try replacing the double quote with
[], as in: ["SPS 4_0$AFON DTS Import Staging"] .

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


"Brian Piotrowski" wrote in message

> Hi All,
>
> I'm having a problem with a job on an SQL 2000 Server that is linked to
> pull data from an SQL 2005 server. When I enter my infromation into the
> Job Step properties and parse the SQL, the system tells me it is fine.
> When I run the code through query analyzer, it also works fine as well.
> However, when the job is run, I am getting a syntax error on the file name
> because (I think) it is in double quotes.
>
> Here is the SQL I am trying to parse:
>
> insert into starscream.NAPROD_40.dbo."SPS 4_0$AFON DTS Import Staging"
> (vin,productionDateDT,plantcode,UnitReferenceNo,ProductionLotNo,
> KDLotNo,LotPosition,MTOC,ModelGrade,Returned,Completed,GhostBody)
> select a.vin, (CONVERT(varchar(10), a.pdate ,101) + ' '
> + CONVERT(varchar(10), a.ptime ,108)), a.plantcode, a.lrnum, a.prod_lot,
> a.kd_lot, a.lot_position, a.mtoc, 'N/A', 'N/A', 'N/A','N/A'
> from bos_data a
> where vin COLLATE DATABASE_DEFAULT not in
> (select vin from starscream.NAPROD_40.dbo."SPS 4_0$AFON DTS Import
> Staging")
>
> Again, it fails with a syntax error on the "SPS 4_0$AFON DTS Import
> Staging" in both areas of the SQL.
>
> Any ideas would be most appreciated.
>
> Thanks!
>
> Brian.

 >> Stay informed about: Running a Job / Parse Issues 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Import/Export Wizard issues with "Other ODBC" - Even though I have created multiple ODBC entries on Win2k3 Server, the SSIS wizard does not have the same list of connection options as SQL Server 2000 (DTS wizard) did. I used to use "Other ODBC" as the connection method/driver. What do I u...

SQL Running at 90% CPU util, help! - I've got a clustered SQL 2000 SP3 database that is killing the CPU on our server. The db is 66% fragmented, and I need to figure out what is taking up all the CPU cycles. I've tried running SQL profiler and I dont see any large usage in the CPU..

Connecting to Paradox - Hello, I am trying to connect to paradox database for the purpose of updating the record(s) in DTS ActiveX Script Task. I used the following connection string. But I get an error while connection. I have "UMTest.db" and "UMTest.px" ...

app hangs after ODBC API call - Our app that uses MFC ODBC classes(CDATABASE, CRECORDSET) often hangs after the folllowing sequence: - open connection - connection to DB lost due to network problems - close connection - open connection - open recordset App hangs in..

Insert failed - I am running the code below on two similar tables. They both have an identity insert field and both have a timestamp. The first routine labeled Insert Product Materials runs fine, the second, Insert products mateirals, fails. This is the error: error....
   Database Forums (Home) -> ODBC All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]