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
Solved

How do I create an update statement from columns that are numbers?

Posted on 2011-02-23
3
319 Views
Last Modified: 2012-05-11
I have a table (inherited I hasten to add!) which has numbers as column names. How would I write this statement where 40 is a column and 37 is a column?

Update import set 40 = 37 where barcode = '117454-04123'

Thanks
0
Comment
Question by:suroma
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 34959511
Update import set [40] = [37] where barcode = '117454-04123'
0
 
LVL 92

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 250 total points
ID: 34959515
Update import set [40] = [37] where barcode = '117454-04123'

Open in new window

0
 
LVL 8

Expert Comment

by:vinurajr
ID: 34959533
you can use like this [40]  ... for columns 40
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQl Query to find x consecutive Nbrs in a Table 30 97
SSRS - Date Report Options 2 29
TSQL XML Namespaces 7 24
Use column to search string column 2 11
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

828 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