Viewing 15 posts - 31 through 45 (of 107 total)
Check for null value . If column contains null value then might be distinct will not work
May 13, 2011 at 4:37 am
Syntax will look like ,
delete b from b where not exists(select 'x' from a where a.id=b.id)
May 13, 2011 at 3:09 am
Try this
select top 2 * from (select row_number() over (order by id ) row , * from tab)t where row>2
May 12, 2011 at 1:28 am
Try This
DECLARE @t TABLE(
accountno INT,
period VARCHAR(10),
amount INT)
INSERT INTO @t
...
May 10, 2011 at 5:58 am
Try below SQL,
DECLARE @t1 TABLE(
id INT,
name VARCHAR(10))
DECLARE @t2 TABLE(
id INT,
soc VARCHAR(10))
INSERT INTO @t1
...
May 10, 2011 at 3:59 am
Just chnage the permission of the user(asp) and seen the result. might be the problem with user define data type
May 10, 2011 at 2:49 am
select tab2.name from
Tab1 CROSS JOIN tab2
May 6, 2011 at 7:35 am
you can use full Join to get the result
May 6, 2011 at 7:29 am
For True and flase value for haschildren
WITH samplehierarchychart (personid, position, parentpersonid, LEVEL, haschildren,sortkey)
AS (
-- Create the anchor query. This establishes the starting point
SELECT a.personid,
a.position,
a.parentpersonid,
0,
haschildren=Cast('\' + Cast(a.personid AS VARCHAR(10)) AS...
May 5, 2011 at 3:00 am
Viewing 15 posts - 31 through 45 (of 107 total)