Viewing 15 posts - 451 through 465 (of 1,923 total)
Mine and urs both will do a table-scan, as is with the case of Splitter. But, urs look tidier and i forgot totally i can use comma to concatenate (i...
March 2, 2012 at 11:34 am
Eugene Elutin (3/2/2012)
ColdCoffee (3/1/2012)
March 2, 2012 at 9:51 am
Can you please elaborate on what you wnat?
PLease read the following article on how to post your question http://www.sqlservercentral.com/articles/Best+Practices/61537/
March 2, 2012 at 12:32 am
Henrico Bekker (3/2/2012)
idcurrmonth ...
March 2, 2012 at 12:24 am
I took the liberty of adding an IDENTITY column to the base table.
Here is my stab at the issue
; with cte as
(
select id,currmonth,nextmonth, monthly,startval , cast( (monthly * 2.00) as...
March 1, 2012 at 11:57 pm
Hey R.P.R , the OP does not want the rows that have 12 values , instead the rows that contain the value 12 ; look at the expected output and...
March 1, 2012 at 10:26 pm
Dont open multiple thread for the same request. Have patience, people here will for sure attend your question.
Cross post. Please redirect all replies to this thread http://www.sqlservercentral.com/Forums/Topic1260602-391-1.aspx
March 1, 2012 at 10:12 pm
Here is one way:
First setting up test data:
IF OBJECT_ID('TempDB..#Sample') IS NOT NULL
DROP TABLE #Sample ;
CREATE TABLE #Sample
( ID INT IDENTITY ,StringVARCHAR(200)) ;
INSERT INTO #Sample (String)
...
March 1, 2012 at 10:10 pm
something like this, may be?
-- Open a tran
BEGIN TRAN
-- Choose data before update
SELECT * FROM #temp2
UPDATE t2
SET t2.val1 = tCrsApp.val1
, t2.val2...
March 1, 2012 at 9:50 pm
something like this?
SELECT DISK
,CONVERT(CHAR(10),PollTime,120)AS Date
,AVG(Utilization)
FROM Disk
WHERE CONVERT(CHAR(10),PollTime,120) = '2012-02-20'
AND name = 'TEST'
Group by Disk, CONVERT(CHAR(10),PollTime,120)
Order BY Disk desc
March 1, 2012 at 9:48 pm
Are you trying do something like this?
IF OBJECT_ID('TempDB..#Sample') IS NOT NULL
DROP TABLE #Sample ;
CREATE TABLE #Sample
( Dates DATETIME , wrange VARCHAR(20)) ;
INSERT INTO #Sample (Dates)
...
March 1, 2012 at 9:22 pm
I have seen that query somewhere 😀
ANyways, i can what you are trying to do, but why do u need GROUP BY in your code? for every date, you need...
March 1, 2012 at 9:07 pm
Remove all columns from GROUP BY except DISK and add CONVERT(CHAR(10),PollTime,120)
March 1, 2012 at 9:04 pm
CoolDown (3/1/2012)
When values are updated for both column,...
March 1, 2012 at 9:01 pm
baabhu (3/1/2012)
However try to use isnull(Pricemoney,1) * 100 if you have got any null related columns on the pricemoney. This way the result won't be null.
That depends on...
March 1, 2012 at 7:58 pm
Viewing 15 posts - 451 through 465 (of 1,923 total)