Viewing 15 posts - 16 through 30 (of 36 total)
Is this what you are looking for?
declare @Temp table (pk int, v varchar(20))
insert into @temp
select 1, 'joe'
union all
select 2, 'jim'
union all
select 3, 'betty'
union all
select 4, 'zack'
union all
select 5, 'tim'
union...
August 8, 2007 at 10:42 am
Here is an old post
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=113390
I use the free yessoft program and it works great.
July 27, 2007 at 3:01 pm
I used the scripts found here
http://support.microsoft.com/kb/246133
under the heading -- A complete resolution to transfer logins and passwords between different versions of SQL Server.
July 13, 2007 at 2:33 pm
select e.enid, name, lastname
from en_entity e
inner join cn_contact c on c.enid = e.enid
where e.name like '%'+c.lastname+'%'
But you will have the problem of...
February 21, 2007 at 10:04 am
I think there may be a zero in the data. You could do this:
SELECT G6_ACT_DD
= case when G6_ACT_DD
February 20, 2007 at 10:42 am
This should work (I assumed no times are involved)
select distinct
t1.*
from #temp t1
inner join #temp t2 on t1.machine = t2.machine and t1.value < 0 and t2.value < 0
and t1.dte...
December 14, 2006 at 5:09 pm
I learned that you can use the sp_executeSql a couple of months ago:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=199866#bm199953
In the last post from Ray M (Thanks Ray!)
Example:
Use Northwind
Declare @result int
declare @queryString nvarchar(1000)
Set @queryString = 'Select @result...
November 3, 2005 at 9:50 am
This will work too:
create table #temptime (pk int identity, dt datetime)
insert into #temptime (dt)
values (getDate())
insert into #temptime (dt)
values (dateadd(ss,-100000,getDate()))
insert into #temptime (dt)
values (dateadd(ss,100000,getDate()))
insert into #temptime (dt)
values (dateadd(dd,-1,getDate()))
insert into #temptime (dt)
values...
September 27, 2005 at 10:54 am
If @ACCOUNTTIME is NULL set @ACCOUNTTIME=0
September 15, 2005 at 11:14 am
Will this work:
select
Ad_Desc,
Descr = case when Ad_Switch_Id = 1 then Ca_Desc else Ty_Desc end
from #tblAds
left join #tblCategory on Ad_Keyword_Id = Ca_Id
left join #tblType on Ad_Keyword_Id = Ty_Id
September 15, 2005 at 11:02 am
What about:
select t1.*
from @Tab1 t1
left join @Tab2 t2 on t1.Tab1ID = t2.Tab1ID
where t2.Tab2ID is null
September 15, 2005 at 10:50 am
I think this will work. I am giving the data that I tested it with.
create table #messageTemp (PK int, parentPK int, message varchar(50), messageDatetime datetime)
insert into #messageTemp (PK, parentPK, message, messageDateTime)
values (2,...
August 22, 2005 at 4:05 pm
When I have this problem it is usually because my body + margins are larger than the report size. Just size your columns so they will fit in less than...
August 15, 2005 at 3:47 pm
I've never been able to set a value in a paramater in a dynamic string (I don't no if you can or not) but you can insert it into a...
July 12, 2005 at 9:26 am
Viewing 15 posts - 16 through 30 (of 36 total)