Questions tagged [fields]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

Inputting same data on identical Field Name on different table

currently i am new in ms access, And currently - as a trial and learning step - I created Two tables, and a Single Form that can be used to put a value to both tables, those are: Table 1 - "...
user avatar
  • 1
0 votes
1 answer
50 views

How does CONCAT format date fields?

I have the following code : start transaction; show datestyle; set datestyle to DMY; show datestyle; select concat(timestamp_field, '') from my_table ; commit; It outputs this : ...
user avatar
  • 1,263
0 votes
2 answers
48 views

How can I copy the definition of a field from one table to another at design-time?

I have a table with ten fields, f1 (being an integer field) to f10 (being a character field). In between there are other integer, character and date fields. I would like to copy those field ...
user avatar
  • 333
2 votes
1 answer
63 views

Microsoft Access: Using other fields in an Autonumber

I'm trying to use Microsoft Access to start an employee database. However, I want the display of the Employee ID to be the initials and then their number. For example, John Smith with the ID 0002 is ...
user avatar
  • 21
1 vote
0 answers
148 views

Influx:Show field keys based on tag values (or the other way)

I have an influx database with one tag key (called machine) and multiple field key (called cpu and memory). I want to be able to find all unique tag values for each field key or filled field keys for ...
user avatar
  • 111
0 votes
1 answer
22 views

return field name and number of rows which meet condition in one sentence

I have a table in postgres with 10 fields, and need to check for certain values in 3 of them, then return the field name which met the condition and the number of rows in each field. So it's something ...
user avatar
  • 131
1 vote
2 answers
83 views

Should fields that are set to Not Null also have a constraint refusing empty strings?

Any field that I would expect a value (Like an orderNumber or customerNumber) I would set as not nullable. If I'm expecting the value of the field to be not null, shouldn't I also always have a ...
user avatar
  • 169
0 votes
1 answer
661 views

Display all fields with null values in a particular row in SQL Server

I have a requirement where I want to fetch and display all the fields with NULL value for a particular row in the table. Some thing like: select 'all columns with NULL' from table_xyz where ...
user avatar
0 votes
0 answers
521 views

SQL Server bitfield/flags in int indexing

