Viewing 15 posts - 1 through 15 (of 106 total)
This may help you
SELECT
X.*,Y.*
FROM USERMAST X
CROSS APPLY
(SELECT COUNT(*) CNT FROM USERMAST Y WHERE X.USERID=Y.PARENTID) y
July 13, 2012 at 12:52 am
Try below Query
SELECT qdb.xDate,
sum(case when t.TempSymbol='AAPL' then qdb.xClose end) 'AAPL',
sum(case when t.TempSymbol='AMD' then qdb.xClose end) 'AMD',
sum(case when t.TempSymbol='MSFT' then qdb.xClose end) 'MSFT'
FROM StockQuote qdb
INNER JOIN #TempSymbolList...
June 5, 2012 at 12:59 am
Try like
select
case when STAT='O' and dormant='N' and code='200' then 1 esle null end active,
case WHEN OPEN_DATE BETWEEN '7-MAY-2012' AND '31-MAY-2012' and code='200' then 1 else null end...
June 4, 2012 at 4:35 am
Can you tell me what is use of statment
RANK() OVER( PARTITION BY t.[name] ORDER BY c.column_id DESC ) = 1
May 17, 2012 at 5:30 am
Logical Processing Order of the SELECT statement
May 8, 2012 at 10:58 pm
Use SSIS Package
1. Develop SSIS package to extract the data in csv/text file
2. Copy the csv/text file on second server (using FTP or some other method upto you)
3....
May 7, 2012 at 1:08 am
U can also Write your query with out cursor like
select
p.*
,t.FullName
from plan p
cross apply
(select FullName from part pp where p.name=p.aeroplane_name) t
April 26, 2012 at 6:32 am
No, Trigger not returns any data.
Regards,
Srikant
April 9, 2012 at 10:30 pm
Use Case statment
SELECT EmpName As EName
case when BasicPay>5000 then 'OVER else 'lOW' end AS Result
FROM EmpSalary
February 21, 2012 at 11:33 pm
Try this
CREATE TABLE #temp (id int identity,AgencyID int,GroupID int )
INSERT INTO #temp
(
AgencyID
,GroupID
)
SELECT
-- V.y.value('(//AgencyID)[1]','int') AS AgencyID
V.y.value('.','int')
,@GroupID
FROM @Agency.nodes('/Agency/AgencyID') AS V(y)
SELECT * FROM #temp...
February 7, 2012 at 5:50 am
Try This SQL
create table student ( stdnt_id int, stdnt_name varchar(50),stdnt_activity SMALLINT )
go
INSERT INTO student
select 1, 'kiran', 5 UNION ALL
select 1 ,'kiran', 10 UNION ALL
select 1 ,'kiran', 15...
February 2, 2012 at 10:07 pm
Use expression to hide the column. Set the expression on column property
January 4, 2012 at 5:12 am
Viewing 15 posts - 1 through 15 (of 106 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy