Questions tagged [record]
The record tag has no usage guidance.
20
questions
2
votes
1
answer
377
views
How do you run "SELECT" on the composite type argument of an SQL function?
Example: https://dbfiddle.uk/bCSwVpd9
Database:
CREATE TABLE entities (
id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY
);
CREATE TYPE entity_id AS (
id bigint
);
Function:
CREATE FUNCTION ...
1
vote
0
answers
576
views
automatic cast of anonymous record array type to the array type of a named composite type in PostgreSQL?
From PostgreSQL documentation, it is possible to cast an anonymous record type to a named composite type at a function call site. Quoting the example there:
CREATE TABLE mytable(f1 int, f2 float, f3 ...
2
votes
1
answer
337
views
SQLite Internals - Records
Hey I'm trying to wrap my head around SQLite data storage, specifically how it is storing Records. I've found a book The Definitive guide to SQLlite, where the author explains internal record format (...
3
votes
2
answers
3k
views
How to get the column names of a RECORD?
I have a function that declares:
DECLARE r RECORD;
The data on this record varies and at some point I need to know the column names.
How do I get the column names of a RECORD in another record ?
2
votes
1
answer
829
views
Return both one value and one column from pl/pgsql function
I wish my pl/pgsql function to go fetch and return two informations in my database in a single connection:
one vector containing data whose type is unknown at call time (an array)
one string value ...
3
votes
0
answers
1k
views
Best way to cast array (text[]) to record-type?
PostgreSQL has the ability to create record types. A lot of operations like regexp_match return text[]. What is the most efficent way to go from text[] to a custom record type?
Currently, I'm doing ...
1
vote
3
answers
66
views
Record doesn't show if selecting earlier date interval
i encountered a very strange behaviour on mysql database.
I have this complicated query:
SELECT
category, subcategory, sum(hours), count(hours),
group_concat(concat(user,': ', comment) ...
3
votes
1
answer
2k
views
SQL Server: ODBC Linked Server to Oracle does not return all rows
Let's say we have one SQL Server instance on one side:
SQL Server 2008 R2 SP3
Oracle 11.2 client installed with OLEDB Drivers for ODBC
.. and an Oracle database instance on another side:
Oracle ...
-1
votes
1
answer
334
views
Generating Record Ids in Postgres [closed]
Using the UUID data type with its 256 chars seems like overkill, while assigning an auto-increment int4 seems less robust.
Is there a more robust way to assign a record id without using uuid or an ...
2
votes
1
answer
525
views
How to estimate the storage needed for a database?
I ran across this questions trying to dive into a computer measurements worksheet online and for the life of me could not figure it out. This is the question:
Assume each record in a database ...
1
vote
0
answers
86
views
How to use the value from record like as varchar?
I'm trying update a old table with result of selec for another tables but get a error using this sintaxe (e.g.):
DO
$$
DECLARE
_roles refcursor;
_onerole varchar;
_record RECORD;
...
0
votes
1
answer
5k
views
PL/SQL cursors and records
I am a new to Pl/sql and I need to learn to write simple pl/sql scripts.
Is there any difference between cursors and records in PL/sql?
So far I find them both similar.
0
votes
1
answer
3k
views
Change the row position of a record without messing anything else MySQL?
Hi I would like to ask if there is a smart way to change the record position of a table in mysql. My problem is this: I have a table with statistics data and when I recover all the details in a table ...
10
votes
2
answers
8k
views
Insert RECORD into a table in a trigger function
I would like to insert a RECORD data type variable (NEW variable) into a table in a trigger. What would the SQL look like?
The following attempts were unsuccessful:
EXECUTE 'INSERT INTO my_table ...
3
votes
4
answers
30k
views
Insert values from a record variable into a table
I am developing a user-defined function that takes two arguments:
create or replace function gesio(
events_table_in regclass,
events_table_out regclass)
returns void as $$ ... $$
...
1
vote
1
answer
968
views
Implementing a Record Keeper/Rollback System for a MySQL Database
What's the best way to create a record keeping table for all actions in my database?
I have a number of tables inside one database and I want to create another that records all movements in every ...
2
votes
1
answer
8k
views
Difference between return next and return record
What is the difference between RETURN NEXT and RETURN RECORD in PL/pgSQL? I find the manual quite confusing in explaining what RETURN RECORD actually does. What is a RECORD type?
1
vote
1
answer
561
views
Mysql setting a record as deleted or archive
Is there any way to omit some records in mysql select statement and not deleting them? We can easily add a column for example deleted and set it to 1 for deleted ones and keep them but the problem is ...
11
votes
1
answer
262
views
What platform for a large record based mathematical database?
Hi I am a civil engineer with some experience of programming but I am not familiar with the vast range of options available today. Hope you could give me any pointers the best way to proceed.
I want ...
66
votes
8
answers
45k
views
What is the difference between a "record" and a "row" in SQL Server?
There was a rather innocuous question about adding dates and times in SQL Server that set off a rather fascinating taxonomic debate.
So how do we differentiate between these related terms and how we ...