Forum Replies Created

Viewing 15 posts - 661 through 675 (of 1,183 total)

  • RE: CURSOR v WHILE for beginners

    Depending on what the procedure eware_get_identity_id does, I think this is what you're looking for.

    INSERT Phone

    SELECT

    dbo.eware_get_identity_id('Phone')

    ...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: CURSOR v WHILE for beginners

    Matt Miller (12/17/2007)


    No yelling here....but let's see if we can do away with that cursor....It's got nasty overhead, and performance is usually why we get rid of them....

    Could you post...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: CURSOR v WHILE for beginners

    What does eware_get_identity_id do?

    Can this be turned into a function?

    If it's not too long, can you post it's definition?

    I ask because I'm thinking that this can be done in...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: how to restrict number of rows returned in a query

    Well, you could leverage the ROW_NUMBER() OVER() command in your proc and only return the rows needed that way.

    But for some reason, I think it's more efficient to return the...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: how to restrict number of rows returned in a query

    VB or VB.Net ?

    If .NET, look into paging. That's not one of my strong areas, but I think that's what you need. and I'm not sure if it exists in...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: how to restrict number of rows returned in a query

    Oh, and to turn it off ...

    SET ROWCOUNT 0

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: how to restrict number of rows returned in a query

    SET ROWCOUNT n

    Where n is the number of rows.

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: How to group by Academic Year..

    jamie.denman (12/13/2007)


    This is great, have learnt loads. Thanks Even though am using MySQL and Oracle still very useful.

    Quick one: most academic years are displayed as "06/07" any clue...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Remove the character "-" in a field and close up field afterwards

    Use four apostrophes.

    UPDATE yourTableNameHere

    SET yourFieldNameHere = REPLACE(yourFieldNameHere, '''','')

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Remove the character "-" in a field and close up field afterwards

    Then ....

    UPDATE yourTableNameHere

    SET yourFieldNameHere = REPLACE(yourFieldNameHere, '-','')

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Remove the character "-" in a field and close up field afterwards

    Use replace ...

    SELECT REPLACE('smith-jones-lewis', '-','')

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Facng Problem In CASE

    Nothing magical here, I'm just looking over your shoulder Andras. 😉

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Facng Problem In CASE

    Remove the SET= from the case as below ...

    DECLARE @TableName nvarchar(Max),@Abbreviation nvarchar(100)

    SET @Abbreviation='HH'

    SELECT

    @TableName =

    CASE @Abbreviation

    ...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Extract data to another table?

    Try searching this site for split functions. They'll take your single text value and return a set of the individual values.

    i.e...

    http://www.sqlservercentral.com/scripts/Miscellaneous/31913/

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: UK JOB & US JOB

    And then there's the non-SQL question "Where would you LIKE to work/visit?"

    I'd be willing to bet that the UK, US and other countries would have similar opportunities so the real...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg

Viewing 15 posts - 661 through 675 (of 1,183 total)