Forum Replies Created

Viewing 15 posts - 16 through 30 (of 302 total)

  • RE: Why cant I reference a column in a SQL Cursor?

    Lynn Pettis (5/2/2012)


    blandry (5/2/2012)


    I am however getting an error and I cant figure it out! Look at this line that is choking...

    DATEADD(MONTH, DATEDIFF(MONTH, 0, DATEADD(M,n,Files.LastModified)), 0) AS monthModified,

    Which one...

    There's no such thing as dumb questions, only poorly thought-out answers...
  • RE: Why cant I reference a column in a SQL Cursor?

    Hi Lynn / Cadavre,

    Sorry I am late today - meetings in the AM and more coming too - but while I have time I looked over the code you sent,...

    There's no such thing as dumb questions, only poorly thought-out answers...
  • RE: Why cant I reference a column in a SQL Cursor?

    When our clients use our tools they can specify about 10 or so parameters - that is what you are asking about...

    So, its the modified date of the file (eg,...

    There's no such thing as dumb questions, only poorly thought-out answers...
  • RE: Why cant I reference a column in a SQL Cursor?

    Lynn Pettis (5/1/2012)


    First, there is a much better split function that we can use. Will get to that later if someone doesn't beat me to it.

    Second, I am assuming...

    There's no such thing as dumb questions, only poorly thought-out answers...
  • RE: Why cant I reference a column in a SQL Cursor?

    Lynn Pettis (5/1/2012)


    Also, what counts are you trying to get. You provided the query you built the cursor on but you didn't show us what you were going to...

    There's no such thing as dumb questions, only poorly thought-out answers...
  • RE: Why cant I reference a column in a SQL Cursor?

    Here is fn_ISAppType

    ALTER FUNCTION [dbo].[fn_IsAppType](@LookingForAppBrand varchar(100),

    @AppBrandValue varChar(100))

    RETURNS int

    As

    BEGIN

    Declare @IsApp int

    IF @AppBrandValue = @LookingForAppBrand set @IsApp = 1

    ELSE

    set @IsApp = 0

    RETURN...

    There's no such thing as dumb questions, only poorly thought-out answers...
  • RE: Why cant I reference a column in a SQL Cursor?

    Lynn,

    In your second post you say "Thinking this is what you are trying get so far?" - uh, no... I dont get that many rows as shown in your...

    There's no such thing as dumb questions, only poorly thought-out answers...
  • RE: Why cant I reference a column in a SQL Cursor?

    Lynn,

    Thanks - sweet bit of code! Uh, yes... There is more work to do here and I promise I will try to do it with set based thinking...

    There's no such thing as dumb questions, only poorly thought-out answers...
  • RE: Why cant I reference a column in a SQL Cursor?

    Hello again Cadavre / Lynn,

    I have a question regarding the CTE Cadavre shared with me. I have done a bit of studying to get the brain wrapped around this...

    There's no such thing as dumb questions, only poorly thought-out answers...
  • RE: Why cant I reference a column in a SQL Cursor?

    Cadavre,

    Today I will study and dive into the CTE element much deeper - and yes, you are absolutely correct - we developers who have spent years (decades in my case)...

    There's no such thing as dumb questions, only poorly thought-out answers...
  • RE: Why cant I reference a column in a SQL Cursor?

    Cadavre...

    I apologize - yes, the CTE you forwarded is great, sleek, and well, its just getting my head around it that took time. I appreciate the code.

    And yes again...

    There's no such thing as dumb questions, only poorly thought-out answers...
  • RE: Why cant I reference a column in a SQL Cursor?

    Point taken... Good point too. Let me first try to finish what I am doing now as suggested elsewhere (which seems to be working better) and then we...

    There's no such thing as dumb questions, only poorly thought-out answers...
  • RE: Why cant I reference a column in a SQL Cursor?

    Ah, Gotcha...

    I got a couple great suggestions and some guideance off another SQL site and I am pursuing that right now. If I get stuck I will try to...

    There's no such thing as dumb questions, only poorly thought-out answers...
  • RE: Why cant I reference a column in a SQL Cursor?

    Thanks Lynn...

    However, there are no CREATE TABLE statements - this comes out of one of our core Databases, created 10 years ago (or more?) through the interface, not statements. ...

    There's no such thing as dumb questions, only poorly thought-out answers...
  • RE: Why cant I reference a column in a SQL Cursor?

    Wow...

    Thanks for the replies, and the advice. I made the cursor READ_ONLY, presuming that would help improve things - but if you guys are saying "Dont use cursors", that...

    There's no such thing as dumb questions, only poorly thought-out answers...

Viewing 15 posts - 16 through 30 (of 302 total)