Solved

remove record from SQL database

Posted on 2010-08-26
2
383 Views
Last Modified: 2012-08-14
The table FormDefinitions have the following:

(<xaoFormID, char(75),>
           ,<xaoControlName, char(70),>
           ,<xaoClassID, char(35),>
           ,<xaoType, numeric(1,0),>
           ,<xaoProperties, text,>
           ,<xaoCode, text,>)

I would like to delete the following records
where xaoFormID like '%FSIPVSTR09%'  and (xaoControlName like '%chkelecpckupg%' or xaoControlName like '%cmdelecpckupg%')

Open in new window


I've been using SQL Server for about 5 months and never had to delete any records.

So, what is the the best way to do this via SQL Statement?

THANKS.
0
Comment
Question by:jeremyll
2 Comments
 
LVL 3

Accepted Solution

by:
celdridgeMadman earned 250 total points
ID: 33538247
delete from FormDefinitions where xaoFormID like '%FSIPVSTR09%'  and (xaoControlName like '%chkelecpckupg%' or xaoControlName like '%cmdelecpckupg%')

Just be careful when deleting obviously!
0
 
LVL 16

Assisted Solution

by:vdr1620
vdr1620 earned 250 total points
ID: 33538383
Be sure of what you want to delete...I would you to go through these articles before you delete the data from the table..

http://msdn.microsoft.com/en-us/library/ms189835.aspx
http://www.sql-tutorial.net/SQL-DELETE.asp
http://www.sql-tutorial.com/sql-delete-sql-tutorial/
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now