[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2011-02-23
3
Medium Priority
?
325 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 1000 total points
ID: 34959511
Update import set [40] = [37] where barcode = '117454-04123'
0
 
LVL 93

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 1000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

834 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