Solved

Dealing with A Table Column Called "FROM"

Posted on 2011-09-08
3
218 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
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.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

705 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