Viewing 6 posts - 16 through 21 (of 21 total)
update table
set ProgStartDT = (
select top 1 ProjStartDT
from table where projstartdt is not null
order by ProjProjID desc)
where ProgStartDT is null
Are you looking for something like that?
The other option is to...
November 18, 2007 at 8:27 pm
create procedure y
as
create table #tmp( empid int, column int)
insert into #tmp
exec x
select * from #tmp
select sum(empid) from #tmp
end
This will work as long as #tmp has the same definition as...
November 18, 2007 at 8:13 pm
Foreign keys rule in development databases.
Where I have always ran into problems with them in production. When a table has a foreign key you can't pull the table from a...
November 18, 2007 at 8:03 pm
are you talking about something like
select *
into #x
from (
select orderid, *
from table1
union
select orderid, *
from table2
select orderid, *
from table3) new
left outer join processed
on processed.order_id = new.orderid
where processed.orderid is null
insert into...
November 18, 2007 at 7:43 pm
ok, the way to do this is to use unions, casts and hidden columns
for example
select feedbacktext
from (
select feedbackid, 0 as orderx, cast('UserId = '+
cast(user_id as varchar(10))+'FeedbackId='+
cast(feedbackid as varchar(10)) as varchar(1000))...
November 18, 2007 at 7:27 pm
If this is a production system you may want to look at adding
set transaction isolation level read uncommitted
tracking down locking/contention issues can take longer than your customers...
November 18, 2007 at 10:02 am
Viewing 6 posts - 16 through 21 (of 21 total)