Viewing 15 posts - 226 through 240 (of 445 total)
Try
... @whereand=N' and Object_id in (select Object_id from sys.objects
where name in (select article from distribution..MSarticles where ... ))'
March 12, 2015 at 4:00 am
It's quite possible to store a non-unicode value in NVARCHAR column:
declare @nvc1 nvarchar = 'test'
declare @nvc2 nvarchar = cast('test' as varbinary(100))
if @nvc1 = @nvc2
PRINT 'EQUAL'
else
PRINT 'NOT...
March 11, 2015 at 8:08 am
By chance, is there any reasonable limit of number of TBTAB2 columns needed for the period of the application life ?
Suppose max is 25 columns. Then create a table...
March 6, 2015 at 6:51 am
Mauricio_ (3/5/2015)
I only marked option F). Option D) has a wrong syntax.
+1
March 6, 2015 at 6:27 am
Alternatively we can count concurrent calls based on second-granularity tally and then compute max concurrency within bucket.
declare @repStart datetime = '2013-04-01';
declare @repEnd datetime = '2013-04-02 23:59:59.9';
with sampledata as(
Select...
March 4, 2015 at 8:00 am
Not sure I got it right, but lets start with enumerating buckets of interest. If the query brings the proper list of buckets with concurrent calls then...
March 4, 2015 at 7:11 am
Try recursive cte as follows. I changed your input so that grandparent 1 has two different paths with IsAutoCalculate =(1...1,0) . You may need to tweak the query...
February 27, 2015 at 12:47 am
and more, looping
Select * into #temp from Employee where Name=@Name
will give you n*m rows for every name which has n occurences in the given department in Total and m...
February 26, 2015 at 2:41 am
Why you need view and function?
What's wrong with a single query
select Id,ProductName,IsActive,
CONVERT(XML,
(SELECT TBL_Group.title, dbo.TBL_Group.id
FROM TBL_Group INNER JOIN
TBL_GroupProd ON TBL_Group.Id = TBL_GroupProd.GroupId
WHERE TBL_GroupProd.ProdId = TBL_Product.Id FOR XML...
February 25, 2015 at 5:42 am
sm_iransoftware (2/25/2015)
(And The other side : I have a table that have All Day Date and can join to these tables)
Ok then what is your problem? Have you tried the...
February 25, 2015 at 5:12 am
Jay Sapani (1/26/2015)
thanks for the solution.
want a suggestion on some nice way to improve knowledge of new sql as till now i...
January 27, 2015 at 12:58 am
Tally needs only 5 members because OP needs to derive only 4 rows from each original row. Provided there are no 2 original rows where abs(r1.id-r2.id) < 5 ,...
January 26, 2015 at 11:47 am
One more point, the trigger will fail when database is altered to RECURSIVE_TRIGGERS ON. Try this
alter trigger trigUpdateDateProductsL1 on ProductsL1
after update
as
if not UPDATE(UpdtDT)
begin
--print 'updating Data';
UPDATE dbo.ProductsL1
SET UpdtDT =...
January 26, 2015 at 2:51 am
Sorry for the late answer.
If you're still struggling with the problem try this. As there may be multiple intervals for a given MapPerson/Mapgroup, we need to know next interval info....
January 25, 2015 at 2:18 pm
Viewing 15 posts - 226 through 240 (of 445 total)