Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2010
    Location
    ISHHHH
    Posts
    130

    Unanswered: small clarification

    i was studying the sp can't understand wt ###### means in this query
    Code:
    if @psSortOrder = ''
      Set @psSortOrder = 'fld_strUOMName ASC'
    
     Set @psSortOrder = ISNULL( @psSortOrder, 'MAXPages ASC')
     SET @sInverseOrder = UPPER( @psSortOrder )
     Set @sInverseOrder = REPLACE( @psSortOrder , ' ASC', '######')
     Set @sInverseOrder = REPLACE( @sInverseOrder , ' DESC', ' ASC')
     Set @sInverseOrder = REPLACE( @sInverseOrder, '######', ' DESC')
    seems like silly but little bit confused any one plzzzz will be awarded
    WiTh Tnks & ReGaRdS
    mAtHuKuMaLi

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Looks like they are switching between ASC and DESC sort orders. The '######' is just used as a placeholder.

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Try popping a
    Code:
    PRINT @sInverseOrder
    Between each line and see how the value changing for yourself
    George
    Home | Blog

  4. #4
    Join Date
    Jul 2010
    Location
    ISHHHH
    Posts
    130
    Quote Originally Posted by MCrowley View Post
    Looks like they are switching between ASC and DESC sort orders. The '######' is just used as a placeholder.
    thanks dude my doubt was cleared
    WiTh Tnks & ReGaRdS
    mAtHuKuMaLi

  5. #5
    Join Date
    Jul 2010
    Location
    ISHHHH
    Posts
    130
    Quote Originally Posted by gvee View Post
    Try popping a
    Code:
    PRINT @sInverseOrder
    Between each line and see how the value changing for yourself
    yesss the main theme of the sp is print @sInverseOrder i was struck here on ##### now it was cleared thanks to both of u

    this forum was very helpful for me
    WiTh Tnks & ReGaRdS
    mAtHuKuMaLi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •