Solved

Dealing with A Table Column Called "FROM"

Posted on 2011-09-08
3
207 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Pivot Rows To Columns 10 66
kill process lock Sql server 9 64
SQL Server 2012 r2 Make faster Temp Table 17 113
Webservices in T-SQL 3 34
I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

831 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