Viewing 15 posts - 181 through 195 (of 568 total)
select t from
(select t,r,c
from @t left join @t1
on t = r
or t = c) as x
where r is null
and c is null
November 14, 2009 at 1:16 am
Hi,
Try this
CREATE TABLE #table2
(
main CHAR (10),
sub CHAR (10)
)
insert into #table2
select 'main1','sub1'
union all
select 'main1','sub2'
union all
select 'main1','sub3'
union all
select 'main2','sub4'
union all
select 'main2','sub5'
union all
select 'main3','sub6'
union all
select 'main3','sub7'
union all
select 'main3','sub8'
--GROUP...
November 11, 2009 at 12:56 am
Paul White (11/7/2009[font="Courier New"]Msg 512, Level 16, State 1, Line 17
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >,...
November 7, 2009 at 1:12 am
Hi Sanket,
In the BOL for shrink files shows: “The database being shrunk does not have to be in single-user mode; other users can be working in the database when the...
November 7, 2009 at 1:00 am
Hi,
try this
update a
set a.MemoStatus = (case when (select 1 from MemoDetail b where b.EmployeeId = a.EmployeeId )=1 then 'Y'else 'N' end)
from Employee a
November 7, 2009 at 12:08 am
SELECT PRICE,
SERVICE_FEE,
isnull(DOWN_PAYMENT,0) [DOWN_PAYMENT],
(PRICE+SERVICE_FEE- isnull(DOWN_PAYMENT,0)) [AMOUNT OWED]
FROM ACCOUNTS;
IN SQL isnull(variable, new_value)
IN ORACLE nvl(variable, new_value)
November 6, 2009 at 11:02 pm
Hi,
Nice analysis,
Can you post this in to Contribution Center (Question of the Day), so many may learn this section.
November 6, 2009 at 9:39 pm
Hi,
Is any reason for the first month (i.e. @YearStartdate)treated as the day one ie day(@YearStartdate) always = 1, it is correct?
However unless full tables schema and sample data its...
November 6, 2009 at 9:05 pm
Sharul Nizam (11/6/2009)
--BusN may be same may be not, TTime always unique
--TripDte always same, TTID sometime no value sometime have value
--SeatN may...
November 6, 2009 at 8:31 pm
Sharul Nizam (11/6/2009)
is that true?
Hi,
NO, group by all columns gives difference count in the above case; post your full table with sample data may give some clarity.
November 6, 2009 at 3:37 am
Hi,
Try this
select t1.TrnxID,strPosi,posi,count(posi)coun
from
@tPosiHdr t1 left outer join @tPosiDtl t2
on t1.TrnxID=t2.TrnxID
and t1.strPosi <> t2.Posi
group by t1.TrnxID,strPosi,posi
November 6, 2009 at 1:36 am
SQL Guy-482125 (11/5/2009)
I need to create a table where number of records will be restricted only to one record.
Hi,
What purpose you need to keep only one row? Whether you maintain...
November 6, 2009 at 12:26 am
Hi,
Either you pass the RegionID or the deliveryid are mandatory to your procedure, then you use the IF condition like
IF (@RegionID is not null) and (@deliveryid is null)
BEGIN
YOUR STATEMENTS
END
ELSE
IF...
November 1, 2009 at 8:28 pm
Repeated post,
Discussion already start in
http://www.sqlservercentral.com/Forums/Topic811984-149-1.aspx
October 31, 2009 at 3:19 am
Hi,
Ref this link:
http://stackoverflow.com/questions/572833/how-to-move-data-from-vistadb-to-ms-sql-server
October 31, 2009 at 3:16 am
Viewing 15 posts - 181 through 195 (of 568 total)