|
I want to learn how to combine two db tables which have no fields in common. I've checked UNION but MSDN says :
The following are basic rules for combining the result sets of two queries by using UNION:
The number and the order of the columns must be ...
Started by Tarik on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
If the tables have no common fields then there is no way to combine the data in any meaningful view view:
SELECT T1.*, T2.* FROM T1 JOIN T2 ON T1.IDFIELD1 = T2.IDFIELD2
You mention no fields are "common an identifying field....
|
|
I'm programming in C here, for Windows and various Unix platforms. I have a set of structs that have common fields, but also fields that are different. For example:
typedef struct { char street[10]; char city[10]; char lat[10]; char long[10]; } ADDR_A...
Started by Morinar on
, 12 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
Common fields will be accessible using any of the union member;
If there is common prefix you can....
Of the common fields are first, you should be able to just cast the pointer to an ADDR_A and treat also use an union.
|
|
Let's say you have two instances of the same bean type, and you'd like to display a summary of what has changed between the two instances - for example, you have a bean representing a user's settings in your application, and you'd like to be able to display...
Started by matt b on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Something like this:
Field[] oldFields = oldInstance.class.getDeclaredFields(); Field....
Basically, you have a loop over the fields, and you serialize the current field values at the same time them field by field.
|
Ask your Facebook Friends
|
How do I map "Joe Smith" to first name "Joe" last name "Smith"?
I already have code to split up the name, I'm not sure how to make that work with the Digester though.
<guestlist> <guest> <name>Joe Smith</name> </guest> <...
Started by ScArcher2 on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Loading from a file, you can also load from a stream XDocument loaded = XDocument.Load(@"C:\Guests.xml"); // Query the data and write out a subset of guests var guests= from c in loaded.Descendants("guest") select new { FirstName = SplitFunc_FirstName... .
|
|
In much of the code I have seen (on SO, thecodeproject.com and I tend to do this in my own code), I have seen public properties being created for every single private field that a class contains, even if they are the most basic type of get; set; like:...
Started by Callum Rogers on
, 13 posts
by 13 people.
Answer Snippets (Read the full thread at stackoverflow):
You may eventually need a more complex getter or setter, but if it's a field Age { get; set; }
instead of the old school....
Three reasons:
You cannot override fields in subclasses like you can properties.
Need, not what you need right now.
|
|
I want to make my fields as small as I can, but at the same time I don't want to have to go back and make them bigger later.
I was wondering if there is some sort of quick reference for field sizes and/or types for common database fields.
i.e., What is...
Started by Brian Ortiz on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The per-row cost of defining a table with at least one varchar field is nominal (one hard to change choices), regarding....
For using at least one varchar field in a table, but that cost is the same whether you have one or several varchars.
|
|
Hi guys, im pretty new to jQuery, and i dont know how to do that, and if it can be done without editing manually the plugin.
Assume to have a simply form like that:
<form action="page.php" method="post"> Name: <input type="text" name="Your name...
Started by DaNieL on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
It is reasonably common.
Use jQuery or another library, which would hide these details from you .
|
|
What the size that you use for common database fields, like firstName, lastName, Email, password, etc? I see these common fields in a lot of databases of blogs, forums, e-commerces, etc. But I don't know if there is some reference or default for the size...
Started by Click Ok on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Usually what I do for username fields like that is just choose an upper length such that anyone who valid input, but not so ....
Turns out that SMTP limits the length of fields to 256).
So there's your email field length.
Characters.
|
|
Hi,
I am trying to pull employee info from a table (SQL Server) using one data connection.
I have an employee list in Sharepoint 2010 with a few more fields than the table. I retrieve the list data using a separate data connection.
I want to display common...
Answer Snippets (Read the full thread at microsoft):
|
|
I'm designing a database table and once again asking myself the same stupid question: How long should the firstname field be?
Does anyone have a list of reasonable lengths for the most common fields , such as first name, last name, and email address?
Started by Patrick McElhaney on
, 10 posts
by 10 people.
Answer Snippets (Read the full thread at stackoverflow):
Email addresses maxed out at 62
Email : 50 chars
Address : 200 chars
If... .
So, if you need a fixed email field maybe junk winding up in that field.)
Last name was similar to first name.
In my full email address without considering any tags.
|