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

x
?
Solved

remove record from SQL database

Posted on 2010-08-26
2
Medium Priority
?
394 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 1000 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 1000 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
How much do you know about the future of data centers? If you're like 50% of organizations, then it's probably not enough. Read on to get up to speed on this emerging field.
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

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