Cannot convert a char value to money. The char value has incorrect syntax.

USE [RealEstate]
GO
/****** Object:  StoredProcedure [dbo].[search]   
Script Date: 03/18/2014 13:32:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[search]    
--location      
@locationName nvarchar(50),      
@parentId int, --*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-    
@locatioTypeName nvarchar(50),      
--property      
@propertyDetailsName nvarchar(50),      
@propertyDetailsStatus nvarchar(50),      
@propertyDetailsPriceFrom money,  
@propertyDetailsPriceTo money,     
@propertyDetailsQuantityFrom int,  
@propertyDetailsQuantityTo int,     
@propertyDetailsAreaFrom int,  
@propertyDetailsAreaTo int,      
@propertyDetailsRoomNumberFrom int,      
@propertyDetailsRoomNumberTo int,  
@propertyName nvarchar(50)     
as      
begin      
SELECT * from viewSearch       
where  (@locationName is null or (location_name like '%'+@locationName+'%' ) or location_name=@locationName  )
and ( @parentId is null or(parent_id=@parentId ))
and (@locatioTypeName is null or(location_type_name like '%'+ @locatioTypeName +'%'  ) or location_type_name=@locatioTypeName  )
and (@propertyDetailsName is null or(property_details_name like '%'+ @propertyDetailsName+'%' ) or property_details_name=@propertyDetailsName  )
and (@propertyDetailsStatus is null or (property_details_status like '%'+@propertyDetailsStatus +'%' ) or property_details_status=@propertyDetailsStatus      )
and (@propertyDetailsPriceFrom is null or @propertyDetailsPriceTo is null or(property_details_price between '%'+@propertyDetailsPriceFrom +'%' and '%'+@propertyDetailsPriceTo +'%' )  or property_details_price=@propertyDetailsPriceFrom or
property_details_price=@propertyDetailsPriceTo  )
and (@propertyDetailsQuantityFrom is null or @propertyDetailsQuantityTo is null or(property_details_quantity between '%'+@propertyDetailsQuantityFrom +'%'  and '%'+@propertyDetailsQuantityTo+'%'   )or property_details_quantity
=@propertyDetailsQuantityFrom or property_details_quantity=@propertyDetailsQuantityTo  )
and (@propertyDetailsRoomNumberFrom is null or @propertyDetailsRoomNumberTo is null or(property_details_roomNo between '%'+ @propertyDetailsRoomNumberFrom +'%'  and '%'+ @propertyDetailsRoomNumberTo +'%' )  or property_details_roomNo
=@propertyDetailsRoomNumberFrom or property_details_roomNo=@propertyDetailsRoomNumberTo   )
and (@propertyName is null or (property_name like '%'+@propertyName+'%' ) or property_name=@propertyName  )
and (@propertyDetailsAreaFrom is null or @propertyDetailsAreaTo is null or (property_details_area between '%'+@propertyDetailsAreaFrom+'%' and '%'+@propertyDetailsAreaTo+'%' ) or property_details_area=@propertyDetailsAreaFrom or property_details_area=@propertyDetailsAreaTo 
end

Fadi,
Can you try the below?? :
(Have removed '%' marks for searching wrt Between clause as string wise wildcard search is not needed for integer or money values - provided the columns are NOT in varchar but in int/money types.)
ALTER proc [dbo].[search]
--location
@locationName nvarchar(50),
@parentId int, --*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
@locatioTypeName nvarchar(50),
--property
@propertyDetailsName nvarchar(50),
@propertyDetailsStatus nvarchar(50),
@propertyDetailsPriceFrom money,
@propertyDetailsPriceTo money,
@propertyDetailsQuantityFrom int,
@propertyDetailsQuantityTo int,
@propertyDetailsAreaFrom int,
@propertyDetailsAreaTo int,
@propertyDetailsRoomNumberFrom int,
@propertyDetailsRoomNumberTo int,
@propertyName nvarchar(50)
as
begin
SELECT * from viewSearch
where
(@locationName is null or (location_name like '%'+@locationName+'%' ) or location_name=@locationName )
and ( @parentId is null or(parent_id=@parentId ))
and (@locatioTypeName is null or(location_type_name like '%'+ @locatioTypeName +'%' ) or location_type_name=@locatioTypeName )
and (@propertyDetailsName is null or(property_details_name like '%'+ @propertyDetailsName+'%' ) or property_details_name=@propertyDetailsName )
and (@propertyDetailsStatus is null or (property_details_status like '%'+@propertyDetailsStatus +'%' ) or property_details_status=@propertyDetailsStatus )
and (@propertyDetailsPriceFrom is null or @propertyDetailsPriceTo is null or(property_details_price between @propertyDetailsPriceFrom and @propertyDetailsPriceTo ) or property_details_price=@propertyDetailsPriceFrom or property_details_price=@propertyDetailsPriceTo )
and (@propertyDetailsQuantityFrom is null or @propertyDetailsQuantityTo is null or(property_details_quantity between @propertyDetailsQuantityFrom and @propertyDetailsQuantityTo )or property_details_quantity =@propertyDetailsQuantityFrom or property_details_quantity=@propertyDetailsQuantityTo )
and (@propertyDetailsRoomNumberFrom is null or @propertyDetailsRoomNumberTo is null or(property_details_roomNo between @propertyDetailsRoomNumberFrom and @propertyDetailsRoomNumberTo ) or property_details_roomNo =@propertyDetailsRoomNumberFrom or property_details_roomNo=@propertyDetailsRoomNumberTo )
and (@propertyName is null or (property_name like '%'+@propertyName+'%' ) or property_name=@propertyName )
and (@propertyDetailsAreaFrom is null or @propertyDetailsAreaTo is null or (property_details_area between @propertyDetailsAreaFrom and @propertyDetailsAreaTo ) or property_details_area=@propertyDetailsAreaFrom or property_details_area=@propertyDetailsAreaTo )
end
If your table columns are of varchar datatype and you'd wanna do a sequential (characater) search, then you may have the CAST/CONVERT operators in your Proc as suggested by Olaf ..
Thanks,
Jay
<If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

Similar Messages

  • Why i'm getting exception InvalidOperationException: Invoke or BeginInvoke cannot be called on a control until the window handle has been created ?

    I have a backgroundworker1 dowork event and inside:
    private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
    BackgroundWorker bgw = (BackgroundWorker)sender;
    if (bgw.CancellationPending == true)
    return;
    else
    this.BeginInvoke(new MethodInvoker(delegate
    timer1.Stop();
    Button1Code();
    timer1.Start();
    trackBar2.Enabled = false;
    trackBar1.Enabled = false;
    while (true)
    bitmaps = ImagesComparison.get_images_with_clouds(b1);
    for (int i = 0; i < bitmaps.Length; i++)
    ConvertTo1or8Bit.BitmapToGIF(bitmaps[i], @"c:\convertedgifs\" + i.ToString("D6") + ".gif");
    break;
    The exception is on the BeginInvoke part.
    In the last few days i was running the program many times and i didn't have this exception even once.
    And now every times i'm running it i'm getting the exception.
    System.InvalidOperationException was unhandled by user code
    HResult=-2146233079
    Message=Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
    Source=System.Windows.Forms
    StackTrace:
    at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
    at System.Windows.Forms.Control.BeginInvoke(Delegate method, Object[] args)
    at System.Windows.Forms.Control.BeginInvoke(Delegate method)
    at mws.ScanningClouds.backgroundWorker1_DoWork(Object sender, DoWorkEventArgs e) in d:\C-Sharp\Download File\Downloading-File-Project-Version-012\Downloading File\ScanningClouds.cs:line 715
    at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
    at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
    InnerException:
    Line 715 is: this.BeginInvoke(new MethodInvoker(delegate

    Where are you starting the background worker from?  Possibly the constructor of the form?
    It would be greatly appreciated if you would mark any helpful entries as helpful and if the entry answers your question, please mark it with the Answer link.

  • "Windows cannot be installed to this disk. The selected disk has an MBR partition table. On EFI systems, windows can only be installed to GPT disks." Error

    Hey Im getting the following error when trying to install windows from a USB. 
    "Windows cannot be installed to this disk. The selected disk has an MBR partition table. On EFI systems, windows can only be installed to GPT disks."
    I installed the windows 8 (64bit) iso using boot camp to a usb.  I was able to do this after changing the info.plist to allow me to place the iso on the usb.  After I make the partition and start the install, I get the above error.  I formatted the partition in the installation but I keep getting this error.  I've repreated the entire process but i keep getting this errror and the disk utility says my partition is a Windows NT File System (NTFS) so im not sure what's going on.  If you can help me that would be greatly appreciated

    I am having the same problem. Windows is trying to install. It identifies the various partitions but says that I cannot install Windows on the Boot Camp partition or any other. I select Drive options (advanced) and Format the Boot Camp drive, but it makes no difference.
    This is the Windows error:
    Windows cannot be installed to this disk. The selected disk has an MBR partition table. On EFI systems, Windows can only be installed to GPT disks.
    Windows cannot be installed to this disk. This computer's hardware may not support booting to this disk. Ensure that the disk's controller is enabled in the computer BIOS menu.
    I am not sure what Csound1 is suggesting with that post above. There are some involved suggestions over here <https://discussions.apple.com/message/23548999#23548999> about using Disk Utility to delete the Boot Camp partition and create new ones - is that the idea?

  • My lov results into the return value instead of the display value in APEX

    Hi,
    For 1 of the columns I'm representing in APEX, I choose 'Display as text, based on a lov'. I'm using:
    select aan.id||', '||r.naam||', '||a.woonplaats d, aan.id r
    from wmo_aanvragen aan
    , wmo_dossiers d
    , wmo_relaties r
    , wmo_adressen a
    where d.avg_1_id = aan.id
    and d.rel_nummer = r.nummer
    and a.rel_nummer = r.nummer
    and a.id = (select min(e.id) from wmo_adressen e where e.REL_NUMMER = r.nummer
    and e.EIND_DATUM is null)
    and d.id = (select min(f.id) from wmo_dossiers f where f.AVG_1_ID = aan.id)
    But somehow it displays the 'aan.id' value instead of the display value. Does anyone know howcome?? In TOAD it works fine
    Niels
    Edited by: user6394263 on 10-apr-2009 1:22

    Hello Niels,
    Your LOV Displays your concatenated value, but returns the "aan.id" (into the Form field), just as expected. If you want to show the description on your Form, use a PopUp LOV - Displays Description Return Key value
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • What values  to pass the import values of FM -KAUF_AUFNR_CHANGE.

    Hi,
    what values  to pass the import values of FM -KAUF_AUFNR_CHANGE.., Since the fields in FM are different from the values of database table fields.

    Hi,
    the import parameters in the FM are type of structures. it basically acts as a work area.
    when you execute the FM, and click on the icon in front of the field, for example, I_AFKO, and then you can enter the values you want to.
    Hope it helps,
    Preet

  • Error: Windows Cannot Be Installed to This Disk. The Selected Disk Has an MBR Partition Table.

    Error: Windows Cannot Be Installed to This Disk. The Selected Disk Has an MBR Partition Table.
    Error: Windows Cannot Be Installed to This Disk. The Selected Disk Has an MBR Partition Table. On EFI Systems, Windows Can Only Be Installed to GPT.
    I found one solution to this problem on hp forum but my laptop has boot legacy and does not disable the efi boot order.
    HP Model# HP 1000-1140TU Notebook PC
    Serial# 5cg2481dbg
    Product# c8c94pa#uuf
    This is solution which is found on hp forum
    SolutionThe resolution to this issue depends on the the hard disk volume size:
    Follow these steps if the hard disk volume size is less than 2.19 TB:
    Temporarily disable the EFI Boot Sources setting in the BIOS:
    Restart the computer, and then press F10 to enter the BIOS.
    Navigate to Storage > Boot Order , and then disable the EFI Boot Sources .
    Select File > Save Changes > Exit .
    Install the Windows operating system.
    Enable the EFI Boot Sources setting in the BIOS:
    Restart the computer, and then press F10 to enter the BIOS.
    Navigate to Storage > Boot Order , and then enable the EFI Boot Sources .
    Select File > Save Changes > Exit .
    Follow these steps if the hard disk volume size is greater than 2.19 TB:
    Install the HP BIOS Update UEFI utility from the HP Web site:
    Click here to access the document "HP BIOS Update UEFI" .
    NOTE:The HP BIOS Update UEFI utility is installed by default on some HP computers.
    Follow the steps in the Microsoft document titled "How to Configure UEFI/GPT-Based Hard Drive Partitions" (in English) to create a GPT partition.
    Click here to access the document "How to Configure UEFI/GPT-Based Hard Drive Partitions" .
    NOTEne or more of the links above will take you outside the Hewlett-Packard Web site. HP does not control and is not responsible for information outside the HP Web site.

    I am having the same problem. Windows is trying to install. It identifies the various partitions but says that I cannot install Windows on the Boot Camp partition or any other. I select Drive options (advanced) and Format the Boot Camp drive, but it makes no difference.
    This is the Windows error:
    Windows cannot be installed to this disk. The selected disk has an MBR partition table. On EFI systems, Windows can only be installed to GPT disks.
    Windows cannot be installed to this disk. This computer's hardware may not support booting to this disk. Ensure that the disk's controller is enabled in the computer BIOS menu.
    I am not sure what Csound1 is suggesting with that post above. There are some involved suggestions over here <https://discussions.apple.com/message/23548999#23548999> about using Disk Utility to delete the Boot Camp partition and create new ones - is that the idea?

  • Invoice created with value highier than the PO value

    Hello,
    I would like to know what should happen if an Invoice is created in the R/3 backend with a value higher than the PO value.
    Regards,
    Lina

    Hi
    <u>"If you do not define any tolerances, this means that it is not possible to enter a delivery/incoming invoice in EBP where quantity or value has been exceeded" So, this works different in SRM, that we do in R/3.</u>
    <b>Please go through the following links / SAP OSS Notes -></b>
    Note 835073 Enhancement of the tolerance checks
    Note 496901 Tolerance check - back-end service PO with/without limit
    Re: GR tolerance problem
    Tolerance Check for Price Variance is not working
    Re: Tolerance in SRM and ECC (BE R/3)
    Re: Tolerance Groups
    SRM: many confirmation for PO
    Re: MM-SUS Scenario---Error in R/3 IDOC when i change the Quantity in SUS
    TOG parameter and tolerance checks better understanding
    <b>Hope this will definitely help.</b>
    Do let me know, incase you need any other details.
    Regards
    - Atul

  • Run Variable values out of the "variable values window" in a excel workbook

    Dear experts,
    I am working on BI 7.10.
    Our workbooks are made of several data providers based on the same query and require many different variable values, which give us a long and unconvenient (for the users) "select values for variables" window (ex : we have a Profit and Loss report to run on different consolidation versions, fiscal years etc...)
    So I wonder if there is another way to enter these values, out of this window...(macro?)
    Many thanks for your help.
    Armelle

    my variables are global for all data providers since I use the same query for my data providers.
    It's just the values (some of them : ex: conso version) that differ from one data provider to another.
    ex : here for 2 diff Data providers based on the same query i need to enter the following values for mandatory variables
    Different versions / different years but same conso group / data entry year/ posting period.
    i would like to have the possibility to enter these values out of the "select values for variable" window (not convenient when we have 7 or 8 DP...), but directly in the workbook.
    But maybe this is not possible...
    In DP1                 
    conso version = A_PL                         
    conso group = FR01
    data entry year = 9999
    fiscal year = 2010
    Posting period = 12
    In DP2
    Conso version = P4_MAG
    Conso group = FR01
    Data entry year = 9999
    fiscal year =2011
    Posting period = 12

  • I cannot convert a PDF to a PPT - the system keeps asking me to sign in, but I am signed in ??!!!

    I cannot convert a PDF to a PPT. I have a paid up subscription but the system just takes me round in cirlces....

    Please don't post the same question multiple times!

  • How to Control Cheque value not exceed the PO Value

    Dear All,
    My client requirement of the how to control cheque make above the PO Value. My client make the PO before MIRO puchase dept. make the Advance payment request and send to Accounts Dept., Accounts dept. make the payment against the Down payment request. After that MIRO has been done full value open item show in vendor line itme. Account people clear the payment against the invoice. They run the APP & clear all payment.  But after that Purchase dept. make the advance payment request against same PO and send to accounts dept., Accounts dept again make the payment against down payment request. This is request to how to control that.
    Thanks in Advance
    (CSB)

    hi,
    here in this case you should change the Business Process to have better control over the system.
    Make the PO then make the Down Payment Request and make the payment.
    check is there any user exit available while making the down payment request which should not be made more than the po value.

  • Need Help, retrieving a combo boxes actual/print/visible value instead of the export value.

    Hello,
    I need help, retrieving a combo boxes actual value, not the export value.
    I have a combo box with multiple options to select from.
    each of those selections has a separate export value, which is in the form of a number, which I use to calculate dates in a separate field.
    However, I have another field that i want to retrieve the, users selected value, which is text, from the combo box instead of the export value.
    Is there an easy way to do this.
    This is what I am currently using. But like I said the results are that I retrieve the export value and not the selected text value.
    event.value = this.getField("_Arugula").valueAsString;
    Thanks

    First get the currentValueIndices property of the combo box and use it with the getItemAt field method to return (what I call) the display value. Something like:
    var f = getField("combo1");
    var display_value = f.getItemAt(f.currentValueIndices, false);
    See the documentation for more information

  • GR value is higher the po value

    Dear SAP GURU
    We have a problem with GR value.
    PO Quantity Order for item 10 is: 100.800 KG
    Net Order Price for item 10: 3.287,30 USD (Price Unit 1 TO)
    Conversion order qty: 1000 KG to 1 TO
    The GR value, in Purchase order quantity, should be:
    u201CQuantity Orderu201D x u201CNet Order Priceu201D / u201CConversion order qtyu201D
    We have posted two GR:
    1 u2013 gr qty is 50.400 KG, the gr value in foreign exchange is 165.679,92 USD, that is right!
    2 u2013 gr qty is 50.400 KG, the gr value in foreign exchange is  496.707,74 USD (net price is 9.855,31
    USD), that is wrong.
    No change in the PO items or header!
    We are not able to understand why we have this different valuation.
    Just for your information the IV has been posted before the first GR.
    Please let me know what I have to check in order to solve the problem?
    best regards
    marco

    Okay thanks to everybody for the support, following all the information in order to understand the matter
    PO curency: USD - American Dollar
    PO quantity: 100.800 KG
    PO Net price: 3.287,30
    Price Unit: 1
    Order Price Unit (Purchasing): TO u2013 Tonne
    Denominator for Conv. of Order Price Unit into Order Unit: 1000KG = 1 TO
    PO Exchange Rate: 0,64210 USD/EUR
    PO history data:
    1 u2013 IV
    Posting date: 09.10.2008
    IV Quantity: 100,8 KG
    Purchase Order Unit of Measure: KG
    Quantity in Purchase Order Price Unit: 0,101 TO
    IV Exchange date: 0,72830 USD/EUR
    Amount in document currency: 331.359,84 USD (3.287,30 usd x 100,8 kg)
    Amount in local currency: 241.329,37 EUR (331.359,84 USD x 0,72830)
    2 u2013 GR
    Posting Date: 06.02.2009
    GR Quantity: 50.400 KG
    Quantity in Purchase Order Price Unit: 50,400 TO
    GR Exchange Rate: 0,77950 USD/EUR
    Amount in document currency: 496.707,74 USD (this is what I am not able to reconcile)
    3 Posting Date: 16.02.2009
    GR Quantity: 50.400 KG
    Quantity in Purchase Order Price Unit: 50,400 TO
    GR Exchange Rate: 0,77980
    Amount in document currency: 165.679,92 USD (50.400 KG x 3.287,30 / 1000 ) this is correct.
    Maybe there is some problem with the order unity of measure, but what is strange is about the 1GR: 496.707,74 USD / 50400,00 KG * 1000 = 9855,31 this should be the net price, isntu2019it? But the PO net price is 3.287,30 usd could you please help to understand how the system works?
    Regards
    marco

  • How can I append to an array of defined length and have the first value added be the first value out.

    I want to build/append to an array. Let's say the length is defined at 10 elements. When the 11th element comes in I want the first element to be kicked out so that the array always has the most recent 10 elements in it in order. the arrays should look like this:
    {0,1,2,3,4,5,6,7,8,9}
    {1,2,3,4,5,6,7,8,9,10}
    {2,3,4,5,6,7,8,9,10,11}
    etc.
    Any help is greatly appreciated. Thanks 
    Solved!
    Go to Solution.

    Here's a revised VI, except I'm using LV8.5 and the lowest I can save down to is 8 so perhaps someone will be kind enough to convert this?
    Attached an image too
    Message Edited by Sima on 01-13-2009 06:14 PM
    Attachments:
    rotatearray[1].vi ‏14 KB
    rotatearray[1].JPG ‏66 KB

  • Store an encrypted numeric value and make the unencrypted value visible to just some users in Apex

    I'm looking for a way to store an encypted numeric value in one field in a table (so that it appears encrypted even to a DBA) and to display the unencypted value in Apex forms and interactive reports for some users but not others.
    Any suggestions as to how I could achieve this?
    Thanks in advance.
    Martin

    Try these documents:
    Using Column Masking to Display Sensitive Columns as NULL Values
    Using VPD in an APEX Application
    Securing Stored Data Using Transparent Data Encryption
    The features you request are Database Features.
    You could use DBMS_CRYPTO for data encryption instead of TDE, but you will have to create a package for your insert,update, deletes along with a view that allows decryption based on v('APP_USER').
    Also, you won't be able to search on that column if you use DBMS_CRYPTO.

  • GR value is lessthan the po value

    hi
    in the purchase order  gross price is 100 . we are not entered any discounts in the purchase order. but while doing Goods receipts  w r t purchase order . price is showing 90 . why this is happening
    regards
    sap mm

    Hi,
    If you have standard price mechanism in accounting then the material value is fixed irrespective of the PO price.
    So do you have a standard price mechanism or moving average price mechanism for the valuation of your material (Material master-Accounting view 1)...
    Kindly tell us.
    Regards,
    Prithviraj

  • Audit of attribute value change: is the old value available?

    When changing the value of an user attribute in the FIM Portal, the new attribute value is properly logged. This can be read in the request and in the standard report FIMUserHistory.
    The question is, what about the old value that was replaced? Is the old value available in the Data Warehouse somewhere, so one can make a report or is it gone forever (of course one can find the old value by looking at the previous attribute change or creation
    event, but this could be too long time ago)?
    Thanks for helping,
    Didier.

    As far I remember (I don't have access to test FIM Reporting now) in reports stored on Data Warehouse, there is no such thing as "old value". But as far I remember it, also very old data is stored there, so there can be something like:
    User: JJK003 -> New attribute (mail) value: [email protected] (12.12.2013)
    User: JJK003 -> New attribute (mail) value: [email protected] (12.02.2014)
    so, if you look closely to a history and sort it by user - you can determine what was the old value.
    http://technet.microsoft.com/en-us/library/jj133843(v=ws.10).aspx
    In report, you have always most recent display name of this user and of attribute's display name, but history should show what value was inserted long time ago and what value was set a week ago - than you know what value was there previously.
    But please be aware that users report, according to TechNet, does not include all properties:
    This report provides information about changes to key attributes on user resources in FIM, including account name, email, job title, and
    employee start/end date.
    Keep trying

Maybe you are looking for