alias

SQL Table Aliases - Good or Bad?

What are the pros and cons of using table aliases in SQL? I personally try to avoid them, as I think they make the code less readable (especially when reading through large where/and statements), but I'd be interested in hearing any counter-points to this. When is it generally a good idea to use table aliases, and do you have any prefe...

Double Quotes in Oracle Column Aliases

Ok, this is bit of an obscure question, but hopefully someone can help me out with it. The system I'm working on builds a dynamic SQL string for execution inside a stored procedure, and part of that dynamic SQL defining column aliases, which themselves are actually values retrieved from another table of user generated data. So, for exa...

Finding network alias in .net

Is there a way in .net 2.0 to discover the network alias for the machine that my code is running on? Specifically, if my workgroup sees my machine as //jekkedev01, how do I retrieve that name programmatically? ...

What are your most important console aliases?

Which one alias would you choose to keep if your .bash_alias/.bashrc/etc could only contain one line? ...

Is it correct to use inheritance instead of name aliasing in c#?

In other words, is it correct to use: public class CustomerList : System.Collections.Generic.List<Customer> { /// supposed to be empty } instead of: using CustomerList = System.Collections.Generic.List<Customer> I'd rather use the first approach because I'd just define CustomerList once, and every time I needed a customer list ...

Double quotes in Oracle Alias

Hi, I am having fickle of problem in Oracle 9i select 1"FirstColumn" from dual; Oracle throwing error while executing above query. ORA-03001: unimplemented feature in my Production server. The Same query is working fine in my Validation server. Both servers are with Oracle 9i Any one have Idea what's wrong...? Is this something conf...

C# Default scope resolution

I have inherited a c# class 'Button' (which I can't change) which clashes with the BCL class 'Windows.Forms.Button'. Normally, Id be very happy to go: MyPackage.MyClass.Button; But there are a large number or references to this class which is a pain to have to re-type. Is there any way to get the compiler (linker?) to default to usin...

Can't connect to SQL Server using an Alias

I have a SQL Server 2000 install on a server that I am having weird connection issues with. Using SSMS I can't connect to it using an Alias I have setup on Configuration Manager. The Alias is set to use TCPIP which is the first protocol in the order below shared memory. If I use the exact same server name I put into the Alias then I...

How does one - without inheritance - override a class method and call the original from within the new method?

I found one source which successfully overrode Time.strftime like this: class Time alias :old_strftime :strftime def strftime #do something old_strftime end end The trouble is, strftime is an instance method. I need to override Time.now - a class method - in such away that any caller gets my new method, while the new me...

How can I automatically quote or group commandline arguments for alias in bash?

I have a script that takes a command and executes it on a remote host. It works fine, for example: $ rexec "ant build_all" will execute the "ant build_all" command on the remote system (passing it through SSH, etc). Because I'm lazy, I want to set up an alias for this command (and ultimately, several others), such that, for example,...

Readable SQL aliases

Since I'm sure many people have different standard, I've made this post a community wiki. My question is, what's a good naming scheme for table aliases? I've been using the first letter of every word from the table name, but it's been getting quite unreadable. Here's a quick example. FROM incidents i FROM cause_attack ca FROM obscure_t...

In IPython how do I create aliases for %magics?

Let's say I want to create the alias %xed for %edit -x. How would I do it? ...

What type of scope does Haskell use?

I'm trying to figure out if Haskell uses dynamic or static scoping. I realize that, for example, if you define: let x = 10 then define the function let square x = x*x You have 2 different "x's", and does that mean it is dynamically scoped? If not, what scoping does it use, and why? Also, can Haskell variables have aliases (a diff...

How to use apache mod_rewrite and alias at the same time?

I have a directory outside the webroot that is used for storing images uploaded from a separate admin system. Images are stored in this format: filepath/writable/images/00/00/23/65/filename-236581.jpg (where the webroot is filepath/html) ...for example. Here, 236 is the ID of the image in the database, and the file system is broken in...

Using an Alias in a WHERE clause

I have a query which is meant to show me any rows in table A which have not been updated recently enough. (Each row should be updated within 2 months after "month_no".): SELECT A.identifier , A.name , TO_NUMBER(DECODE( A.month_no , 1, 200803 , 2, 200804 , 3, 200805 , 4, 20...

MySQL: Use Aliased Fields in Aggregate Functions

I have a SQL statement similar to this: SELECT COUNT(*) AS foo, SUM(foo) AS foo_sum FROM bar But MySQL doesn't allow this because foo is an alias. Does anyone have an idea of how this could be accomplished in SQL? ...

Escaping double quotes with tcsh alias

I'm trying to run the following commands: replace -x "must " A2input.txt replace -x " a" -f -s ## A2input.txt replace -x to -s ## -a A2input.txt replace -x faith -f "unequivocal" A2input.txt And it'd be nice if I could just alias it to something short and simple like "a", "b", "c", "d", etc... However, some of those arguments have a ...

Database alias in Informix

In Informix I can run SQL statement that use other database: INSERT INTO other_db:mytable ... I would like "unite" both databases, but I would like do it "step by step". At first I want to move all data from other_db to main database and make alias that other_db = main_database. This way I will have time to remove "other_db:" from al...

Using Alias in Apache ONLY if local directory not present?

Hey all, We're running a reseller web host, and aliasing a particular directory for ALL the sites within. This is all happening through WHM/Cpanel, which could possibly complicate my question. We want all hosts to run their "/concrete" directory through a shared location on the server. This is working fine by adding "Alias /concrete/...

How to create Sql Synonym or "Alias" for Database Name?

I'm using ms sql 2008 and trying to create a database name that references another database. For example 'Dev', 'Test', 'Demo' would be database names that i could reference from my multiple config files, but each name would point to another database such as 'db20080101' or 'db20080114'. [Edit]Some of the configs are for applications t...