In a schema, an int is used as a bitfield, one of those bits is used in a frequently called SQL query (a bit marking entries to be new for processing). The query (entity framework generated, got it ...
user avatar
4 votes
1 answer
3k views

Parsing COPY's binary format to access a tsrange

How is tsrange stored in binary? For example create table CREATE TABLE public.test (t tsrange); INSERT INTO test VALUES ('[2010-01-01 14:30, 2010-01-01 15:30)'); INSERT INTO test VALUES ('[2011-01-...
user avatar
  • 143
2 votes
1 answer
259 views

Identifying field changes between tables and consecutive rows

I need to build an audit report to identify field changes between two tables, as well as between consecutive rows in one of the tables. The first table (data) holds the current data: id data_id ...
user avatar
6 votes
2 answers
1k views

Efficiently write SELECT queries for tables with lots of columns (not SELECT *)

Due to limitations in my GIS software, I need to write select queries for each of my 200+ tables in my database. The queries need to select all columns, except for one, the SHAPE column. Is there an ...
user avatar
  • 1,389
0 votes
2 answers
336 views

List default column values for all tables in a database [closed]

I would like to list the default values for all columns in all tables in an Oracle database. The objective is to review the default values, and find any that need updating. There are hundreds of ...
user avatar
  • 1,389
3 votes
6 answers
278 views

Standards for storing a rating as a range (1-5, 1 is best, etc.)

I am designing a ROAD_INSPECTION table that has a CONDITION field: +---------+-----------+ | ROAD_ID | CONDITION | +---------+-----------+ | 1 | 2 | | 2 | 5 | | 3 | ...
user avatar
  • 1,389
-1 votes
1 answer
36 views

Multiple references to another table, but I don't know how many

I have two tables in a database, folowwing this model: scientists : id (int) | name (varchar) | surname (varchar) | publications (int) publications : id (int) | fulltext (varchar) I would like to ...
user avatar
  • 109
3 votes
0 answers
111 views

What is the difference between a field and a column? [duplicate]

Although I have always regarded the terms as interchangeable, I have read somewhere that they’re not the same. I suppose this means that a record is not exactly the same as a row either. I teach that ...
user avatar
  • 2,337
0 votes
1 answer
3k views

What is the best way to store SSH fingerprints and public keys?

I'm building a virtual Keyring in our DB to allow users to store PGP/GPG public keys with relation to email addresses so that they can optionally encrypt all communications our system sends them. I'm ...
user avatar
  • 506
1 vote
1 answer
1k views

How to password protect a field in access?

I'm looking to password protect a field in my database containing confidential customer information. Is there a reasonable way of doing this in a timely manner? Thanks
user avatar
57 votes
2 answers
166k views

How does ORDER BY FIELD() in MySQL work internally

I understand how ORDER BY clause works and how the FIELD() function works. What i want to understand is how the both of them work together to sort. How are the rows retrieved and how is the sort ...
user avatar
  • 736
1 vote
1 answer
497 views

What is the best SQL Server field type to cast to when storing a UNC path stored in a sql_variant field?

What is the best choice of field type to cast to when storing a UNC path in a sql_variant in Microsoft SQL Server 2008? It appears that I could store up to 4000 characters according to Microsoft ...
user avatar
1 vote
3 answers
1k views

Add fields to view from select (transpose fields)

I've got a table with following structure: CREATE TABLE test ( id integer, field character varying, value character varying ); field value ------ ----- field1 value1 field2 ...
user avatar
  • 343
27 votes
5 answers
148k views

Get column names and data types of a query, table or view

Is there a PostgreSQL query or command that returns the field names and field types of a query, table or view? E.g., a solution if applied to simple SELECT query like SELECT * from person should ...
user avatar
  • 885
0 votes
2 answers
2k views

Query with a sequence of "and not like"

I have a table called VHS_Metadata_Aug52014 with columns: Title, Description,Tag, Speaker, VIP, FilmingLocation, Notes I'm trying to write a query that returns all records for which the word "News" ...
user avatar
  • 127
1 vote
1 answer
63 views

Product table with possible duplicate part numbers from different manufacturers

I am making a database. It has a product(aka component or part) table with a ID, ManufacturerID, and PartNumber. The ID is obviously the primary key and is unique. The ManufacturerID is pulled from ...
user avatar
2 votes
1 answer
4k views

Maximum number of fields/columns in MongoDB

I'm considering learning and using MongoDB for a project, but I'm going to need to be able to store at least 1024 columns for the first part, and as many as 1048577 for the second. Does MongoDB have a ...
user avatar
  • 183
2 votes
1 answer
131 views

Should I split these fields or leave as one?

I want to create a database listing characters in each book of the A Song of Ice and Fire series, listing the name of the character and the page in which they appear. I could just use three fields (...
user avatar
  • 181
27 votes
5 answers
30k views

Column vs Field: have I been using these terms incorrectly?

I feel kind of embarrassed here, I've always used the terms "column" and "field" completely interchangeably, which recently caused some confusion in a technical discussion. I was told, though, that ...
user avatar
  • 9,614
1 vote
1 answer
832 views

Calculating Open Days field and stopping with status change

I had a question but wasn't sure where I needed to post or view if someone has done this before. I have a dilemma on my hands. Background Info: I have been trying to figure out what to do since I ...
user avatar
  • 11
1 vote
0 answers
122 views

How to set a 'real' field to accept an out-of-scale value?

I have an SQL Server database and one particular field that is a real. The program that feeds it was modified and is now sending a value too small to be considered a real. Is there a setting for ...
user avatar
1 vote
1 answer
45 views

Proper names for SUM(col) fields

I have worked on MySQL databases for a long time, but one question I have never been able to get an answer to that seemed formal is: In the query SELECT *, SUM(col1) FROM tbl, what is the proper name ...
user avatar
  • 163
2 votes
0 answers
229 views

Can't add field that begins with an underscore in Crystal Reports

There's a field in a FoxPro table that I'm trying to pull in a Crystal Report (v10), and it begins with an _ and it doesn't appear in Field Explorer->Fields->Database Fields-><table-name&...
user avatar
  • 1,662