Viewing 15 posts - 11,986 through 12,000 (of 15,381 total)
Lynn if you keep providing answers there is no incentive for the posters to provide the details for you. They will just learn that you will eventually do it for...
May 11, 2012 at 12:40 pm
The article you referenced is going the other way. Maybe you can just reverse the logic? :-D:-D:-D
The link I sent you is the easiest way to do this. I can...
May 11, 2012 at 12:33 pm
Lynn Pettis (5/11/2012)
Sean Lange (5/11/2012)
Matt Miller (#4) (5/11/2012)
Lynn Pettis (5/11/2012)
Matt Miller (#4) (5/11/2012)
May 11, 2012 at 12:16 pm
This sounds a lot like homework. I would suggest that a CTE for this is not the best way to go. See this article from Wayne. http://www.sqlservercentral.com/articles/comma+separated+list/71700/%5B/url%5D
May 11, 2012 at 11:58 am
Matt Miller (#4) (5/11/2012)
Lynn Pettis (5/11/2012)
Matt Miller (#4) (5/11/2012)
May 11, 2012 at 11:50 am
Lynn Pettis (5/11/2012)
Sean Lange (5/11/2012)
Lynn, why not the replace I posted above? It is super fast because it doesn't have to do all sorts of string manipulation.
Didn't see it. ...
May 11, 2012 at 9:38 am
Oh you have a hybrid with EAV going on here. UGH!!! You really should just make the extra stuff columns in your order table and not as lookup values from...
May 11, 2012 at 9:35 am
Lynn, why not the replace I posted above? It is super fast because it doesn't have to do all sorts of string manipulation.
May 11, 2012 at 9:28 am
I think the OP wants no result set at all when there is no row. 0 row(s) returned.
May 11, 2012 at 8:57 am
What is it trying to do? This can certainly be made quite a bit simpler by the looks of it.
May 11, 2012 at 8:54 am
mark.doyle (5/10/2012)
I am reletively new to SQL and i have wrote the following basic procedure to check if a field in my table is...
May 11, 2012 at 8:51 am
Like this?
if exists
(
select 1
FROM [MantagheInfo]
WHERE (YearID = @year)
)
select
SUM(isnull([TedadTarhModiriatTafzili],0))as TedadTarhModiriatTafzili
, SUM(isnull([TedadTarhModiriatJame],0))as TedadTarhModiriatJame
, SUM(isnull([TedadKhodro],0))as TedadKhodro
, SUM(isnull([TedadMotorcycle],0))as TedadMotorcycle
, SUM(isnull([TedadGhayegh],0))as TedadGhayegh
, SUM(isnull([TedadBisim],0))as TedadBisim
, SUM(isnull([TedadDoorbinAksbardari],0))as TedadDoorbinAksbardari
, SUM(isnull([TedadDoorbinCheshmi],0))as TedadDoorbinCheshmi
FROM [MantagheInfo]
WHERE (YearID = @year)
May 11, 2012 at 8:42 am
How about nested replace. You said all you want is to remove "#" and any numbers.
SELECT rtrim(ltrim(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(REPLACE(Data, '#', ''), '1', ''), '2', ''), '3', ''), '4', ''), '5', ''), '6',...
May 11, 2012 at 8:34 am
dwain.c (5/11/2012)
Sean Lange (4/19/2012)
No loops, no cursors.
Hey, wait a minute! That's part of my mantra! :w00t:
LOL
May 11, 2012 at 8:04 am
Viewing 15 posts - 11,986 through 12,000 (of 15,381 total)