<IsNotNull Property=""ORDERBY"">ORDER BY $ORDERBY</IsNotNull>

Status
Not open for further replies.

patrick

Well-known member
Joined
Dec 5, 2021
Messages
238
Programming Experience
1-3
I want to Convert the MS-SQL

C#:
    SELECT *                                           
    FROM HI_ERP_PLAN WITH (NOLOCK)                                           
    WHERE 1 = 1                                           
        <IsNotNull Property=""PLAN_DATE"">AND PLAN_DATE = @PLAN_DATE</IsNotNull>                                           
        <IsNotNull Property=""PLANT_CODE"">AND PLANT_CODE = @PLANT_CODE</IsNotNull>                                           
        <IsNotNull Property=""PRODUCT_CODE"">AND PRODUCT_CODE = @PRODUCT_CODE</IsNotNull>                                           
    <IsNotNull Property=""ORDERBY"">ORDER BY $ORDERBY</IsNotNull>                                           
    <IsNull Property=""ORDERBY"">ORDER BY PLANT_CODE ASC, PLAN_DATE ASC </IsNull>
 
How is this a C# question?
 
You can if it's related to C#. All you are doing here is asking us to translate some kind of XML notation for a query into SQL. Should I just go to my dentist to help me understand the diagnosis written by my podiatrist? They are both in the medical field.
 
You can if it's related to C#. All you are doing here is asking us to translate some kind of XML notation for a query into SQL. Should I just go to my dentist to help me understand the diagnosis written by my podiatrist? They are both in the medical field.

How do I delete a post? I'll delete it.

Do you know of any SQL query forum sites that you know of?
I need an internet site to ask for SQL.
 
You actually need to read iBatis and MyBatis documentation to see how that annotated XML is translated over into SQL by iBatis/MyBatis. Here's a page that seems to explain part of what happens with those annotations:

 
Status
Not open for further replies.
Back
Top Bottom