April 17, 2012 at 3:03 pm
hbtkp (4/17/2012)
ok ,i m giving sample date this timethis TIME I AM GIVIng SAMPLE DATA plz help
MemberID index
-9 0
NULL null
-9 0
NULL null
NULL nul
i need to go each of the value who has -9 and 0 ,using loop
that looks like sample output from your current stored procedures and functions that are currently not working. again please read this article http://www.sqlservercentral.com/articles/Best+Practices/61537/ and help us help you.
and for that "Sample data" you dont need a loop to get all the members with an id of -9
SELECT * FROM sometable WHERE MemberID = -9
EDIT: put url tags
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 17, 2012 at 3:09 pm
no this i need to do from udf which returns table
and i need to put in while or for condition
April 17, 2012 at 3:16 pm
hbtkp (4/17/2012)
no this i need to do from udf which returns tableand i need to put in while or for condition
Select count(*) from TimesAskedForDDL_AndSampleData where UserName = 'hbtkp'
Msg 8115, Level 16, State 2, Line 1
Arithmetic overflow error converting expression to data type bigint.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
April 17, 2012 at 3:27 pm
Sean Lange (4/16/2012)
hbtkp (4/16/2012)
i dont know what is cumulative formula.but this is how i am getting my final data in report.
so based on how they calculate , i need to do implement that formula in sql.
this result is accurate.i need to figure out formula based on that
Well how do you expect somebody else to help with a formula when you can't explain how to calculate it?
Let me try to paraphrase in extremely clear english what your questions is.
The chemical billfold yields to a crazy accent. Behind the fan waits my dress. The infant mortal pilots an ace near a stretch wash. A farewell word sneaks with the exit.
Meh. Would have been better as a haiku
I'm a DBA.
I'm not paid to solve problems. I'm paid to prevent them.
April 17, 2012 at 3:29 pm
andrew gothard (4/17/2012)
Sean Lange (4/16/2012)
hbtkp (4/16/2012)
i dont know what is cumulative formula.but this is how i am getting my final data in report.
so based on how they calculate , i need to do implement that formula in sql.
this result is accurate.i need to figure out formula based on that
Well how do you expect somebody else to help with a formula when you can't explain how to calculate it?
Let me try to paraphrase in extremely clear english what your questions is.
The chemical billfold yields to a crazy accent. Behind the fan waits my dress. The infant mortal pilots an ace near a stretch wash. A farewell word sneaks with the exit.
Meh. Would have been better as a haiku
Was just a random sentence generator.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
April 17, 2012 at 3:46 pm
Sean Lange (4/17/2012)
andrew gothard (4/17/2012)
Sean Lange (4/16/2012)
hbtkp (4/16/2012)
i dont know what is cumulative formula.but this is how i am getting my final data in report.
so based on how they calculate , i need to do implement that formula in sql.
this result is accurate.i need to figure out formula based on that
Well how do you expect somebody else to help with a formula when you can't explain how to calculate it?
Let me try to paraphrase in extremely clear english what your questions is.
The chemical billfold yields to a crazy accent. Behind the fan waits my dress. The infant mortal pilots an ace near a stretch wash. A farewell word sneaks with the exit.
Meh. Would have been better as a haiku
Was just a random sentence generator.
As, apparently, is the OP.
Poster will not explain
What problem is, Lynn feels pain
Like lashing of sleet
😎 ?
I'm a DBA.
I'm not paid to solve problems. I'm paid to prevent them.
April 17, 2012 at 4:29 pm
hbtkp (4/17/2012)
no this i need to do from udf which returns tableand i need to put in while or for condition
You'r the man, hbtkp! I'd buy you a beer if I could. What are you smoking and how can I get it?
I haven't smile so much on any SQL thread 🙂
April 17, 2012 at 6:33 pm
i m closing this thread
April 17, 2012 at 7:42 pm
hbtkp (4/16/2012)
it snot running total,if you see it carefully,its not just adding values. sometimes its adding 1 ,sometimes it minus 1
That is what is known as a "running total".
--Jeff Moden
Change is inevitable... Change for the better is not.
April 17, 2012 at 7:45 pm
hbtkp (4/16/2012)
this is what i have to figure out ,how they calculate it.
No problem. Please post the data in the readily consumable format identified in the article in the first link in my signature line below and I'll be very happy to show you how to do that calculation in a very high performance manner.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 17, 2012 at 7:58 pm
Actually, never mind. I missed page 2 and now I see the OP closed the thread.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 11 posts - 76 through 85 (of 85 total)
You must be logged in to reply to this topic. Login to reply