Andrew Jackson
Forum Replies Created
-
AuthorPosts
-
This will delete duplicate rows
DELETE LU FROM (SELECT *, Row_number() OVER ( partition BY col1, col1, col3 ORDER BY rowid DESC) [Row] FROM mytable) LU WHERE [row] > 1
November 6, 2015 at 11:09 am in reply to: How to delete all tables in SQL Server database? #884 Score: 0Try this query
declare @SQL nvarchar(max) SELECT @SQL = STUFF((SELECT ', ' + quotename(TABLE_SCHEMA) + '.' + quotename(TABLE_NAME) FROM INFORMATION_SCHEMA.TABLES WHERE Table_Name LIKE '%lku' FOR XML PATH('')),1,2,'') SET @SQL = 'DROP TABLE ' + @SQL PRINT @SQL
October 28, 2015 at 12:46 pm in reply to: How to rebuild indexes in SQL Server Database #871 Score: 0Can I rebuild all indexes by using this query?
October 24, 2015 at 6:47 am in reply to: How to rebuild indexes in SQL Server Database #859 Score: 1Use below T-SQL for Deny to view databases
REVOKE VIEW ANY DATABASE TO [Database1] go REVOKE VIEW ANY DATABASE TO [Database2] go
May the stored procedure have been dropped from the subscriber and the publication is configured to deliver INSERT, UPDATE, and DELETE commands using stored procedures.
yes, I have permission to do it.
October 9, 2015 at 11:02 am in reply to: how to fix error 9001 (“DatabaseName” is not available) ? #825 Score: 0Took the database offline in Management Studio and then immediately brought online, the error will be resolved after this. strange but it works
Sometimes due to high page level corruption the DBCC CHECKDB command declined to repair the SQL database and shows regularity failure error. So if you have a good backup, then restore it otherwise in this condition to resolve it the use of external agent is more admirable
You don’t specify the table name
September 30, 2015 at 9:05 am in reply to: how to access sqlite database in a new application on android device ? #767 Score: 0If you are using a Real Device and it is not rooted then it is not possible to see your data base in File Explorer because due to some security reason that folder is locked in android system. And if you are using it in an emulator, you will find it in File Explorer /data/data/your package name/databases/your database.db
Did you run DBCC CHECKDB?
Try to execute this:
USE MASTER GO GRANT VIEW ANY DATABASE TO PUBLIC; -- turn this back on if it was off GO DENY VIEW ANY DATABASE TO USER_A; GO
Hi Lincoln, The information provided by you is very less.
Please Provide the full information of your Syntax.September 22, 2015 at 12:40 pm in reply to: How to Create Chrome Extension With SQLite Database? #718 Score: 0Yeah sure, not only with Web SQL API, even with NPAPI. But it would be very difficult.
September 22, 2015 at 12:17 pm in reply to: SQL Server log file not accessible, dbcc not really useful, how to analyze? #711 Score: 0I got the solution by applying
SELECT * FROM fn_dblog(null,null)
Try to run vacuum SQlite command.
September 22, 2015 at 12:08 pm in reply to: how to use function and stored procedure in SQL Server ? #709 Score: 0You can use a function anywhere that you can use a scalar value or a table. Functions can be used in constraints, computed columns, joins, WHERE clauses, or even in other functions. Functions are an incredibly powerful part of SQL Server. Also you can use stored procedures when want to allow modular programming, faster execution, reduce traffic and also you can use Stored procedures in security mechanism
September 16, 2015 at 12:59 pm in reply to: How to Create Chrome Extension With SQLite Database? #670 Score: 0Chrome supports WebDatabase API (which is powered by sqlite), but looks like W3C stopped its development.
These seems to have helped me. Thanks for the idea.
-
AuthorPosts