replace function

  • i already posted.i am trying to solve this from so many hours.

  • riya_dave (4/25/2012)


    i already posted.i am trying to solve this from so many hours.

    Already posted where?

    We haven't seen anything that would help us help you with anything you have asked, and then you post things like "resolved" or "I got it" making it look like you aren't in need of anymore assistance. So which is it?

  • i posted in ssrs thread.

    nobody is giving me reply

  • I gave you an answer in that thread.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Sean Lange (4/25/2012)


    I gave you an answer in that thread.

    Yep, you sure did. All he asked is if anyone had any ideas.

    You provided him as good an answer as he ever provided us.

  • Ooops! Wrong thread!


    My mantra: No loops! No CURSORs! No RBAR! Hoo-uh![/I]

    My thought question: Have you ever been told that your query runs too fast?

    My advice:
    INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
    The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.

    Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
    Since random numbers are too important to be left to chance, let's generate some![/url]
    Learn to understand recursive CTEs by example.[/url]
    [url url=http://www.sqlservercentral.com/articles/St

  • Lynn Pettis (4/25/2012)


    Does anyone see anything wrong with this where clause?

    Where PortfolioBaseCode = Replace(@Portfolios,'@','') as reportheading1

    Let me try!

    I think it is a sub-query (inner select) of the larger query.

    Something inserting into temp table or UNION.

    If OP claims that PortfolioBaseCode is nvarchar and @Portfolio is nvarchar, then looks like his destination column is float.

    I would suggest OP to post complete query, but looks like he cannot even understand this simple combination of words: "complete" and "query"...

    Instead he usually gives something like "I've already posted it"

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • Try

    Where PortfolioBaseCode = Replace(@Portfolios,'@','')

  • Try

    Where PortfolioBaseCode = Replace(@Portfolios,'@','')

    riya_dave (4/25/2012)


    hi,

    i am using replace function.

    giving me error like 'Error converting data type nvarchar to float'

    reportheading1 is nvarchar(72)

    select ReportHeading1 From vPortfolioBase

    Where PortfolioBaseCode = Replace(@Portfolios,'@','') as reportheading1

    any help?

Viewing 9 posts - 16 through 23 (of 23 total)

You must be logged in to reply to this topic. Login to reply