0

See screenshot; I am trying to select into a new table to be created in my QTYCompare database.

How do I refer to that in the 'into' statement?

It has a squiggly line under 'AFLOCAL' and when I try to run this, it tells me that

The object name 'HOUKMISTRY1.AFLOCAL.QtyCompare.LegacyDataRaw' contains more than the maximum number of prefixes. The maximum is 2.

enter image description here

I am trying to select from a different connection that I have open that is on the network in a query window...

Select  
    Field9 as Product, 
    field25 as Suffix,
    field7 as HEAT,
    field10 as Quantity,
    field6 as AR_Numbers,
    field58 as Commodity
into 
    HOUKMISTRY.AFLOCAL.QtyCompare.LegacyDataRaw
from 
    ssFields 
where 
    ArchiveId = 16 
    and field6 is not Null 
    and (field6 not like '%,%')
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Heap of Pinto Beans
  • 677
  • 2
  • 12
  • 23

1 Answers1

1

You have to create Link server with Read Write Access then you will be able to read or write data with that DB

gulshan arora
  • 371
  • 1
  • 8