maria s escreveu:
I tried the query and it is returning result as ,
for a single entry in sample info in separate rows
The result of the query as
1, prop1,value1
1,prop2,value2
2,prop1,value1
2 prop2,value2
2 prop3,value3
but i want the output as single row per sample id like
1,value1,value2
Bryan Emrys escreveu:
I can handle this outside sql, but it seems like I should be able to do this in sql as well.
1 table: countries.
3 columns: id, name, price
What I'm trying to get is a result of the price differences between every
country.
So if the data looks like (ignoring the id fie
Jeff Frost escreveu:
I've got an interesting one...I'm trying to find columns that have three
or fewer distinct characters (for example, "aa"). Wondering if
I need to write a function or if someone has an idea how to do it with
built in functions and/or pattern matching?
I think the
Julien Cigar escreveu:
Hello,
I have a problem with the ALL() subquery expression.
I have three tables:
- specimens
- test_bits
- specimen_test_bits
The specimen_test_bits table contains two foreign keys, one to
specimens(id), another to test_bits(id).
Here is an output of specimen_test_bits
Koen Bok escreveu:
I am doing some optimization on our search, but I need some advise...
table: item
idname
--
1iPod
2Zune
3Walkman
table: search_item
id_searchid_item
-
chester c young escreveu:
having problem joining these correctly:
schedule
- cal_id references calendar not null
- usr_id references users not null
= unique( calZ_id, usr_id )
- result_no not null
activity
- cal_id references calendar not null
- usr_id references users not null
= unique( cal_id
Ashish Karalkar escreveu:
Hello All,
I want to diplay all the name of persons who falls in between given day
and month
something like
select name from my_table mt where mt.date_of_birth between 7-Jul and
15 - Aug
column date_of_birth is of date type
SELECT name FROM my_table mt
Kristo Kaiv escreveu:
oneliner:
select date_trunc('month',now()) + ((8 - extract('dow' from
date_trunc('month',now()))||'days')::text)::interval;
There is a problem when first monday is 1st or 2nd day of month.
bdteste=# SELECT date_trunc('month',meses) + ((8 - extract('dow' from
date_t
Karthikeyan Sundaram escreveu:
Hi,
I have to dump only 10 tables out of 100 tables. In the pg_dump
utility given by postgres there is an option called -t followed by table
name.
In that option, if I give more than 1 table, it's not accepting.
How can I get the dump in one stroke fo
hongliu zou escreveu:
Am I forgetting some limitation?
I get " ERROR: syntax error at or near "$1"
SQL state: 42601 "with this
CREATE FUNCTION Import1() RETURNS text AS $$
DECLARE
path Char(100);
BEGIN
path = 'C:/zhl/hjs/anc_area.att';
COPY anc_areaAtt FRO
Steven Murdoch escreveu:
I would like to concatenate sorted strings in an aggregate function. I
found a way to do it without sorting[1], but not with.
Here is an example of a setup and what I could like to achieve. Does
anyone have suggestions on what is the best way to get the desired
result?
chrisj escreveu:
Hi ALL,
I want to do date arithmetic in SQL with a column that is integer.
example
create table bob (
col1 timestamp
, col2 int4
;
where col2 represents a number of minutes.
I want to do something like
select col1 + interval col2 minutes
from bob
This is doable wi
12 matches
Mail list logo