Solved

Dealing with A Table Column Called "FROM"

Posted on 2011-09-08
3
189 Views
Last Modified: 2012-05-12
Hi ,

I am trying to run an OpenQuery in Sql Server 2008 that points to a Sql Anywhere database.  The problem is there is a column called "From".  I keep getting an error on this column and don't know how to work around this.  

SELECT * FROM OPENQUERY(Travel,
   'SELECT
      Ctrl,
      PostDate,
      CashAccount,
      AccountId,
                     From,
      CheckNumber,
      ReceiptNum,
      Amount,
      Applied,
      Branch,
      PrevBilled,
      Type,
      Remaining,
      InUseFlag,
      Status
      FROM DBA.Receipts')

Regards,

Kellylee
0
Comment
Question by:Kellylee22
3 Comments
 
LVL 23

Accepted Solution

by:
wdosanjos earned 250 total points
ID: 36502992
Try using either [From] or "From" instead.
0
 

Author Closing Comment

by:Kellylee22
ID: 36503096
Thanks so much.  This worked.

Best Regards,

Kellylee
0
 
LVL 6

Expert Comment

by:jorgedeoliveiraborges
ID: 36503102
SELECT * FROM OPENQUERY(Travel,
   'SELECT
      Ctrl,
      PostDate,
      CashAccount,
      AccountId,
                    [From],
      CheckNumber,
      ReceiptNum,
      Amount,
      Applied,
      Branch,
      PrevBilled,
      Type,
      Remaining,
      InUseFlag,
      Status
      FROM DBA.Receipts')
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now