i am using array as a data type in my db -
....
-
(
-
sequence integer[]
-
) ;
-
and it stores a value
let {1,2,3,4,5}
now if i a selecting the array as -
select sequence from foo where...
-
then result which i get is not an array and i want it as an array
and i don't have to use
option
shoonya
1 3681 michaelb 534
Recognized Expert Contributor
... ... ...
now if i a selecting the array as -
select sequence from foo where...
-
then result which i get is not an array and i want it as an array
and i don't have to use
option
What you get back looks like a string representation of an array: -
testdb=# SELECT sequence FROM tt2 WHERE x = 1;
-
sequence
-
-------------
-
{1,2,3,4,5}
-
(1 row)
-
If what you want is to initialize some local array variable to the result returned by the query, then it is up to you to do it, database has nothing to do with this, although you can obviously format the return value using array functions; for example you can remove the curly braces, change the default delimiter, etc.
You can find some useful information on arrays here: Arrays Array Functions and Operators
If this is not what you're trying to do, then clarify your question.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Thomas |
last post by:
What's the quickest way to write and read 10.000 integer values ( or
more ) to and from a file? Using struct somehow? The example in the
docs shows how to handle to or three arguments, but is the fastest way
to write and read just a simple :
while data:
f.write(struct.pack(format, integer-value))
or is there another, quicker and nicer way to do it????
|
by: Gary |
last post by:
I haver a table of students - Say 100 students that I need to be able to
update/delete and amend. I know I can do this one student at a time which is
simple but lets say I want to see all the students on the screen at the same
time, modify some, mark some for deletion and even have blank fields at the
end to add a new record.
In HTML which is generated I label each row and input field with a
name/number combination i.e <input type=text...
|
by: ASPfool |
last post by:
Hello everyone,
Please help me before I throw my computer out of the window:
I'm working on a web application in classic ASP (vbscript), which is making
calls to some webservices. The calls are made using SOAP - i installed the
SOAP3 toolkit on my windows 2k server to enable this. The webservice calls
are returning String Arrays which I can't seem to do anything useful with.
The call shown below returns a string array with two...
|
by: Grasshopper |
last post by:
Hi,
I am automating Access reports to PDF using PDF Writer 6.0. I've
created a DTS package to run the reports and schedule a job to run this
DTS package. If I PC Anywhere into the server on where the job is
running, the job runs sucessfully, PDF files got generated, everything
is good. If I scheduled the job to run at the time that I am not
logged into the server, Access is not able to print to the printer.
The error is pretty...
|
by: natkw1 |
last post by:
Hi,
I'm attempting to understand the use of pointers(at least grasp how
pointers work). I've read the FAQ on
http://www.eskimo.com/~scs/C-faq/s6.html on pointers and arrays but I'm
still a bit lost.
I written the following code to try to understand it but it's not
working:
| |
by: intrepid_dw |
last post by:
Hello, all.
I've created a C# dll that contains, among other things, two functions
dealing with byte arrays. The first is a function that returns a byte
array, and the other is intended to receive a byte array as one of its
parameters. The project is marked for COM interop, and that all
proceeds normally.
When I reference the type library in the VB6 project, and write the
code to call the function that returns the byte array, it works
|
by: sicapitan |
last post by:
I'm trying to build some xml from an array with the help from another
array.
In one array I have
$cells
Array
(
=CELL0
|
by: jshelp |
last post by:
I have a problem I would be very grateful for any help with:
I need to create a bus timetable using data from arrays and write a table using the DOM to show only those stops and times selected.
I need to have a select list populated with data from an array, and associated with this are a number of different timesI have the script to populate the select options on screen, but i don't know how to then relate that to the data that is...
|
by: Atli |
last post by:
Introduction
At some point, all web developers will need to collect data from their users. In a dynamic web page, everything revolves around the users input, so knowing how to ask for and collect this data is essential to any developer.
This article is a basic tutorial on how to user HTML Forms, the most common method of data collection.
Assumptions
- Basic HTML knowledge.
- Basic PHP knowledge.
HTML Forms
A common and simple way of...
|
by: TechnoAtif |
last post by:
Hi ALL
I have entered some array values using checkboxes into mysql database through a form. Next iam creating a searchpage where all those cateogories inserted through checkboxes has to be retrieved using list/menu box.
When i check only a single checkbox to insert the checked category ,selecting that category through list box gives out the entire data of the user corresponding to that category.
However when i check multiple checkboxes and...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |