Viewing 15 posts - 1,426 through 1,440 (of 1,920 total)
Would this help you:
SELECT name, MIN(price) min_pice , MAX(price) max_pice, min(date) min_date, max(date) max_date
from table
group by name
order by name
As said by Bhuvnesh, please go thro the article he referred...
May 31, 2010 at 11:05 pm
How many rows do u have you in your table?
May 31, 2010 at 7:48 am
Not a problem , changebluesky, you are welcome! 🙂
May 31, 2010 at 2:20 am
Hey there.. try this:
declare @mytable table
(
id int,
potype varchar(10)
)
insert into @mytable values (1,'AA')
insert into @mytable values (1,'BB')
insert into @mytable values (1,'CC')
SELECT p1.id,
...
May 31, 2010 at 1:25 am
Hi there, try this code:
SELECT p1.Recnumber,
( SELECT [Subject] + ','
FROM View_RecNumberSubject p2
...
May 30, 2010 at 10:03 pm
This sort of problems are called as "Running Totals". All you need is to go thro one of the finest articles that describes what Running Totals are, how to tackle...
May 28, 2010 at 3:16 am
This will get u there!
SELECT * FROM
( SELECT * FROM <TABLE> ) PIVOT_TABLE
PIVOT
(SUM(AMOUNT) FROM PRODUCT IN ([1],[2],[3]))
Replace <Table> with your table name!
Tell us if that helped!!
May 28, 2010 at 1:44 am
A slight modification on WayneS' code is producing exact simliar test timings as mine
Modified WayneS' Code:
;WITH
/*
--Am commenting this section of the code which is taking that extra time
Tens...
May 28, 2010 at 12:41 am
Test results on 5 runs between mine and WayneS'
Mewayne
cpuelapsedcpu elapsed
1391387672376
2375389671693
3390402672673
4391388703690
5391386671672
Result387.6390.4677.8620.8
May 28, 2010 at 12:36 am
Here's my solution.
;WITH TALLY AS
(
SELECT 1 N
UNION ALL SELECT 2
UNION ALL SELECT 3
UNION ALL SELECT 4
...
May 28, 2010 at 12:24 am
purushotham.k9 (5/27/2010)
Thanks
You're welcome!
May 27, 2010 at 6:16 am
Hi purushot,, try these:
SELECT
DATEADD(YY, -2 , GETDATE()) AS [2_YRS_BACK_FULLDATE] ,
(DATEPART(YY,GETDATE()) + 2) AS ADD_2YRS
May 27, 2010 at 5:53 am
Cross post ; Please pour your suggestion at http://www.sqlservercentral.com/Forums/Topic928725-391-1.aspx
May 27, 2010 at 12:36 am
To add on, the manual right-click-extractall available in Windows is carried out by zipfldr.dll in the background; As DLLs cant be worked over from command line, you have no option...
May 27, 2010 at 12:14 am
Here are some example on how to use 7-zip : 7 Zip Examples from dotnetperls.com
May 27, 2010 at 12:09 am
Viewing 15 posts - 1,426 through 1,440 (of 1,920 total)