Viewing 15 posts - 1,171 through 1,185 (of 1,923 total)
Here is my two cents:
/*
SELECT * FROM [WM_Reading]
SELECT * FROM [BPM_Reading]
SELECT * FROM [Patient]
*/
DECLARE @PatientID INT
SET @PatientID = 1002044
; WITH BPM_CTE AS
(
SELECT -- List of Columns that...
September 14, 2010 at 7:29 am
Would this do ?
DECLARE @MyTable TABLE (MyNumericVal VARCHAR(100))
INSERT INTO @MyTable VALUES ('50.10-'),
...
September 14, 2010 at 2:21 am
Nakul Vachhrajani (9/14/2010)
DECLARE @MyTable TABLE (MyNumericVal VARCHAR(100))
INSERT INTO @MyTable VALUES ('50.10-'),
...
September 14, 2010 at 1:36 am
Cross post.. please provide ur solutions at : http://www.sqlservercentral.com/Forums/Topic985259-338-1.aspx
September 14, 2010 at 1:31 am
LTRIM & RTRIM from the above post forced me for this:
SET NOCOUNT ON
DECLARE @NegativeNumeric VARCHAR(100)
SELECT @NegativeNumeric='50.10-'
SELECT @NegativeNumeric = -1 * CAST ( REPLACE(LTRIM(RTRIM(@NegativeNumeric)) ,'-','') AS DECIMAL (10,2))
SELECT @NegativeNumeric AS [ConvertedToNegativeNumber]
SELECT...
September 14, 2010 at 1:29 am
Another dig:
SELECT @NegativeNumeric = -1 * CAST ( REPLACE(@NegativeNumeric ,'-','') AS DECIMAL (10,2))
SELECT @NegativeNumeric AS [ConvertedToNegativeNumber]
September 14, 2010 at 1:26 am
My two cents:
SET NOCOUNT ON
DECLARE @NegativeNumeric VARCHAR(100)
SELECT @NegativeNumeric='50.10-'
SELECT @NegativeNumeric = -1 * CAST ( LEFT (@NegativeNumeric , (LEN(@NegativeNumeric)-1)) AS DECIMAL (10,2))
SELECT @NegativeNumeric AS [ConvertedToNegativeNumber]
September 14, 2010 at 12:52 am
Here's my dig :
(using the table set-up by malleswar_reddy)
;with cte as (
select name,company,Email ,Id,RowCnt = COUNT(*) over (partition by company,name)
from #temp
)
Select Name, Company, Email,Id
From cte
WHERE RowCnt > 1
ORDER BY...
September 14, 2010 at 12:48 am
I think i know how to do that, but i need clear "expected output"...Where do u what the count column to fit it? Can u please be more specific with...
September 14, 2010 at 12:19 am
jpdlp (9/8/2010)
The attempt i made without taking in consideration this 'Enable' part was the following:
SELECT MP.* FROM [T_APP_ModulePermition] MP
INNER JOIN T_APP_UserGroup_Detail UGD ON MP.UserGroup=UGD.UserGroup
INNER JOIN T_APP_User U...
September 9, 2010 at 8:26 pm
Chris Morris-439714 (9/6/2010)
ColdCoffee (9/6/2010)
Are we in for a Connect Item ?
Nope, it's an unsupported use of variable assignment which yields unpredictable results and has already been covered on the forum...
September 6, 2010 at 10:58 am
sreecareer (9/6/2010)
I think, I need a global temp table because I am using EXEC('query') also in the SP to insert to the temp table. If...
September 6, 2010 at 10:47 am
Provide sample data as per this link : http://www.sqlservercentral.com/articles/Best+Practices/61537/
You will receive tested , optimized, beautified code..there are coding beasts 😀 that reside in this site which will provide u with...
September 6, 2010 at 8:03 am
Are we in for a Connect Item ?
September 6, 2010 at 7:28 am
Viewing 15 posts - 1,171 through 1,185 (of 1,923 total)