Viewing 15 posts - 12,361 through 12,375 (of 15,381 total)
Can you post ddl and sample data for your table? Then a clear definition of what you want for results. Take a look at the first link in my signature...
April 18, 2012 at 12:18 pm
Another debugging tip, select your sql before you execute it so you can tell what it is you are going to run.
SELECT @sql
April 18, 2012 at 11:04 am
Well the cursor is the problem. 😛
You don't have a fetch_next inside the body of your cursor so it is an endless loop.
Depending on what your proc "pdashboard" does you...
April 18, 2012 at 10:59 am
In reference to your upgrade you describer it perfectly. It might be the word you are looking for is "broken"? We often say something is broken when referencing a portion...
April 18, 2012 at 10:56 am
You can create your own logins if you are using sql authentication (ie. the database connection will provide a username/password).
April 18, 2012 at 10:40 am
Lynn Pettis (4/18/2012)
The Dixie Flatline (4/18/2012)
My wife is a special education teacher with a lot of training and experience in behavior modification. She has taught me...
April 18, 2012 at 10:03 am
jonathanalvestad (4/18/2012)
How do I set up a database so that Clients visiting the web page AND someone from a stand...
April 18, 2012 at 10:01 am
Your original query created a cross join because you used a comma separated list of tables and did not add the join condition in the where clause. This is one...
April 18, 2012 at 9:53 am
I am kinda swamped this morning but I did take a quick look. I would HIGHLY recommend you take a look at the link in my signature about a string...
April 18, 2012 at 8:10 am
commonman00 (4/18/2012)
Thanks guys for your pointers.Managed to setup dynamic SQLs with tips from http://www.sommarskog.se/dynamic_sql.html.
Also managed to get rid of the cursor with tips from http://www.sql-server-performance.com/2004/operations-no-cursors/
Just curious which method suggested...
April 18, 2012 at 7:50 am
Thanks for the ddl and sample data. Can you explain what you are trying to do? What does the commented stuff about @plant_code do? What you have posted will just...
April 18, 2012 at 7:46 am
Lynn Pettis (4/17/2012)
ScottPletcher (4/17/2012)
Storing this will allow to keep our query sargable for best index usage.
Is that really necessary?
Won't SQL treat computations on a declared variable as a constant, so...
April 17, 2012 at 3:31 pm
andrew gothard (4/17/2012)
Sean Lange (4/16/2012)
hbtkp (4/16/2012)
but this is how i am getting my final data in report.
so based on how they calculate , i...
April 17, 2012 at 3: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
Select count(*) from TimesAskedForDDL_AndSampleData where UserName = 'hbtkp'
Msg 8115, Level...
April 17, 2012 at 3:16 pm
Here is an example with some data.
--these are your parameters
declare @date1 datetime = convert(datetime, '20120201')
declare @date2 datetime = convert(datetime, '20120406')
select @date1, @date2
--now we want a variable to hold these calculated...
April 17, 2012 at 3:08 pm
Viewing 15 posts - 12,361 through 12,375 (of 15,381 total)