HomeHome Product Discus... Product Discus...SmithCartSmithCartSubcategory deletionSubcategory deletion
Previous
 
Next
New Post
1/12/2011 7:21 AM
 

Can anybody share how to use sql to delete subcategories starting with the word Deskjet?

 
New Post
1/12/2011 6:04 PM
 

delete * from Smith_Category where ParentID > 0 and CategoryName like 'Deskjet%'


Scott Kelly
Project Manager
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
1/13/2011 10:44 AM
 

Using this syntax delete * from Smith_Category where ParentID > 0 and CategoryName like 'Stylus%' I get this error System.Data.SqlClient.SqlException: Incorrect syntax near '*'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String ConnectionString, String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String ConnectionString, String Script) delete '*' from Smith_Category where ParentID > 0 and CategoryName like 'Stylus%'

 
New Post
1/13/2011 12:20 PM
 

Try removing the *


Scott Kelly
Project Manager
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
Previous
 
Next
HomeHome Product Discus... Product Discus...SmithCartSmithCartSubcategory deletionSubcategory deletion