Viewing 15 posts - 31 through 45 (of 122 total)
0
Hi guys Below error message i am getting Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> java.io.FileNotFoundException: The process cannot access the file 'D:\dats\Data1_OPTS.Data1_OPTS.287.2_4_2.20130301.034710.dat' because...
June 5, 2013 at 3:05 am
Perfect !!! is it possible to come up with some dynamic query here we are selecting the rows based on the row number(rn)
January 10, 2013 at 6:45 am
select cast(12.34777 as decimal(5,2))
October 6, 2012 at 8:41 am
How about this one correct me if i am wrong
;WITH C AS
(
SELECT *,ROW_NUMBER() OVER(PARTITION BY Status ORDER BY Product) AS Rn FROM #TestData
),
C1 AS
(
SELECT *,MIN(Rn)OVER(PARTITION BY Status) MinRn FROM C
)
SELECT...
October 2, 2012 at 8:58 am
You are correct. Just wanted to know in one of the queries
select Product, MIN(status)
FROM MyCTE
GROUP BY Product
the second column says MIN(status) just wanted to know which row...
October 2, 2012 at 8:46 am
CREATE TABLE #TestData
(
Product NVARCHAR(100),
Parts NVARCHAR(100),
Status NVARCHAR(100)
)
INSERT INTO #TestData(Product,Parts,Status)
SELECT 'Laptop1','mouse','OK' UNION ALL
SELECT 'Laptop1','screen','OK' UNION ALL
SELECT 'Laptop1','button','OK' UNION ALL
SELECT 'Laptop2','mouse','OK' UNION ALL
SELECT 'Laptop2','screen','OK' UNION ALL
SELECT 'Laptop2','button','NOT...
October 2, 2012 at 7:44 am
Sorry for not giving enough information
CREATE TABLE #TestBasedOnYear
(
OrderDate DATETIME,
TotalDue MONEY
)
INSERT INTO #TestBasedOnYear(OrderDate,TotalDue)
SELECT '2001-07-01 00:00:00.000','27231.5495'
UNION ALL
SELECT '2001-07-01 00:00:00.000','1716.1794'
UNION ALL
SELECT '2001-07-01 00:00:00.000','19005.2087'
UNION ALL
SELECT '2002-01-01 00:00:00.000','36096.7069'
UNION ALL
SELECT '2002-01-01 00:00:00.000','556.2026'
UNION ALL
SELECT '2003-01-01 00:00:00.000','47633.1875'
UNION ALL
SELECT...
September 18, 2012 at 7:10 am
Can be solved using DECLARE and derived column
DECLARE @OrdNum varchar(5)
DECLARE @Empid int
SET @OrdNum='XZ1'
SET @Empid=200
SELECT * FROM (SELECT OrdNum,Empid,Mgrid,MgrLevel FROM #Orders
WHERE OrdNum=@OrdNum AND Empid=@Empid
) AS A
September 2, 2012 at 4:56 am
Viewing 15 posts - 31 through 45 (of 122 total)