alias

Is it mandatory to use an ALIAS when we are doing some operation on the column?

Folks, Is it mandatory to use an ALIAS when we are doing some operation on the column? Ex: select upper(col1) from table1 when i am trying to retrieve the resultset by rs.getString("col1"), it was giving this exception COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0611E Invalid column name. SQLSTATE=S0022 when I changed the qu...

Visual Studio Shortcut/Alias In .csproj

Within Visual Studio I'm pretty sure there is a way to "alias" a file among several projects. So in other words the actual file lives in only one place within the file system but has multiple references within two or more .csproj files. Short of opening the .csproj and creating such an alias, how would I do this within Visual Studio? ...

httpd.conf: ignore certain directories?

I have an httpd.conf file that looks like this: Alias /media/ /var/projects/potato_gun/media/ WSGIScriptAlias / /var/projects/potato_gun/django.wsgi The problem is, I broke all my URLs that start with /~username because they get sent off to django.wsgi instead. Is there anyway I can get it to ignore any URL that starts with /~? ...

Referencing MySQL Alias of Aggregate Column

Following up on my question summarizing-two-conditions-on-the-same-sql-table, I added a RATIO column that is simply one SUM(...) column divided by a second SUM(...) column: SELECT COMPANY_ID, SUM(CASE WHEN STATUS IN (0, 1) THEN 1 ELSE 0 END) AS NON_BILLABLE, SUM(CASE WHEN STATUS IN (2, 3) THEN 1 ELSE 0 END) AS BILLABLE S...

Bash alias query

How can I turn the following command into a bash alias? find . -name '*.php' | xargs grep --color -n 'search term' Where I can specify the file extension and 'search term' is obviously the search term :) So what I want to do is: searchFiles 'php' 'search term' How do I pass the input into the alias? Should I just create a bash sc...

Namespaces, aliases and Visual Studio Forms Designer

Hi. I'm having a problem with conflicting namespaces and code that gets autogenerated by the forms designer in Visual Studio 2008. I have search many forums and different documentation, but have not been able to find any solution to this problem. I have one assembly called Foo.dll with the following namespace/code: namespace Foobar.Sy...

Hibernate, aliases

Hello! I noticed that hibernate generates different aliases for the same columns each time i try to access the same table: Hibernate: select person0_.id as id0_0_, person0_.nam as nam0_0_, person0_.fam as fam0_0_, person0_.otc as otc0_0_ from web_db.Person person0_ where person0_.id=? Hibernate: select person0_.id as id4_0_, person0_.n...

How do I include parameters in a bash alias?

Trying to create: alias mcd="mkdir $1; cd $1" Getting: $ mcd foo usage: mkdir [-pv] [-m mode] directory ... -bash: foo: command not found What am I doing wrong? ...

Is there a way to define C# strongly-typed aliases of existing primitive types like `string` or `int`?

Perhaps I am demonstrating my ignorance of some oft-used feautre of C# or the .NET framework, but I would like to know if there is a natively-supported way to create a type alias like EmailAddress which aliases string but such that I can extend it with my own methods like bool Validate()? I know of the using x = Some.Type; aliases but t...

Hibernate sort by properties of inner bean ?

In my domain model I have following Classes.A 'UserProfile' has one 'SecurityPrincipal' class SecurityPrincipal{ private String loginId; private String password; private Date registeredData; private int status; } class UserProfile { private String name; private String company; private SecurityPrincipa principal } I want to ge...

Finding and opening a file with vim in a single command alias in tcsh

I want to make an alias which would work like this: vf hello.c would execute a find command to search for hello.c and open it in the vim editor. What is the best way to do it? I've tried the following (doesn't work): alias vf "find -name $* -exec vi {} \;" alias vf "vi `find -name $*`" Can anyone help ? ...

Alias for "git checkout main_branch; git merge topic_branch" ?

In our team we are using a development, staging and a master branch plus branches for issues. With this workflow I find myself doing a lot of the following: For example in the development branch: git checkout staging; git merge development Does anyone have a simple alias for this? It should be something like: merge_with master wo...

Is there option to have powerfull URL and Aliases in Drupal, not the poor one that I've found?

First of all I want to state that I've just started with Drupal so I'm a noob. I'll try to explain what I think is a powerful URL and Alias system. Lets say we have some structured content with some subcontent shared between main sections. The main sections could be Visitor, Customer and Website. Now every main section has it's own men...

Using alias in query and using it

I have a doubt and question regarding alias in sql. If i want to use the alias in same query can i use it. For eg: Consider Table name xyz with column a and b select (a/b) as temp , temp/5 from xyz Is this possible in some way ? ...

PHP Symfony Alias

Hi! Can anyone tell me if there's any way to add an alias to a value of a enum fixture type? Something like this: responsabilityType: values: - ~ - StepAnaliseCC as Credit Responsability notnull: false Thanks in advance, Best regards! ...

Why can't I use alias in a count(*) "column" and reference it in a having clause ?

I was wondering why can't I use alias in a count(*) and reference it in the having clause. For instance: select Store_id as StoreId, count(*) as _count from StoreProduct group by Store_id having _count > 0 Wouldn't work.. But it works if I remove _count and use count(*) instead. ...

Python os.path is ntpath, how?

Can someone tell me how Python "aliases" os.path to ntpath? >>> import os.path >>> os.path <module 'ntpath' from 'C:\Python26\lib\ntpath.pyc'> >>> ...

BASH configration question, set alias as a sequence of commands?

I know how to config aliases in bash but is there a way to configure an alias for a sequence of commands? i.e say I want one command to change to a particular directory, then run another command In addition, is there a way to setup a command that runs "sudo mycommand" then enters the password? In the MSDOS days I'd be looking for a .bat...

Alias an URL in Apache in order to route requests on a certain URL through a PHP-script

I am using Apache 2.2.6 with suPHP 0.6.2 and PHP 5.2.6 and I am trying to use an Alias in order to route all requests on a certain URL trough a PHP script. I want all requests to /test to go through index.php. In the Apache virtualhost config I have set up an Alias Alias /test /index.php. index.php is just a dummy script containing the f...

Make "make" default to "make -j 8"

Is there a way that I can make $ make default to: $ make -j 8 ? Thanks! ...