Viewing 15 posts - 6,976 through 6,990 (of 15,381 total)
xRafo (8/29/2013)
ok I get it on the NOLOCK. Thanks.@Alan.B
your query give me this error:
Invalid object name 'Estimated'. 🙁
That is because he missed that you had a cte named estimated. The...
August 29, 2013 at 2:16 pm
Koen Verbeeck (8/29/2013)
Sean Lange (8/29/2013)
Koen Verbeeck (8/29/2013)
WITH CTE_NoZero AS(SELECT ID, ReadNo, deviceNo FROM DeviceReading WHERE ReadNo <> 0)
SELECT ReadNo, deviceNo
FROM
(SELECT ReadNo, deviceNo, RID = ROW_NUMBER() OVER (PARTITION BY deviceNo ORDER...
August 29, 2013 at 2:14 pm
Coriolan (8/29/2013)
Jeff,I am not sure why the question was about CSV format? My question is to get a comma delimited string as output.
CSV = Comma Separated Values. 😀
August 29, 2013 at 2:06 pm
Stylez (8/29/2013)
Result:
engine
------------
CAT C-15
What i Want to Achieve:
select MFGCODE,model from UASSEM where UNITID = '170272'
MFGCODE ...
August 29, 2013 at 2:05 pm
Koen Verbeeck (8/29/2013)
WITH CTE_NoZero AS(SELECT ID, ReadNo, deviceNo FROM DeviceReading WHERE ReadNo <> 0)
SELECT ReadNo, deviceNo
FROM
(SELECT ReadNo, deviceNo, RID = ROW_NUMBER() OVER (PARTITION BY deviceNo ORDER BY ID DESC)
FROM CTE_NoZero)...
August 29, 2013 at 1:48 pm
Stylez (8/29/2013)
I would need to run the function across a querry that returns more than one values
do i need to create a cursor for this to be able...
August 29, 2013 at 1:43 pm
Stylez (8/29/2013)
The EngineMakeModel is The Raw Column that is not Yet Concatenated and would need to be split into th
EngineMake Columnd and Model Column Separately. The Input would...
August 29, 2013 at 1:42 pm
Stylez (8/29/2013)
SELECTLEFT(EngineMakeAndModel,CHARINDEX(' ',EngineMakeAndModel)),RIGHT(EngineMakeAndModel,LEN(EngineMakeAndModel)-CHARINDEX(' ',EngineMakeAndModel))
FROM
(values('engines')) as x(select engine from units)
can i do the one above?
I want the Input to come from the Select Statement i have provided
Much Thanks
Noel
The reason I...
August 29, 2013 at 1:40 pm
Alan.B (8/29/2013)
Sean Lange (8/29/2013)
Alan.B (8/29/2013)
August 29, 2013 at 1:39 pm
What you posted is not really sample data. It is text that sort of is like sample data.
It looks like you pretty much wrote the query in your explanation...group...
August 29, 2013 at 1:10 pm
Alan.B (8/29/2013)
August 29, 2013 at 1:01 pm
Actually the OP is doing a recursive cte. The cte is named Estimate and the second half joins to it.
You will probably have to use your cte to return the...
August 29, 2013 at 12:06 pm
If your actual data is as simple as the one example you could also use PARSENAME.
select PARSENAME(replace(EngineMakeAndModel, ' ', '.'), 2), PARSENAME(replace(EngineMakeAndModel, ' ', '.'), 1)
from (values('PeterBilt MT20100')) as x(EngineMakeAndModel)
August 29, 2013 at 12:00 pm
You are welcome for the links. I keep them handy. 😉
I don't envy you in trying to clean this one up. It is a long and painful road for sure....
August 29, 2013 at 8:13 am
saravanakumar.G (8/28/2013)
Thanks for the reply.
Yes. the SP is working if we put single quotes across the tablename ('schemaname.tablename').
I want to try whether is...
August 29, 2013 at 7:48 am
Viewing 15 posts - 6,976 through 6,990 (of 15,381 total)