Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I delete all the records in an SQL Table called ItemAnalysisDetail

Posted on 2004-09-09
16
Medium Priority
?
234 Views
Last Modified: 2010-04-23
How do I delete all the records in an SQL Table called ItemAnalysisDetail

Thanks
Kenny
0
Comment
Question by:kwh3856
[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
  • 9
  • 6
16 Comments
 
LVL 4

Expert Comment

by:Javert93
ID: 12020871
Through SQL or .NET?
0
 
LVL 5

Expert Comment

by:LindzK
ID: 12020939
DELETE * FROM ItemAnalysisDetail
0
 

Author Comment

by:kwh3856
ID: 12020998
SQL.......Query Analyzer????  Can I do it from there???

Thanks
Kenny
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 5

Expert Comment

by:LindzK
ID: 12021021
yes, just run that command :-

 DELETE * FROM ItemAnalysisDetail

make sure you have the right database selected in the drop down box
0
 

Author Comment

by:kwh3856
ID: 12021038
when I run the DELETE * FROM ItemAnalysisDetail
I get Incorrect syntax near '*'.
0
 
LVL 5

Expert Comment

by:LindzK
ID: 12021047
for good examples of simple sql comands visit this site - it's pretty useful for starting off

http://www.w3schools.com/sql/default.asp
0
 
LVL 5

Expert Comment

by:LindzK
ID: 12021052
try it without the *
0
 

Author Comment

by:kwh3856
ID: 12021090
neither one of those worked.  I read the tutorial and see what you are talking about.  These examples did not work for me.  I am using SQL 2000 Dev Edition and trying to use SQL Query Analyzer to delete the rows.  Is this the correct way????

Thanks
Kenny
0
 
LVL 5

Expert Comment

by:LindzK
ID: 12021179
hmm, that should work and sql query analyzer is fine for doing what you need - one sec, i'll try and look into it :)
0
 

Author Comment

by:kwh3856
ID: 12021290
Here is what I typed into SQL Query Analyzer while the table was selected in the left view pane
DELETE * FROM ItemAnalysisDetail


Here is the exact error message

Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near '*'.


Thanks
Kenny

0
 
LVL 5

Accepted Solution

by:
LindzK earned 2000 total points
ID: 12021340
as well as the left hand pane - there is usually a drop down box above the main text area - do you have one of them ? is you database selected ? and not northiwind or somethng similar
0
 

Author Comment

by:kwh3856
ID: 12021386
The master was selected in the drop down pane but I changed it to the database.  I still got the same error message with the *.  I will try it now without the *.

Thanks
Kenny
0
 
LVL 5

Expert Comment

by:LindzK
ID: 12021398
just as a test try doing

delete from ItemAnalysisDetail where columnname = 'sometext'  for me, see if that runs through.

where columnname = a columnname in your database
 and sometext = some text you know exists in that column

keep the text in '  '   or if it's a numeric value , dont
0
 

Author Comment

by:kwh3856
ID: 12021404
You Win!!!!!!!!!!!!!!!!!


Thank you very much :)


Thanks
Kenny
0
 
LVL 5

Expert Comment

by:LindzK
ID: 12021421
it worked with the db in the drop down ? :)
0
 
LVL 5

Expert Comment

by:LindzK
ID: 12021426
thanks for teh points - glad we got to the bottom of it !
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

719 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