Viewing 15 posts - 61 through 75 (of 215 total)
Hi ,
you can pass variable using dynamic SQL.
declare
@Column_list varchar(max)
set @Column_list = '(MM_Title, MM_Author, MM_Theme, MM_Description, MM_Publisher, MM_Source, MM_Copyright, MM_Language, MM_Location)'
declare @search varchar(20);
set @search='test'
declare @sql varchar(max);
April 6, 2012 at 2:50 am
Thanks for new question.First time am hearing about this.
January 29, 2012 at 9:44 pm
using Common table expressions (CTE).
December 30, 2011 at 2:29 am
Cannot able to understand properly may be
this query will work
declare @username varchar(10),@fromdate datetime ,@todate datetime;
select username,ACTION,COUNT(action) from table1
where username=@username and datetime between @fromdate and datetime
group by username,ACTION
...
December 30, 2011 at 2:16 am
Hi,
with cte this code will work fine.
with cte as
(select 1 as i
union all
select i+1 from cte where i<5
)
select 'ABC'+CAST(i as varchar) from cte
December 30, 2011 at 12:32 am
Hi,
This sample may be helpfull.
declare @Rel char(100);
SET @Rel='surname'
declare @sql nvarchar(2000);
set @sql='Select Top 10 ';
SET @sql=@sql+' CASE WHEN @Rel=''surname'' then surname ELSE given_names end'
set
December 25, 2011 at 11:16 pm
Hugo Kornelis (12/22/2011)
malleswarareddy_m (12/22/2011)
I think the above result depends on the insert statement.which ever first inserted it is showing that only.Please clarifyme if am wrong.
You are somewhat right and somewhat...
December 22, 2011 at 5:35 am
Hi,
Before answering the question. i tested with test data like
declare @test-2 table(mm varchar(10))
INSERT INTO @test-2 VALUES ('TEST')
INSERT INTO @test-2 VALUES ('abc')
INSERT INTO
December 22, 2011 at 12:52 am
Choosed third option.got it wrong. did not think about data.
in question they did not given any sample data.
December 13, 2011 at 11:40 pm
I got it wrong.till now id id not worked on nested joins.thanks i leanred one new point today
December 7, 2011 at 10:38 pm
Viewing 15 posts - 61 through 75 (of 215 total)