Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

/proc/kallsyms format, sqldatasource dal, wwwxxxenden, convert raid5 to raid 10 mdadm, apache force chunked, nrao wwwxxx, xxxxxdup, procmail change subject header, wwwXxx not20, Wwwxxx.doks sas

Links

XODOX
Impressum

#1: getting list of columns from a query

Posted on 2010-08-22 19:27:52 by C K

--00c09f971fac11dd24048e6cdaf3
Content-Type: text/plain; charset=ISO-8859-1

Hi all,
As I am using MS Access for a long time, many tools like ms access provides
a way to get the list of columns from a query. (using filed list in combo
boxes in ms access). But is it possible to get such list of columns from a
query where it is not known to the user, that which columns are defined in
the base 'SELECT' statement? How? I dynamically created SQL statements many
times this situation occurs where the columns are not fixed and we have to
get the list of columns from such a query.
Thanks in advance.

CPK

--00c09f971fac11dd24048e6cdaf3
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi all,<br>As I am using MS Access for a long time, many tools like ms acce=
ss provides a way to get the list of columns from a query. (using filed lis=
t in combo boxes in ms access). But is it possible to get such list of colu=
mns from a query where it is not known to the user, that which columns are =
defined in the base &#39;SELECT&#39; statement? How? I dynamically created =
SQL statements many times this situation occurs where the columns are not f=
ixed and we have to get the list of columns from such a query.<br>
Thanks in advance.<br><br>CPK<br>

--00c09f971fac11dd24048e6cdaf3--

Report this message

#2: Re: getting list of columns from a query

Posted on 2010-08-22 23:18:47 by daniel.lists

On 08/22/2010 05:27 PM, c k wrote:
> As I am using MS Access for a long time, many tools like ms access
> provides a way to get the list of columns from a query. (using filed
> list in combo boxes in ms access). But is it possible to get such list
> of columns from a query where it is not known to the user, that which
> columns are defined in the base 'SELECT' statement? How? I dynamically
> created SQL statements many times this situation occurs where the
> columns are not fixed and we have to get the list of columns from such
> a query.

What language are you using, and what technique in that language are you
using? (ex. Java and JDBC, C# and ADO.NET, PHP and PDO, or PHP and
PostgreSQL native) Most of these provide a way to get to the column
names, but they're language- and technique-dependent.


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Report this message

#3: Re: [GENERAL] getting list of columns from a query

Posted on 2010-08-23 01:26:32 by Pavel Stehule

Hello

2010/8/22 c k <shreeseva.learning@gmail.com>:
> Hi all,
> As I am using MS Access for a long time, many tools like ms access provides
> a way to get the list of columns from a query. (using filed list in combo
> boxes in ms access). But is it possible to get such list of columns from a
> query where it is not known to the user, that which columns are defined in
> the base 'SELECT' statement? How? I dynamically created SQL statements many
> times this situation occurs where the columns are not fixed and we have to
> get the list of columns from such a query.
> Thanks in advance.
>

Yes, it is possible, you can get a description of prepared statement's
result. See: PQprepare, PQdescribePrepared, PQdescribePortal. These
functions are in client postgresql library -
http://www.postgresql.org/docs/8.4/interactive/libpq-exec.ht ml#LIBPQ-EXEC-MAIN

Regards

Pavel Stehule

> CPK
>

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Report this message

#4: Re: [GENERAL] getting list of columns from a query

Posted on 2010-08-23 10:02:00 by C K

--0015175cb71c355a17048e791041
Content-Type: text/plain; charset=ISO-8859-1

I am using PostgreSQL 8.4 on Fedora Linux 13 and using MS Access as the
front end for our application. It is not the problem associated with MS
Access. I got the some entries while searching for the said topic that
Oracle provides such facility.
DESCRIBE SELECT LIST which gives the details about the column names and data
types. I need such thing in postgresql, because users of my application can
execute custom query and then select the aggregate function to be applied to
the selected columns. This can be done using Pivot Table/Chart in MS Access,
but it is not sufficient, rather it will be better if postgres has support
for this.

Thanks and regards to all,

CPK

On Mon, Aug 23, 2010 at 4:56 AM, Pavel Stehule <pavel.stehule@gmail.com>wrote:

> Hello
>
> 2010/8/22 c k <shreeseva.learning@gmail.com>:
> > Hi all,
> > As I am using MS Access for a long time, many tools like ms access
> provides
> > a way to get the list of columns from a query. (using filed list in combo
> > boxes in ms access). But is it possible to get such list of columns from
> a
> > query where it is not known to the user, that which columns are defined
> in
> > the base 'SELECT' statement? How? I dynamically created SQL statements
> many
> > times this situation occurs where the columns are not fixed and we have
> to
> > get the list of columns from such a query.
> > Thanks in advance.
> >
>
> Yes, it is possible, you can get a description of prepared statement's
> result. See: PQprepare, PQdescribePrepared, PQdescribePortal. These
> functions are in client postgresql library -
>
> http://www.postgresql.org/docs/8.4/interactive/libpq-exec.ht ml#LIBPQ-EXEC-MAIN
>
> Regards
>
> Pavel Stehule
>
> > CPK
> >
>

