4 tables. table 1 mapped to table 2 mapped to table 3 mapped to table 4.
I want to get a column data from table 4, in my search criteria for table 1 object. Is it possible using Alias. Is there any way using any API of Hibernate Criteria to get table 4 data in table 1 object using search criteria.
Hi All,
What LayoutManager should I use to achieve a transposed version of FlowLayout?
Essentially, I want a vertical list which occupies multiple columns if it can't fit all of it's components within one column.
+------------------------+
| item 1 |
| item 2 |
| item 3 |
| item 4 |
| item 5 |
| item 6 |
| item 7 |
| item 8 |
+------------------------+
or
+------------------------+
| item 1 item 7 |
| item 2 item 8 |
| item 3 |
| item 4 |
| item 5 |
| item 6 |
+------------------------+
How can I setup some format for cells in some column in my DataTable or GridView ?
I need to make some double columns rounded , for example :
3.564643 - 3.56
3.546723 - 3.55
6.654644 - 6.65
thank you.
In a file 4th column contains a floating point numbers
dsfsd sdfsd sdfds 4.5 dfsdfsd
I want to delete the entire line if the number between -0.1 and 0.1 (or some other range).
Can sed or awk do that for me?
thanks
My Table column (ID , startDate , EndDate )
I need to use this way with every row of the table :
not with a specific value like :
declare @start DATE = '2011-05-30'
declare @end DATE = '2011-06-10'
;with months (date)
AS
(
SELECT @start
UNION ALL
SELECT DATEADD(month,1,date)
from months
where DATEADD(month,1,date)<= DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,@end)+1,0))
)
select Datename(month,date) from months
it possible ??
Hi,
I'm trying to get a report done and I have a small problem with the twocolums and the line numbering in listings.
The text is on two columns, the listings can be on the two columns as well.
If I put the number=left, the space between the columns is not sufficient and the text from the first column is written over.
Is there any way to ask the listings to put the line numbers "outside" ?
Thanks
I know that if you define a width in a table's column, you can get automatic word-wrapping.
However, I need to control where newlines should happen in a specific table cell.
Thus, how can I insert manual line breaks in a LaTeX table cell?
Example:
There is a matrix of data called VE
There is a vector of string where the first element is the string VE.
I need to indirectly call the string and be able to access data.
For example if I need the 6th column of matrix VE then I want to do:
Vector[1][,6]
Essentially I need R to start reading those string as if they are the matrix names that are already in this page. I need this syntax to be dynamic because I am putting it in a loop.
I am using checkboxs in a GridView. I need to determine the value in the cell in the 2nd column, if a related row checkbox has been checked.
I am using C# 2008 and ASP.net
I need to know how to make a rating script for a site. I have a form that submits a rating out of ten to mysql. How would you get the average rating to be displayed from the mysqk column?
---using PHP with mysql
What do I need to consider before I switch a bunch of fields from VARCHAR(bignumber) to TEXT?
Aside from performance, and sometime in the far future TEXT will be deprecated, and aside from the fact that it looks like I need to drop and recreate the table to alter the column's data type?
This is for SQL 2000-- I can't do VARCHAR(max) and VARCHAR(8000) isn't large enough.
Hi all ,
In the properties windows , we come across buttons in a table cell < as in font property's row , a button can be clicked on to set font properties . Is there a way to insert a button in a Jtable 's second column < which i've created using netbeans .. how to do that , if it is possible ?
How can I sum (using Linux shell) numbers in a column? If possible, I don't want to use powerful tools like awk or perl. I want something like giveMeNumber | sum
I am using datagridview control and in this grid user can edit the value of a fixed column.
i want user only can write numaric values (e.g. 1, 2, 443 etc)
I am not sure at which event of datagridview i have to write this code and what is the code to trap values
I'm working on the BLOG functionality in MVC. I need to be able to create 'blog comments'. So each comment may have a parent comment etc.
Given table "Comments":
CommentId - int - identity autoincrement
PostId - int
ParentId - int
Comment - string
Is there a way to get a list of comments for a given article ordered by CreateDate and ParentId?
Or maybe there is a better table design you may suggest. What is the best design when inserting Post comments like this?
I'm using Entity framework.
thanks
The intention of following (simplified) code fragment is to return one random row.
Unfortunatly, when we run this fragment in the query analyzer, it returns between zero and three results.
As our input table consists of exactly 5 rows with unique ID's and as we perform a select on this table where ID equals a random number, we are stumped that there would ever be more than one row returned.
Note: among other things, we already tried casting the checksum result to an integer with no avail.
DECLARE @Table TABLE (
ID INTEGER IDENTITY (1, 1)
, FK1 INTEGER
)
INSERT INTO @Table
SELECT 1
UNION ALL SELECT 2
UNION ALL SELECT 3
UNION ALL SELECT 4
UNION ALL SELECT 5
SELECT *
FROM @Table
WHERE ID = ABS(CHECKSUM(NEWID())) % 5 + 1
I have two entities(actually more but it doenst matter)
Exam and Exam_Normals
Its a oneToMany relationship... The problem is that i need a primary key for Exams_Normals PK (Exam_ID Item)
Item should be 1 2 3 4 5 etc....
But cant achieve it getting errors
An alternative would be to:
I cound use an IDENTITY and a ManyToOne relationship at Exam_Normals but that should be like PK(Exam_Normals_ID) and a reference to Exam and an extra collumn
Item to keep an order.. SO 3 collumns
But to avoid the alternative tried
I tried with @IdClass and got errors
Tried @EmbeddedID everything nothing works
Any idea??
Hi,
I create one application in ecllipse.That application contains the coding to create table in google app engine
datastore.(i.e)Google Big table.In that application a created two table .After that i deployed the application.My constraints is ,is it possible to create a new table after depolyment the project and is it possible to create new column in already exits table.
Thanks in advance
Dears,
I have a column with some text in each cell.
I want to add some text , 4 example "X" at the start of all cells.
ie.
A B
----- >>>> ----
1 X1
2 X2
3 X3
What is the easiest way to do this?
thanx
I'm trying to figure out how to use Zend_Db_Table_Abstract correctly. I want to return just the name column from my query. Can you please explain what's wrong with the following code?
class Model_DbTable_Foo extends Zend_Db_Table_Abstract
{
protected $_name = 'foo';
public function getFooById($id) {
$select = $this->select(true)->columns('name')->where('id=' . $id);
$row = $this->fetchRow($select);
print_r($row->toArray());
}
}
HI.I searched this question inform and I found solution to change column property Unique Index.Now If I try to insert same record cmd.ExecuteNonQuery() gives error that record exist ,but how can use this exception to give user a message that record exist and must enter new one ? I am trying to make some thing like
if(cmd.ExecuteNonQuery() !=true )
{
MessageBox.Show("User Exists");
}
But I dont know what returns cmd.ExecuteNonQuery() ?
Or I must get records using reader in table and compare them with text in Textfiel?
Hey, what i want to do is to make a int that will be the ID of the entity and auto increment itself whenever a new entity is added (just like a SQL identity property). Is this possible? i tried using indexed (checked on attribute) however there is no description to what indexed even does.
EDIT:
I am adding annotations to a map, when you click the pin the annotationview with a chevron shows up. Now when you click this button i would like to load an associated picture. However the only way i know how to link the picture to this button is to give the picture a unique id, and then set the button.tag to this id and then load based on the button.tag.
All of the NHibernate examples I've see that use hbm files have the hbm.xml file set as an embedded resource with "do not copy" chosen in the file properties. This means that if a database column name were to change in production, the app would have to be recompiled with the changes in the hbm.xml file during build time.
Is there any way to make NHibernate load the hbm.xml files from the file system at application startup instead of using an embedded version?
Is there a way to format a gridview column footer value as currency. I'v set the DataFormatString of the BoundField to {0:c} but this doesn't seem to affect the footer. Do I have to do it in the RowDataBound event?