The requirement is to copy rows from Table B into Table A. Only rows with an id that doesn't already exist, need to be copied over:
INSERT INTO A(id, x, y)
SELECT id, x, y
FROM B b
WHERE b.id IS NOT IN (SELECT id FROM A WHERE x='t');
^^^^^^^^^^^
Now, I was trying to write this with an outer join ...
I'm using NHibernate with Burrow and Fluent to shuttle data from SQLServer2005 into a directory full of FoxPro 7 dbf's.
When I try to save a new record through Burrow's GenericDAO, I get an exception that boils down to "Field XXX does not accept null values," where field XXX is a NOT NULL field that is not being mapped at all because it...
Im using an ajax json response to build some html to place in a webpage.
Occasionally I'll come across an empty value in my json.
This results in an empty object being placed into the html.
I would prefer not to check that each value is not an object, as that doesn't seem efficient.
Is there a better way?
my code works like this
...
I am reading from a SQL datareader in C# and passing the values from the columns to a dropdownlist. There are two columns being read. Using IsDbNull, I am able to handle the null values. However, as I have the code written right now, if dr.GetString(0) is null, no values are passed along at all, while as long as only dr.GetString(1) (or ...
im doing a gym software. i have a signin signout system.when members sign in this data is put in a table leaving the signout colomn empty.then when member sign out the signout cell is updated.up to here is fine. but if the member signed in and out twice i dont want the sigout time of the first time to be changed.i want only the null cell...
Is null an Object in Java?
...
I'm working on a formsapplication with a datagrid in it.
How can I disable or replace (null)-values in cells when im databinding the grid to a database.
When I am in the Designer view and clicking on the little arrow on the grid,I only see the option "Autoformat"
...
If I have this method:
this.getForm = function ()
{
try
{
var frmIndex = arguments[0];
if (isNaN(frmIndex)) frmIndex = 1;
if (window !== null)
{
if (window.opener !== null)
{
return window.parent;
}
else if (window.parent !== null)
{
if (window.parent.frames !== null)
{
if (window.parent.frames(...
Hello,
I am actually working on a Framework development, which means require a really strong coding methodology.
I am facing a problem where I do not know which System.Exception derivated class I need to throw. Basically the case is when I have a class with fields that can be optionnaly initialized by the constructor and that have meth...
Hi Folks,
following problem, i want to create an view in Oracle wich calculates an "utilization rate in percent".
AS SELECT
sw.SWITCH_ID,
sw.ASSET_ID,
sw.SYSTEMNAME,
sw.MAX_INSTALLABLE_PORTS,
sw.INSTALLED_PORTS,
sw.USED_PORTS,
(sw.INSTALLED_PORTS/sw.MAX_INSTALLABLE_PORTS)*100 AS UTIL_INSTALLED_PORTS,
sw.RES_INFRASTRUCTU...
This warning message I get from time to time from SQL server ...
Warning: Null value is eliminated by an aggregate or other SET operation.
Is this just saying that a value that was Null is being set to something other than Null.
Why do I need to be 'warned' about this?
...
Hi all,
I have this code. How can I check null values for SingleOrDefault method ??
public static List<ETY.Rol> GetRolesByApplicationAndCompany(this UsuarioContext usuario, int company, int app)
{
List<ETY.Company> lCompanies= usuario.Companies;
var roles = lCompanies.
SingleOrDefault(e ...
I have the following:
MyEnum? maybeValue = GetValueOrNull();
if (null != maybeValue)
{
MyEnum value = (MyEnum)maybeValue;
}
What I want to know is if that explicit (MyEnum) cast is necessary on an instance of type MyEnum?. This seems like a simple question, I just felt paranoid that there could possibly be some runtime error if ...
I'll start out by saying, use smart pointers and you'll never have to worry about this.
What are the problems with the following code?
Foo * p = new Foo;
// (use p)
delete p;
p = NULL;
This was sparked by an answer and comments to another question. One comment from Neil Butterworth generated a few upvotes:
Setting pointers to NUL...
What are the disadvantages to do so?
...
Theoretically I can say that
free(ptr);
free(ptr);
is a memory corruption since we are freeing the memory which has already been freed.
But what if
free(ptr);
ptr=NULL;
free(ptr);
As the OS will behave in an undefined manner I cannot get an actual theoretical analysis for this about what's happening.
Whatever I am doing, is th...
I have a web application the relies heavily on web services. Everything with the services is done asynchronously and with AddOnPreRequestHandlerExecuteAsync. Anyhow, most of my calls work just fine, but some are returning from their asynchronous service calls to find a null HttpContext.Current.Response/Request object in the endprerequest...
#ifndef NULL
#define NULL NULL
#endif
This code compiles in gcc with no warnings/errors. Can someone explain what the preprocessor is doing here?
...
in a simplified version, what i have is this:
public class MyLabel extends JLabel implements MouseListener{
private SomeControl control;
public MyLabel(SomeControl control){
this.addMouseListener(this);
this.control = control;
}
@Override
public void mouseClicked(MouseEvent arg0) {
Object x = this.control.getSomeProperty();
}
Eve...
ABAddressBook mybook = new ABAddressBook();
ABPerson[] allPeople = mybook.GetPeople();
foreach(ABPerson thisPerson in allPeople){
if(thisPerson.GetPhones() != null)
ABMultiValue<string> myMultiPhone = thisPerson.GetPhones();
}
}
I have the previous code in my application. With Monotouch build 1.4 my applicat...