Project experience analysis

Source: Internet
Author: User
Select *
From
(
Select
M. mebname,
C. cardno,
M. mebid,
Px = row_number () over (partition by M. mebid order by newid ())
From
M_membermain as M (nolock)
Inner join
M_card as C (nolock) on M. mebid = C. mebid
Where
M. mebid in ({0 })
) As T
Where
Px <= 1

 

The preceding method can be used to group and retrieve any of them. Suitable for one-to-many relationships.

 

 

SQL learning ..

Select Top 100 * From gs_folio where folioid in (select folioid from ac_trans a left join ac_item B on A. Itemid = B. Itemid where B. Arrange = 'card ')
And folioid in (select folioid from ac_trans a left join ac_item B on A. Itemid = B. Itemid where B. Itemid = 2009)

Gs_folio one-to-multiple ac_trans one-to-one ac_item

If this problem is found, there will be cash expenditure and bank card transfers.

The landlord did not think about why CSHARP could parse JavaScript scripts,
So with the above code, we can actually make it easier ......
Introduce COM component Microsoft Script Control 1.0
Then the following code can be passed ......

Public static string exprtoval (string expr)
{
Msscriptcontrol. scriptcontrolclass SC = NULL;
SC = new msscriptcontrol. scriptcontrolclass ();
SC. Language = "JavaScript ";
Object OBJ = SC. eval (expr );
Return obj. tostring ();
}
Test:
Console. writeline (exprtoval ("1 + 2*(3 + 4 )"));

Datatable. conpute () can also be dynamically calculated

 

 

 

 

 

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.