Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9017195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:12:15+00:00 2026-06-16T04:12:15+00:00

SQL Server syntax is: select tableAColumn1, tableAColumn2, tableBColumn1 from tableA, tableB where ISNUMERIC(tableAColumn1) =

  • 0

SQL Server syntax is:

select tableAColumn1, tableAColumn2, tableBColumn1
from tableA, tableB
where ISNUMERIC(tableAColumn1) = 1
and CONVERT(INT, tableAColumn1) = tableBColumn1
and tableAColumn2 = 'something'

What would be the best way to achieve this in Fluent NHibernate? How many classes would I need to help get the resulting ClassMap and how would it look like?

Edit:

public class BarausInfoMap : ClassMap<BarausInfo>
    {
        public BarausInfoMap()
        {
            Table("BARAUS");

            Id(x => x.nr);

            Map(x => x.betrag);

            Join("BARAUSLANG", m =>
            {
                m.Fetch.Join();

                m.KeyColumn("Ula");
                m.Map(x => x.bezeichnung);
                m.Map(x => x.sprache);
                m.Map(x => x.la);
                this.Where("m.la = 'SPE'");
            });
        }
    }

nr column is int and ula column is string, but I need to join those 2. also, the this.where refers to the outer table I guess, it should however refer to the inner table.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:12:16+00:00Added an answer on June 16, 2026 at 4:12 am

    Maybe it’s better to use separate entities and separate mapping, than you build query like

    queryOver<BarausInfo>.JoinQueryOver(x => x.BarauslangObject, barauslangAlias, JoinType.InnerJoin, conjunction)
    

    and the conjunction will contain the ISNUMERIC(tableAColumn1) = 1 and tableAColumn2 = ‘something’. And n the BarausInfo Mapping you can spefify something like References(v => v.BarauslangObject).Formula(“CONVERT(INT, tableAColumn1) = tableBColumn1”). Just find out how to specify columns in formula properly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not familiar with SQL Server syntax, but I imagine it would go something
SQL Server doesn't support the SELECT FOR UPDATE syntax, which is used by NHibernate
In MS SQL Server Management Studio 2005, running this code EXEC('SELECT * FROM employees
I have the SQL statement (SQL Server ) SELECT COUNT(ActionName) AS pageCount FROM tbl_22_Benchmark
In SQL Server, I have this query SELECT DISTINCT City FROM Person.Address But this
Using SQL Server 2000 Developer Edition, why would this code: select top 10 *
I'm having trouble with this query: SELECT * FROM OPENROWSET( 'SQLNCLI', 'DRIVER={SQL Server};', 'EXEC
Environment : SQL Server 2005 I have this type of request SELECT * FROM
I am attempting to select column names from a SQL Server database with the
In SQL Server 2000 I have a query like SELECT DISTINCT A.COLUMN1, B.COLUMN2 FROM

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.