.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Nhibernate query ? specific field

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :ASP.Net

how to pick a specific field (besides Primarykey field ) through HQL query ???

View Complete Post

More Related Resource Links

Dynamic query for Null field checking

Hi I want dynamiclly find the table to null values finding.. Please give me quickly   Regards Ram

Dynamic query for datalength field checking

Hi   Please tell me the dynamic query length in table

Dynamic query for Null field checking

Hi I want dynamically check the data Formation query in SQL server please  provide me the query

using a database field as a hyperlink query?

I have three tables in my sql database contactssurvey answersrespondent_initialContacts holds all customer data with custid. survey answers has assigned everyone how took the survey a number in a field called respondent_no.respondent_initial holds input from a webform where I populated it with the custid from contacts and respondent_no from survey answers before the webform input is inserted. I want to send an email to them that had there respondent_no in a hyperlink to the webform so that when they entered their data into the webform it would use the repondent_no to determine where to insert the form data.Example joe clicks http://www.myplace.com/order.aspx?23             Mike clicks http://www.myplace.com/order.aspx?125it would look up respondent_no (23) from the respondent_initial table and insert the data in that row in the database for joe's webform entry and it would look up respondent_no (125) from the respondent_initial table and insert the data in that row in the database for mike's webform entry.my code behind looks like this// Create command                comm = new SqlCommand("INSERT INTO respondent_inital (Practice_Name, Address1, Address2, City, State, Zipcode, Phone, Email, Contact, Dealer, item_9223, item_9129, item

Examples for custom query using nhibernate in asp.net 3.5

I am doing a project in which i am using nhiberante ORM, In that they provide default method, but i req. more custom query like getting data by using join, to get particular column, So, i req. help from expert developers, plz help me. Thanks in advanced.

Field method missing with LINQ query

H, I want to access the data from datatable object. When i trying to get the fieldslist usng "Field" method. But I could not find the method with my table object.  Eventhoguh i forcibly write a method and trying to access the fields, It is giving the below error for the first join in query. Rest of the lines are fine. What is the reason behind it. The errro: "Error 2 'LINQ2DB.SP_VS_OP' does not contain a definition for 'Field' and the best extension method overload 'System.Data.DataRowExtensions.Field<T>(System.Data.DataRow, string)' has some invalid arguments" What is the meaningof the error. Shall i do any other changes in the query line?                         var QueryChnl = from oSPOP in SPOP.AsEnumerable()                        join oDiscChannel in DiscChannel.AsEnumerable() on oSPOP.Field<int>("spid") equals oDiscChannel.Field<int>("SPID")                        join oChannel in Channel.AsEnumerable() on oDiscChannel.Field<in

How to get one specific row to be the last row returned from a query?

 I have a table of skills.  In that table, are rows of data with various skill type.  I need to return a list of those skills in alphabetical order, with one exception.  The skills "General" can't be listed in the "G's", instead, it needs to be the last item.  (Crazy, I know, but it's to discourage users from settling on a selection of "General".  This statement returns all the skills in alphabetical order, but "General" is listed right in the middle with other "G's:SELECT SkillsID, Skill, SkillDesc FROM tSkills  ORDER BY Skill

MDX query to filter on specific dimension attributes

Ok, trying to figure out how to filter on specific dimension attributes. Are there any suggestions? I have a measure that needs to be filtered by a dimension that has numerous attributes (20 attributes in total) but I only want to show that measure against 10 of the attributes and once I get that result I need filter that result set against my time dimension (which this part I have figure out)   This is what I have so far: With member [calculated_measure_name] as ( [measures].[count_of_people], { [dimelgiblestatus].[elgible].[elgible1], [dimelgiblestatus].[elgible].[elgible2], [dimelgiblestatus].[elgible].[elgible3], [dimelgiblestatus].[elgible].[elgible4], [dimelgiblestatus].[elgible].[elgible5], [dimelgiblestatus].[elgible].[elgible6], }   )   Select [calculated_measure_name] on columns, [date].[fsicalyear].&[2008], [date].[fsicalyear].&[2009], [date].[fsicalyear].&[2010], [date].[fsicalyear].&[2011] on rows from mycube   When I run it, it gets no errors but in the result set for the numbers I get "#error"; do I need to basically create a subcube in order to get the result like I would like? If so how would I start doing that?   ThanksNetwork Analyst

User Specific Values for a Drop Down "Choice" Field

I would like to create a drop down field which has some fields disabled or not visible based on the user logged in.  Is this possible?

parameterized query and Date Field