--0015175cb71c355a17048e791041
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I am using PostgreSQL 8.4 on Fedora Linux 13 and using MS Access as the fro=
nt end for our application. It is not the problem associated with MS Access=
.. I got the some entries while searching for the said topic that Oracle pro=
vides such facility.<br>
DESCRIBE SELECT LIST which gives the details about the column names and dat=
a types. I need such thing in postgresql, because users of my application c=
an execute custom query and then select the aggregate function to be applie=
d to the selected columns. This can be done using Pivot Table/Chart in MS A=
ccess, but it is not sufficient, rather it will be better if postgres has s=
upport for this.<br>
<br>Thanks and regards to all,<br><br>CPK<br><br><div class=3D"gmail_quote"=
>On Mon, Aug 23, 2010 at 4:56 AM, Pavel Stehule <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:pavel.stehule@gmail.com">pavel.stehule@gmail.co m</a>&gt;</span=
> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; borde=
r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello<br>
<br>
2010/8/22 c k &lt;<a href=3D"mailto:shreeseva.learning@gmail.com">shreeseva=
..learning@gmail.com</a>&gt;:<br>
<div><div></div><div class=3D"h5">&gt; Hi all,<br>
&gt; As I am using MS Access for a long time, many tools like ms access pro=
vides<br>
&gt; a way to get the list of columns from a query. (using filed list in co=
mbo<br>
&gt; boxes in ms access). But is it possible to get such list of columns fr=
om a<br>
&gt; query where it is not known to the user, that which columns are define=
d in<br>
&gt; the base &#39;SELECT&#39; statement? How? I dynamically created SQL st=
atements many<br>
&gt; times this situation occurs where the columns are not fixed and we hav=
e to<br>
&gt; get the list of columns from such a query.<br>
&gt; Thanks in advance.<br>
&gt;<br>
<br>
</div></div>Yes, it is possible, you can get a description of prepared stat=
ement&#39;s<br>
result. See: PQprepare, PQdescribePrepared, PQdescribePortal. These<br>
functions are in client postgresql library -<br>
<a href=3D"http://www.postgresql.org/docs/8.4/interactive/libpq-exec.html#L=
IBPQ-EXEC-MAIN" target=3D"_blank">http://www.postgresql.org/docs/8.4/intera=
ctive/libpq-exec.html#LIBPQ-EXEC-MAIN</a><br>
<br>
Regards<br>
<br>
Pavel Stehule<br>
<br>
&gt; CPK<br>
&gt;<br>
</blockquote></div><br>

--0015175cb71c355a17048e791041--

Report this message

#5: Re: [GENERAL] getting list of columns from a query

Posted on 2010-08-23 10:23:12 by Scott Marlowe

Isn't this provided in odbc by myQuery.columns? Is that not
accessible to MSAccess??

On Mon, Aug 23, 2010 at 2:02 AM, c k <shreeseva.learning@gmail.com> wrote:
> I am using PostgreSQL 8.4 on Fedora Linux 13 and using MS Access as the
> front end for our application. It is not the problem associated with MS
> Access. I got the some entries while searching for the said topic that
> Oracle provides such facility.
> DESCRIBE SELECT LIST which gives the details about the column names and data
> types. I need such thing in postgresql, because users of my application can
> execute custom query and then select the aggregate function to be applied to
> the selected columns. This can be done using Pivot Table/Chart in MS Access,
> but it is not sufficient, rather it will be better if postgres has support
> for this.
>
> Thanks and regards to all,
>
> CPK
>
> On Mon, Aug 23, 2010 at 4:56 AM, Pavel Stehule <pavel.stehule@gmail.com>
> wrote:
>>
>> Hello
>>
>> 2010/8/22 c k <shreeseva.learning@gmail.com>:
>> > Hi all,
>> > As I am using MS Access for a long time, many tools like ms access
>> > provides
>> > a way to get the list of columns from a query. (using filed list in
>> > combo
>> > boxes in ms access). But is it possible to get such list of columns from
>> > a
>> > query where it is not known to the user, that which columns are defined
>> > in
>> > the base 'SELECT' statement? How? I dynamically created SQL statements
>> > many
>> > times this situation occurs where the columns are not fixed and we have
>> > to
>> > get the list of columns from such a query.
>> > Thanks in advance.
>> >
>>
>> Yes, it is possible, you can get a description of prepared statement's
>> result. See: PQprepare, PQdescribePrepared, PQdescribePortal. These
>> functions are in client postgresql library -
>>
>> http://www.postgresql.org/docs/8.4/interactive/libpq-exec.ht ml#LIBPQ-EXEC-MAIN
>>
>> Regards
>>
>> Pavel Stehule
>>
>> > CPK
>> >
>
>



--
To understand recursion, one must first understand recursion.

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Report this message