Can anybody help me with the syntax?
insert into history (company,partnumber,price) values ('blah','IFS0090','0.00') if company NOT IN ('blah','blah2','blah3','blah4','blah4') and partnumber='IFS0090';
Background: I have a history table which stores daily company, products and prices. But sometimes a company will remove itself for a few days.…
While trying to optimize SQL scripts, I was recommended to add indexes.
What is the easiest way to specify what Database the index should be on?
IF EXISTS (SELECT * FROM sysindexes WHERE NAME = 'idx_TableA')
DROP INDEX TableA.idx_TableA
IF EXISTS (SELECT * FROM sysindexes WHERE NAME = 'idx_TableB')
DROP INDEX TableB.idx_TableB
In…
I'm trying to improve the maintainability of some code involving reflection. The app has a .NET Remoting interface exposing (among other things) a method called Execute for accessing parts of the app not included in its published remote interface.
Here is how the app designates properties (a static one in this example) which are meant to be…
I have a requirement to develop a .NET-based application whose data requirements are likely to exceed the 4 gig limit of SQL 2005 Express Edition.
There may be other customers of the same application (in the future) with a requirement to use a specific DB platform (such as Oracle or SQL Server) due to in-house DBA expertise.
Questions
…
Is this equivalent to a LEFT JOIN?
SELECT DISTINCT a.name, b.name
FROM tableA a,
(SELECT DISTINCT name FROM tableB) as b
It seems as though there is no link between the two tables.
Is there an easier / more efficient way to write this?
I have two vectors of MyObj structs. MyObj is defined as follows:
struct MyObj
{
float x, y;
unsigned int data[8];
unsigned int tmp[1];
MyObj(const MyObj &m)
{
x = m.x; y = m.y;
tmp[0] = 0;
for (int i = 0; i < 8; ++i)
{
data[i] = m.data[i];
}
}
};
I then have two…
Hi,
I am using areas in MVC version 3.
My logoff and logon action methods are routing to the area, and I need them to route to the normal controller that is not in an area.
I have tried the following
host://AREA/CONTROLLER/METHOD instead of host://CONTROLLER/METHOD.
@if(Request.IsAuthenticated) {
<text>Welcome…
Hello,
I want to set the size of a JFrame such that the contentPane is the desired size. JFrame.setSize() doesn't take the window decorations into account, so the contentPane is slightly too small. The size of the window decorations are platform and theme specific, so it's bad news to try to manually account for them.
…
Hello. I have a C# application wherein serial (COM1) data appears to sometimes not get transmitted. Following is a simplified snippet of my code (calls to textBox writes have been removed):
try
{
serialPort1.Write("D");
serialPort1.Write(msg, 0, 512);
…
I would like to write a "daemon" application that will add a special audio filter (e.g. audio enhancement) to AudioRecord. The result should be as follows:
Whenever any VoIP application (e.g. Skype,...) will create an AudioRecord, the captured audio will be first filtered using my daemon application…
The following SQL statement has a syntax error according to phpMyAdmin, but I can't spot what it is. Any ideas?
CREATE TABLE allocations(
`student_uid` INT unsigned NOT NULL DEFAULT 0,
`active` INT unsigned NOT NULL DEFAULT 1,
`name` VARCHAR( 255 ) NOT NULL DEFAULT '',
`internal_id` VARCHAR( 255…
Is there a standard way to create unique web page address in ASP.NET? I'm sending surveys to customers and will be including a link to the web page. For example:
http://www.mysurveypages.foo/survey/UniqueID
I would then customize the survey based on who I sent it to. I know it can be done…
I always find myself needing to enclose a block of code in curly braces { }, but unfortunately that isn't included in the C# surround code snippets, which seems to be an oversight. I couldn't find anything on building your own surround snippets either (just other kinds of snippets).
I am…
I have a script that create a new div element. Then, I want to append the div to the body of the page using appendChild method.
The script is look like this :
var div = document.createElement('div');
div.id = 'newdiv';
document.body.appendChild(div);
Unfortunately, the div also appended…
Hi I'd like to programatically increase the height allocated to a TextView, and have the activity layout redrawn accordingly (the text view has a maximum height until the user clicks it, then it takes up all height required, wrap_content).
setHeight() isn't working, even coupled with…
In the spirit of undefined behavior associated with sequence points such as “x = ++x” is it really undefined?, how does one get the compiler to complain about such code?
Specifically, I am using Visual Studio 2010 and Xcode 4.3.1, the latter for an OSX app, and neither warned me…
I am blogging from a warm, sunny NYC today. We are here, sponsoring and attending Forrester's Customer Experience Forum 2011.
Customer Experience Management has been a key area of focus for us in CRM. Our VP of CRM and eCommerce Product Marketing Kirk Mosher…
The GlassFish distribution is optimized for developers and need simple deployment and server configuration changes to provide the performance typically required for production usage. The formal Performance Tuning Guide provides an explanation of capacity planning and…
Are you feeling nostalgic for the days of classic Stargate SG-1 adventure? Then get ready to dial up that DHD and gate into a whole new desktop with our Stargate SG-1 Customization set.
Latest Features
How-To Geek ETC
How to Get…
Hi, my name’s Dan Wahlin and I’m a workaholic – I admit it. It’s good from the standpoint that I get a lot done but it also has a lot of cons associated with it as well that I’m not proud of. I literally can’t watch TV without feeling like I should be doing…
Your laptop’s got a trackpad, you use a mouse for gaming, and you’re tired of manually switching settings constantly. Here’s how to separate both devices and how to set up a hotkey to switch between two settings on one device.
Latest Features
…