declare @tablename nvarchar (100)
set @tablename = ‘party’
 
declare @query nvarchar (1000)
set @query= ‘select top 10 * from ‘ + @tablename
exec (@query )
— Get the dynamic query value assigned to a outer variable
DECLARE @RsDataSQL nvarchar(2000)=‘select top 1 @Rstable2 = ”RS_” + rc.TablePrefix + ”_” + rf.TablePrefix + ”_EventType”’
       +‘ from RControl rc 
      inner join Form rf  on rf.FormId=rc.FormId
      where rf.partyid = 49310′            
 
declare @lrstable nvarchar (500) =
exec sp_executesql @RsDataSQL, N’@Rstable2 nvarchar(500) out’, @lrstable out
 
select @lrstable
— another example
declare @tablename nvarchar (100)
set @tablename = ‘party’
 
declare @query nvarchar (1000)
set @query= ‘select top 1 @partyid = partyid from ‘ + @tablename
 
declare @partyid1 int =
exec sp_executesql @query, N’@partyid int out’, @partyid1 out
 
select @partyid1
Advertisements
SELECT STUFF(
(SELECT ‘,’ + s.PerfIndDesc
FROM table s
ORDER BY s.id
FOR XML PATH( )),1 ,1, )
GO
;with a(
rcontrolid,logoname
)as (
select top 20 RControlId,LogoName  from RControl),
b(
RowNumber,rcontrolid ,logoname
)AS ( SELECT ROW_NUMBER () OVER (ORDER BY RControlId ASC ) AS RowNumber,* FROM a)
select * from b where RowNumber between 2 and 6
IFNOTEXISTS(SELECT*FROM sys.types st JOIN sys.schemas ss ON st.schema_id= ss.schema_id WHERE st.name =N’IdVal’ AND ss.name =N’dbo’)
CREATE TYPE [dbo].[IdVal] AS TABLE (
      [Id] [int] NOT NULL,
      [Val] [nvarchar] (100) NOT NULL
)
GO
/*
declare @Table dbo.IdVal
insert into @Table
      select 1,’val1′
            union
      select 2,’val2′
select * from @Table
exec somesp @TableInput=@Table
CREATE PROCEDURE somesp   
@IdVal IdVal READONLY
AS
……
 
*/

https://www.red-gate.com/products/sql-development/sql-search/

Date To EPOCH – Link

Posted: January 19, 2015 in REST
Tags:

Rest service returns the date in the form of epoch format in the json string. Below url can be used for conversion to validate the date …

http://www.esqsoft.com/javascript_examples/date-to-epoch.htm

http://www.gonzoblog.nl/2012/03/21/10-testing-tools-for-responsive-web-design/

Interesting ones …

Use http://responsivepx.com/ for all browsers

or

http://www.jamus.co.uk/demos/rwd-demonstrations/

or

use resize option with web developer plug-in for FF / Chrome

or resolution test chrome plug-in

https://chrome.google.com/webstore/detail/resolution-test/idhfcdbheobinplaamokffboaccidbal?hl=en-US