Hi!Using this SQL:SELECT fac_op_d.cod_art_i, SUM(fac_op_d.cantidad) AS total, inv_mp_m.nombre, fac_op_d.fec_doc FROM fac_op_d, inv_mp_m WHERE fac_op_d.cod_art_i = inv_mp_m.cod_art_i AND (fac_op_d.cod_art_i LIKE ? + '%') AND (inv_mp_m.almacen = 1) AND (fac_op_d.fec_doc BETWEEN ? AND ?) GROUP BY fac_op_d.cod_art_i, inv_mp_m.nombre, fac_op_d.fec_docThis is a query to an old FoxPro database on a server (Same Network). This work in the execution, but just passing the date values as aaaa/mm/dd.On my page when a pass two DateTime Parameters from two TextBox it throw "Unable to recognize the string as a valid DateTime Value"I'm using Ajax Calendar exterder on the textbox to be more specific.Here, (My Country)  the format i'm using es dd/mm/aaaaAnd when i select the datepicker it comes in this format, and then a get the DateTime error type.I can get the rows in the query builder just passing the date like "2010/01/15" and "2010/01/30" for example.Hay can i force the texbox to get this format aaaa/mm/dd?regards

Is there a way to use the value of a Field in a Query as another Field?


The situation is more complex than this, but this has the essence of it.

Two Tables:  History and Current

History has the fields:  lHistoryId, lCurrentId, FieldChanged, DateChanged, OldValue, NewValue,

Current has the fields:  lCurrentId, FieldA, FieldB, FieldC, FieldD

I woudl like to right a Query which shows all of the changes made during a certain period, as well as the current value for those fields.

The outpout would look something like:  (FieldC changed to "TestC3" after the period being queried for)

FieldChanged        OldValue        NewValue        CurrentValue

FieldB                   TestB1        TestB2        TestB2

FieldC                   TestC1        TestC2        TestC3


"SELECT FieldChanged, OldValue, NewValue FROM History WHERE (lCurrerntId = 123) AND (<...Date Range...>)" is the easy part, but how to get the CurrentValue?<

How to return a specific field from the last record entered


I have two tables, Discrepancies and Actions that are linked by a field called JobNumber

What I need to do in a stored procedure is return a date field from the last record entered in the Actions table where the JobNumber is the same

The Actions tables primary key is an Identity field.

I'm trying to make a subquery but am stuck on the syntax.

Any help would be appreciated, this is just a bit beyond my skill set. Thanks.

Content Query Webpart to show edit item link field in SPS2010


I have a Content Query Webpart in SharePoint 2010 that I would like to surface Documents grouped by content type. I wish to show the edit form or view Properties link as part of the fields shown in the results. When the User clicks on this link, it should take him to the edit form or view Properties page for the document.

Any ideas?

Query an XML field


This seems like a simple thing to do, but I can't figure out how...

I have an XML field in my table called Rules.  The data looks like this:




<LookupSet BusinessColumnName="Produce" Grocer="ABC">

  <Lookup LookupID="5" OutputValue="Fruit">





  <Lookup LookupID="6" OutputValue="Fruit">





  <Lookup LookupID="7" OutputValue="Fruit">





  <Lookup LookupID="8" OutputValue="Vegetable">







Incremental processing - do I need to provide specific query?



I have read a few thread on this subject but I didn't get a clear understanding on how incremental processing works.

My question is.. I have a Fact view with with TimeID,Computerid as primary keys. I would expect when I do an incremental processing that SSAS figure out for which keys the cube doesn't have data and insert the missing ones. However, it looks like you have to specify the query to determine the data that should be incremented in the cube, is that right?

How could I do then if my TimeID isn't populated sequentially? For instance, I could write a query to get only today's data but it's very possible that tomorrow or the day after there are still some late rows being inserted with todays timeID but at that time my query would miss these rows. Please let me know if the explanation is a bit confuse.


How do find what query is being executed on specific session ID?



I have a SP which writes to a table all processes which are being executed when application decides to stop waiting for results of the query. It works very well but problem is that it does not dump all SPIDs but only some of them which are being executing for a long time. Common pattern that a lot of SPIDs will be blocked by single SPID which will not be part of the output which is being generated. How do I dump all SPIDs and what they are doing along with SP below?


 'blk object' = t1.resource_associated_entity_id,

 (SELECT SUBSTRING(text, t3.statement_start_offset/2 + 1,
 		(CASE WHEN t3.statement_end_offset = -1 
 			THEN LEN(CONVERT(nvarchar(

Lookup field which allows multiple choice - problem when query with CAML


I created one simple list and added one column - lookup - I've chosen some source list and field, then marked "Allow multiple choice". I created new item in that list, by adding more than one valie to that coulm.

The problem is, when I use CAML query, that column has such values:


and it's suppose to be like this:


do You have any idea, why it doesn't query first ID?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend