T-sql update table variale

t-sql update table variale UPDATE @searchResult SET [record_id] = r.[record_id], [record_name] = r.[record_name] FROM @searchResult SR CROSS APPLY ( SELECT TOP 1 * FROM [records] WHERE [record_name] LIKE [name_template] — Your wish, but do you really need LIKE matching?? ORDER BY [record_id] DESC ) AS r;

T-sql update table variale Read More

Sql vs nosql

nosql vs sql A SQL Database follows a table like structure which can have an unlimited number of rows and every data present inside the database is properly structured with Predefined Schemas, it is basically used to manipulate Relational Databases Management Systems. A NoSQL Database is a Distributed Database where the data is very unstructured […]

Sql vs nosql Read More

Sql transact create cursor with dynamic tables

sql transact create cursor with dynamic tables Declare @UserID varchar(100) declare @sqlstatement nvarchar(4000) –move declare cursor into sql to be executed set @sqlstatement = ‘Declare users_cursor CURSOR FOR SELECT userId FROM users’ exec sp_executesql @sqlstatement OPEN users_cursor FETCH NEXT FROM users_cursor INTO @UserId WHILE @@FETCH_STATUS = 0 BEGIN Print @UserID EXEC asp_DoSomethingStoredProc @UserId FETCH NEXT […]

Sql transact create cursor with dynamic tables Read More

Sql stored procedure for access frontend

sql stored procedure for access frontend CREATE PROCEDURE getContact — Add the parameters for the stored procedure here @id int = 1 AS BEGIN — SET NOCOUNT ON added to prevent extra result sets from — interfering with SELECT statements. SET NOCOUNT ON; — Insert statements for procedure here SELECT * FROM myContacts WHERE [email protected] […]

Sql stored procedure for access frontend Read More