Query to SELECT only Column Names that Contain a Specific String?
Hey Guys,
I'm using SQuirreL SQL v3.5 GUI to fetch some data that I need for something I'm working on. I'm also using the IBM Informix Driver(*Version 3.5) to connect to the Database.
What I want to do, if it's even possible, is to show all COLUMNS if they contain the word "Email".
So in Pseudo basically this: *I know this isn't correct, but just so you have an idea of what I'm trying to do...
So basically I want to see ANY column that contains the word "Email"...
Is this possible? Any thoughts or suggestions would be much appreciated, I am by no means a Database Admin and barley a novice, I really only know what I learned back in college...
Hi Guru's,
Before writing to this forum I have searched extensively on this forum about my problem.
I have to write a shell script which takes out only those file names from the given directory which contains only numbers. For example, In the given directory these files are present:
... (4 Replies)
hi,
i currently have a file with columns similar to this
customer name owed
CID123 John 300
CID342 harry 500
at present i use use awk to find the amount owed by the customer using the customer ID (CID).
if the customer spends more money how would i go about using sed/awk etc to... (2 Replies)
Hello,
A basic query. How can I remove a string from a specific column.
For example, remove "abcd" just from column 2 in example file:
abcd abcd1
abcd abcd2
abcd abcd3
to get output:
abcd 1
abcd 2
abcd 3
Thank you!:) (4 Replies)
Hi all,
I have a string that looks like:
#!/bin/sh
options="arguments: --user=alpha --group=beta --prefix=/usr/share --proxy-path=/proxy --proxy-tmp=/tmp --conf-path=/etc"
My goal is to transform the string into an array, then for each key, if it starts with "--proxy" to print the string... (2 Replies)
Is it possible to modify file like this.
1. Remove all the duplicate names in a define column i.e 4th col
2. Count the no.of unique names separated by ";" and print as a 5th col
thanx in advance!!
Q
input
c1 30 3 Eh2
c10 96 3 Frp
c41 396 3 Ua5;Lop;Kol;Kol
c62 2 30 Fmp;Fmp;Fmp
... (5 Replies)
Hi,
my file structur looks like
File structure looks:
GeneID protein_gi Symbol
1246500 10954455 repA1
1246501 10954457 repA2
1246502 10954458 leuA
But some of the cases do not have record for protein id. for example:
1343044 - orf01
I want to remove those rows.
But I tried
awk... (9 Replies)
Hi All, I will need an help with respect to replacing a range of columns on a non-delimited file using a particular string pattern.
Say file input is
MYNUMBERD000000-BAN CHUE INSNTS ** N+
MYAREDSDD000000+BAN CHUE INSNTS ** N+
MYDERFFFSD00000-GIR PENT - ACH ** ... (5 Replies)
I have an xml file dumped from rrd file, that I want to "patch" so the xml file doesn't contain any blank hole in the resulting graph of the rrd file.
Here is the file.
<!-- 2015-10-12 14:00:00 WIB / 1444633200 --> <row><v> 4.0419731265e+07 </v><v> 4.5045912770e+06... (2 Replies)
Hello All of Master Script ,
i need help to solve my problem
before :
mount /dev/rdsk/c1t69d0s6 /dev/rdsk/c1t69d0s6 /vol/cl123/PURGE1 ufs
mount /dev/rdsk/c1t70d0s6 /dev/rdsk/c1t70d0s6 /vol/cl123/PURGE2 ufs
expected :
mount /dev/dsk/c1t69d0s6 /dev/rdsk/c1t69d0s6 /PURGE1 ufs
mount ... (3 Replies)
Discussion started by: k0p0nkkk
3 Replies
LEARN ABOUT MOJAVE
dbix::class::sqlmaker::limitdialects
DBIx::Class::SQLMaker::LimitDialects(3) User Contributed Perl Documentation DBIx::Class::SQLMaker::LimitDialects(3)NAME
DBIx::Class::SQLMaker::LimitDialects - SQL::Abstract::Limit-like functionality for DBIx::Class::SQLMaker
DESCRIPTION
This module replicates a lot of the functionality originally found in SQL::Abstract::Limit. While simple limits would work as-is, the more
complex dialects that require e.g. subqueries could not be reliably implemented without taking full advantage of the metadata locked within
DBIx::Class::ResultSource classes. After reimplementation of close to 80% of the SQL::Abstract::Limit functionality it was deemed more
practical to simply make an independent DBIx::Class-specific limit-dialect provider.
SQL LIMIT DIALECTS
Note that the actual implementations listed below never use "*" literally. Instead proper re-aliasing of selectors and order criteria is
done, so that the limit dialect are safe to use on joined resultsets with clashing column names.
Currently the provided dialects are:
LimitOffset
SELECT ... LIMIT $limit OFFSET $offset
Supported by PostgreSQL and SQLite
LimitXY
SELECT ... LIMIT $offset $limit
Supported by MySQL and any SQL::Statement based DBD
RowNumberOver
SELECT * FROM (
SELECT *, ROW_NUMBER() OVER( ORDER BY ... ) AS RNO__ROW__INDEX FROM (
SELECT ...
)
) WHERE RNO__ROW__INDEX BETWEEN ($offset+1) AND ($limit+$offset)
ANSI standard Limit/Offset implementation. Supported by DB2 and MSSQL >= 2005.
SkipFirst
SELECT SKIP $offset FIRST $limit * FROM ...
Suported by Informix, almost like LimitOffset. According to SQL::Abstract::Limit "... SKIP $offset LIMIT $limit ..." is also supported.
FirstSkip
SELECT FIRST $limit SKIP $offset * FROM ...
Supported by Firebird/Interbase, reverse of SkipFirst. According to SQL::Abstract::Limit "... ROWS $limit TO $offset ..." is also
supported.
RowNum
Depending on the resultset attributes one of:
SELECT * FROM (
SELECT *, ROWNUM rownum__index FROM (
SELECT ...
) WHERE ROWNUM <= ($limit+$offset)
) WHERE rownum__index >= ($offset+1)
or
SELECT * FROM (
SELECT *, ROWNUM rownum__index FROM (
SELECT ...
)
) WHERE rownum__index BETWEEN ($offset+1) AND ($limit+$offset)
or
SELECT * FROM (
SELECT ...
) WHERE ROWNUM <= ($limit+1)
Supported by Oracle.
Top
SELECT * FROM
SELECT TOP $limit FROM (
SELECT TOP $limit FROM (
SELECT TOP ($limit+$offset) ...
) ORDER BY $reversed_original_order
) ORDER BY $original_order
Unreliable Top-based implementation, supported by MSSQL < 2005.
CAVEAT
Due to its implementation, this limit dialect returns incorrect results when $limit+$offset > total amount of rows in the resultset.
FetchFirst
SELECT * FROM
(
SELECT * FROM (
SELECT * FROM (
SELECT * FROM ...
) ORDER BY $reversed_original_order
FETCH FIRST $limit ROWS ONLY
) ORDER BY $original_order
FETCH FIRST $limit ROWS ONLY
)
Unreliable FetchFirst-based implementation, supported by IBM DB2 <= V5R3.
CAVEAT
Due to its implementation, this limit dialect returns incorrect results when $limit+$offset > total amount of rows in the resultset.
GenericSubQ
SELECT * FROM (
SELECT ...
)
WHERE (
SELECT COUNT(*) FROM $original_table cnt WHERE cnt.id < $original_table.id
) BETWEEN $offset AND ($offset+$rows-1)
This is the most evil limit "dialect" (more of a hack) for really stupid databases. It works by ordering the set by some unique column, and
calculating the amount of rows that have a less-er value (thus emulating a "RowNum"-like index). Of course this implies the set can only be
ordered by a single unique column.
Also note that this technique can be and often is excruciatingly slow. You may have much better luck using "software_limit" in
DBIx::Class::ResultSet instead.
Currently used by Sybase ASE, due to lack of any other option.
AUTHORS
See "CONTRIBUTORS" in DBIx::Class.
LICENSE
You may distribute this code under the same terms as Perl itself.
perl v5.18.2 2014-01-22 DBIx::Class::SQLMaker::LimitDialects(3)