Viewing 15 posts - 136 through 150 (of 245 total)
declare @visits table(username varchar(50),visit_date datetime)
--sample data
insert into @visits
select
'aaa' ,'6/1/2011'
union
select
'aaa' ,'6/5/2011'
union
select
'bbb' ,'6/10/2011'
union
select
'ccc' ,'6/11/2011'
union
select
'ddd', '6/5/2011'
union
select
'ddd' ,'6/20/2011'
union
select
'ddd','6/25/2011'
;
with my_cte(username,visit_date,myRowNumber) as (
select *
,ROW_NUMBER() OVER(PARTITION BY username order by visit_date) as myRowNum
from
@visits v1
)
select...
June 28, 2011 at 7:32 am
dont thin it makes a difference. one thing i have noticed is if i create an alias like this:
select
'alias' = firstname + ' ' Surname
from
people
i can't reference that alias in...
June 17, 2011 at 6:51 am
mister.magoo (6/3/2011)
Finally, consider the following axiom:
Q: How many mathematicians does it take to screw in a lightbulb?
A: 0.999999....
A: Show me how they got into the light bulb!
great answer!!
June 3, 2011 at 9:56 am
is there a purpose for putting a TRY CATCH into a function that is merely a simple SELECT statement?
What error would be expected?
April 28, 2011 at 8:53 am
maybe start with something like this
declare @table table(ID int,Amount int,myDate smalldatetime,flag char(1))
insert into @table
select 22,12300,'2009-03-12',''
union
select 23,2123,'2009-04-16',''
union
select 12,1232,'2009-04-20',''
union
select 43,23434,'2009-06-22',''
union
select 44,23423,'2009-07-23',''
;
with my_Cte(rownum,id,amount,mydate,flag)
as(
select
ROW_NUMBER() over (order by mydate),
* from @table d
)
select
c1.rownum as...
April 19, 2011 at 6:10 am
maybe the columns have only just been added, so the intellisense can't see it?
i press ctrl+shift+r to refresh.
April 18, 2011 at 9:20 am
would hidden fields on your web page help? store the values in the hidden field using javascript, and then access them in c#.
April 13, 2011 at 6:54 am
when i had this problem it was due to the Body width being greater than the page width minus the left & right margins.
here's a link
http://blogs.msdn.com/b/chrisbal/archive/2006/08/10/694892.aspx
February 23, 2011 at 9:54 am
thanks for the reply.
I tried your advice out, to replace the cells with no border for the same expression and it worked but i didn't really feel it looked nice.
It...
February 10, 2011 at 3:39 am
Chrome is now showing 4 topics while IE is still showing 150.
January 14, 2011 at 5:26 am
declare @table table(id int ,name varchar(50))
insert into @table
select 1,'ron'
union
select 2,'tango'
union
select 3,'danny'
union
select 4,'amo'
declare @param varchar(50) = 'tango'
select id,name from
(
select
* ,
case when name = @param then 1 else 0 end...
January 13, 2011 at 7:17 am
I think I got this way of doing it from SQLServerCEntral.
Unfortunately i cant remember the name of the person to give them a name-check.
declare @pivot_columns table(pivot_column varchar(100))
insert into @pivot_columns
select ID...
January 7, 2011 at 6:06 am
think you need an extra closing bracket before Days_with_Voids. currently you just have one.
)) as Days_with_Voids
January 5, 2011 at 5:59 am
i would think the over(partition by choice order by choice_seqn )
is going to ORDER BY Choice_sqn within each Choice that you have partitioned by. Since each Choice only...
December 14, 2010 at 5:52 am
SELECT TOP 100 ADDRESSLINE1 FROM MST_ADDRESS WHERE ADDRESSLINE1 in
(SELECT colName FROM DIGITLOOKUPS.dbo.INPROGRESS_POBOX_EXCLUSION_LOOKUP where colName like ''+KEY_WORD+'%')
maybe?
December 8, 2010 at 4:29 am
Viewing 15 posts - 136 through 150 (of 245 total)