Forum Replies Created

Viewing 15 posts - 12,361 through 12,375 (of 15,379 total)

  • RE: if------then ----else in select statement

    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...

  • RE: English question for a word

    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...

  • RE: Need some help with setting up database for website, lenghty post.

    You can create your own logins if you are using sql authentication (ie. the database connection will provide a username/password).

  • RE: Are the posted questions getting worse?

    Lynn Pettis (4/18/2012)


    The Dixie Flatline (4/18/2012)


    Lynn,

    My wife is a special education teacher with a lot of training and experience in behavior modification. She has taught me...

  • RE: Need some help with setting up database for website, lenghty post.

    jonathanalvestad (4/18/2012)


    Hi, I have some questions regarding setting up a database.

    How do I set up a database so that Clients visiting the web page AND someone from a stand...

  • RE: sum incorrect

    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...

  • RE: Help with query with repeated sub query...

    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...

  • RE: Is it possible to SUM(@variable)?

    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...

  • RE: it work after one loop not working on next cndition

    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...

  • RE: Query between month

    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...

  • RE: how can i insert in udf

    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...

  • RE: how can i insert in udf

    hbtkp (4/17/2012)


    no this i need to do from udf which returns table

    and i need to put in while or for condition

    Select count(*) from TimesAskedForDDL_AndSampleData where UserName = 'hbtkp'

    Msg 8115, Level...

  • RE: Query between month

    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...

  • RE: New to SQL

    Hi and welcome to SSC! Best thing you can do is get a copy of sql express. Then get a copy of adventureworks database. You can find both of those...

  • RE: how can i insert in udf

    capn.hector (4/17/2012)


    Sean Lange (4/17/2012)


    hbtkp (4/17/2012)


    OK ,IF I CANNOT HEN how can i store my logic which include execute sp and returns 1 value

    i need to call this value in case...

Viewing 15 posts - 12,361 through 12,375 (of 15,379 total)