Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [fields]

The tag has no usage guidance.

0
votes
1answer
47 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 ...
0
votes
0answers
119 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 ...
2
votes
1answer
785 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-...
3
votes
1answer
123 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 ...
6
votes
2answers
620 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 ...
0
votes
2answers
194 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 ...
3
votes
6answers
261 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 | ...
-1
votes
1answer
34 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 ...
3
votes
0answers
78 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 ...
0
votes
1answer
1k 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 ...
1
vote
1answer
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
30
votes
2answers
82k 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 ...
1
vote
1answer
383 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 ...
1
vote
3answers
868 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 ...
16
votes
4answers
120k views

Query to return output 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 ...
0
votes
2answers
956 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" ...
1
vote
1answer
44 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 ...
1
vote
1answer
3k 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 ...
2
votes
1answer
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 (...
19
votes
5answers
20k 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 ...
1
vote
1answer
668 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 ...
1
vote
0answers
117 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 ...
1
vote
1answer
42 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 ...
2
votes
0answers
188 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&...