Can drush accept piped commands for aliases?
It should be allowed to use piping in drush aliases as this feature was added recently by improving escaping options for core-exec.

So you have to upgrade your drush to the recent version (7.x).

See: Are pipes allowed in shell aliases?



If you prefer to use script, here is one which I'm usually using:

#!/bin/sh
# pull-db.sh
# Script to pull the database from remote to local environment.
[ -z "$1" ] &amp;&amp; { echo "Usage: $0 @remote (args)"; exit 1; }
SRC="$1"
shift
drush $SRC sql-dump | drush $* sql-cli