Deleting information in a query

G

guidop12

I have a table that is setup like this
ranking Company Total Revenue
1 ABC 123,456
What I want to do is have a delete query(or something) that just deletes the
contents of the Company and the Total Revenue columns and keep the column
ranking with its information.
The SQL coding is below but that deletes all the rows hence deleting the
ranking information.
DELETE CompanyOneYr.Company, CompanyOneYr.[Total Revenue]
FROM CompanyOneYr;

The ranking column is a permanent set of numbers from 1 to 50
Can someone please advise
 
B

Bob Barrows [MVP]

guidop12 said:
I have a table that is setup like this
ranking Company Total Revenue
1 ABC 123,456
What I want to do is have a delete query(or something) that just
deletes the contents of the Company and the Total Revenue columns and
keep the column ranking with its information.
The SQL coding is below but that deletes all the rows hence deleting
the ranking information.
DELETE CompanyOneYr.Company, CompanyOneYr.[Total Revenue]
FROM CompanyOneYr;

The ranking column is a permanent set of numbers from 1 to 50
Can someone please advise

What you want to do is update the columns:

update CompanyOneYr
set Company = ''.[Total Revenue] = Null
 
G

guidop12

I tell you, you guys are great
Thank you very much

Bob Barrows said:
guidop12 said:
I have a table that is setup like this
ranking Company Total Revenue
1 ABC 123,456
What I want to do is have a delete query(or something) that just
deletes the contents of the Company and the Total Revenue columns and
keep the column ranking with its information.
The SQL coding is below but that deletes all the rows hence deleting
the ranking information.
DELETE CompanyOneYr.Company, CompanyOneYr.[Total Revenue]
FROM CompanyOneYr;

The ranking column is a permanent set of numbers from 1 to 50
Can someone please advise

What you want to do is update the columns:

update CompanyOneYr
set Company = ''.[Total Revenue] = Null

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top