On Fri, 4 Jan 2019, Andreas Kretschmer wrote:
Only if all projects have a known end_date; some don't.
that's not a problem:
test=*# create table projects(duration daterange default
daterange(current_date,null) check(lower(duration) is not null));
Andreas,
Thank you. That's a data type
On Fri, 4 Jan 2019, Rich Shepard wrote:
Thank you. That's a data type I've not before used.
Andreas,
Thinking more about duration perhaps I'm seeing a problem that really does
not exist: it's a single column for both dates in the table while the UI
needs separate dat
On Fri, 4 Jan 2019, David G. Johnston wrote:
That would be the decision to make - does your toolkit support (or can be
made to support) the type and are you willing to choose a sub-optimal
database model because one or more applications happen to do things
differently?
IMO the daterange datatyp
On Fri, 4 Jan 2019, Jeremy Finzel wrote:
Another suggestion which hasn’t been mentioned is using ‘infinity’ as the
end date. I like this because it IMO indicates that the record is clearly
the current valid record more than null.
Jeremy,
I believe that infinity was mentioned in this thread.
A table has this column definition:
next_contact date DEFAULT '2020-11-06'
CONSTRAINT valid_next_date
CHECK (next_contact >= CURRENT_DATE),
(and I don't know that it needs a default).
In an input statement that column is left empty ('') when there's no defined
date
On Fri, 11 Jan 2019, Rob Sargent wrote:
psql:activities.sql:2: ERROR: invalid input syntax for type date: ""
LINE 2: ...reaction they''ve experienced environmental issues.','','');
^
Miss-matched single quotes in activities.sql?
On Fri, 11 Jan 2019, Rob Sargent wrote:
Something syntactically askew I think.
Rob,
I agree that's the problem. Why there's a problem is what I need to learn.
Thanks,
Rich
On Fri, 11 Jan 2019, Ken Tanzer wrote:
I think the problem is actually that you're trying to represent your NULL
dates with '', which PG doesn't like.
Ken,
That's certainly how I saw the error message.
cat test.csv
my_text,my_date,my_int
'Some Text','1/1/18',3
'More Text,,2
'Enough','',1
On Fri, 11 Jan 2019, David G. Johnston wrote:
VALUES (1, null, 3) is valid, VALUES (1,,3) is not.
David,
Using null occurred to me when I saw that an empty space still failed.
Thanks for clarifying and confirming.
Best regards,
Rich
On Fri, 11 Jan 2019, David G. Johnston wrote:
The default does seem a bit arbitrary and pointless...
David,
That answers my question about it. Thanks again.
Best regards,
Rich
On Sat, 12 Jan 2019, Ricardo Martin Gomez wrote:
Hi, one question.
Do you put explicit "NULL" in the column value?
Other option is.
You have to delete the column "next_contact" in your INSERT clause.
So, if the column has a default value, this value Will be inserted. Else
Null value will be inse
On Sat, 12 Jan 2019, David G. Johnston wrote:
Actually, you didn't ask about the check constraint, which is actually
horribly broken since current_date is not an immutable function.
David,
I know that nulls cannot be validly used in comparisons which makes the
check constraint FUBAR.
Thank
On Sat, 12 Jan 2019, David G. Johnston wrote:
NULL isn't the problem - a check constraint can resolve to unknown in
which case it behaves the same as if it resolved as true (i.e., its
basically a IS NOT FALSE test in the backend). This is actually a
nice feature of check constraints since for n
On Sat, 12 Jan 2019, David G. Johnston wrote:
Inserting new data into a table qualifies as "data change" in my mind...
David,
Then it's certainly good enough for me. ;-)
Looking at the text file which the application will replace there are
occasions when there's more than one contact on
Working with my sales/client management system using psql I have a select
statement to identify contacts to be made. This statement works:
select (C.contact_id, C.lname, C.fname, C.direct_phone, O.org_name,
A.next_contact)
from Contacts as C, Organizations as O, Activities as A
where C.org_id
On Tue, 15 Jan 2019, Adrian Klaver wrote:
For the above I could see using a datepicker widget that allows for
multidate select. The specifics would depend on the software you are using
to write the UI.
Adrian,
I'm using wxPython4, and I will use a calendar with that. But, is there a
way to
On Tue, 15 Jan 2019, Thomas Kellerer wrote:
With regards to "cleaner": the first thing to do is to remove the
parentheses around the column list. In Postgres "(a,b,c)" creates a single
column with an anonymous record type (that contains three fields), rather
than selecting three columns. In othe
On Tue, 15 Jan 2019, Ron wrote:
And I've never liked this method (though I'm old and crotchety)
Ron,
I'm older but not crotchety (most days), and I'm taking my SQL knowledge
beyone what I've used in the past. I would appreciate you're explaining why
you don't like the explicit JOINs pre
On Tue, 15 Jan 2019, Adrian Klaver wrote:
Use BETWEEN?:
https://www.postgresql.org/docs/10/functions-comparison.html
a BETWEEN x AND y between
So:
next_contact BETWEEN '01/01/2019'::date AND '01/15/2019'::date
Or a range function:
https://www.postgresql.org/docs/10/functions-range.html
I know that "--" has been the single-line comment identifier since SQL was
implemented by IBM on mainframes using Hollerith cards. Today, some RDBMSs
also allow the C comment indentifier pair, /* ... */.
The postgres10 manual when searched for 'comments' presents the double
hyphens and, in Sectio
On Thu, 17 Jan 2019, Rich Shepard wrote:
I want only to confirm that I can use /* ... */ for multiline comments in my
DDL and DML scripts.
Oops! Section 4.1.5 tells me that I can.
Apologies to all,
Rich
On Tue, 15 Jan 2019, Thomas Kellerer wrote:
select distinct on (C.contact_id) C.contact_id, C.lname, C.fname,
C.direct_phone, O.org_name, A.next_contact
from Contacts as C
join Organizations as O on C.org_id = O.org_id
join Activities as A on C.contact_id = A.contact_id
where
On Thu, 17 Jan 2019, David G. Johnston wrote:
Why is next_contact allowed to be null?
David,
There are a number of reasons. The prospect might have retired, told me to
pound sand, or has put off a decision.
Your concept of "most current row" is strictly based upon next_contact so
if next_co
On Thu, 17 Jan 2019, Adrian Klaver wrote:
Got to thinking more and realized the answer depends on what you want the
query to produce. Can you let us know what is you are trying to pull out
with the query?
Adrian,
Certainly. Over breakfast I realized the same thing: the existing SELECT
query i
On Thu, 17 Jan 2019, David G. Johnston wrote:
Yes...though now it just sounds like a flawed data model.
David,
This is what I thought.
How stuck are you in that regard? Those "future" contacts should have their
own records and not be derived via an optional field on an existing
record.
On Thu, 17 Jan 2019, Adrian Klaver wrote:
To be clear the next-activity date = next_contact in the database, correct?
Adrian,
Yes. I've renamed the Activities table to Contacts and the Contacts table
to People.
NULL basically means unknown, so having it stand for something is a bit of
a s
On Thu, 17 Jan 2019, Adrian Klaver wrote:
Seems to me a boolean field of name active to denote contacts you need to
keep up with is in order. Then make the next_contact field NOT NULL and
replace the current NULL values with 'infinity':
WHERE COALESCE(next_contact, 'infinity') BETWEEN '01/01/
On Thu, 17 Jan 2019, David G. Johnston wrote:
Off the top of my head (and this is a model I am quite familiar with
even if I'm doing this email at speed):
I'd suggest an actual activity table:
David,
Adrian's suggestion of a Contacts table column called 'active' having a
boolean data type
On Thu, 17 Jan 2019, Adrian Klaver wrote:
It would produce results, so yes it would work. The question are they the
results you want?
Adrian,
To which the answer is no as I just discovered.
The above would return anything with a next_contact less then today. That
could extend backwards to
On Thu, 17 Jan 2019, Adrian Klaver wrote:
Got to thinking more and realized the answer depends on what you want the
query to produce. Can you let us know what is you are trying to pull out
with the query?
Adrian, et al.,
Took your advice and re-thought what I need the query to return. This
al
On Thu, 17 Jan 2019, Adrian Klaver wrote:
I would think the active would be on People or Organizations. Then you can
eliminate then from the query results before you ever got to the contact
history.
Adrian,
Excellent point. I don't know why I put active in the contacts table as it
does make m
On Thu, 17 Jan 2019, David G. Johnston wrote:
I would advise changing Contacts to "Activities" as the former can readily
be interpreted (and is in the wild) as both "an instance of contacting a
person" and "the person at the organization who is being contacted" (i.e.,
your People class).
David
On Tue, 15 Jan 2019, Rich Shepard wrote:
Working with my sales/client management system using psql I have a select
statement to identify contacts to be made. This statement works:
With much patient advice from Adrian, David, Thomas, and Ron I fixed the
schema and the query statement. To close
Running postgresql-10.5 on Slackware-14.2.
A table has a column defined as
Column | Type | Collation | Nullable | Default
next_contact | date | | |
In a .sql file to insert rows in this table psql has a problem when there's
no value for the next_contact column:
$ psq
On Mon, 11 Feb 2019, Tom Lane wrote:
An empty string is not a null.
Tom,
I understand this yet thought that empty strings and numeric fields were
accepted. Guess I need to review this.
Thanks,
Rich
On Mon, 11 Feb 2019, Ron wrote:
NULL is nothing. Blank isn't nothing; blank is a zero-length string.
Thus, you need to tell Pg "nothing", not "blank string".
Ron,
All of you who responded drove home my need to explicitly enter null when
there are no data for a column.
Thanks,
Rich
On Mon, 11 Feb 2019, Rich Shepard wrote:
All of you who responded drove home my need to explicitly enter null when
there are no data for a column.
Correction: when there are no date data for a column.
Rich
On Mon, 11 Feb 2019, Ron wrote:
You've got ADOS (All Databases are Oracle Syndrome).
Interesting as I've never bought, used, or seen anything from Oracle. Guess
it's transmitted by errent bits.
Regards,
Rich
On Mon, 11 Feb 2019, Ken Tanzer wrote:
Just in case you miss this little nuance, you don't necessarily _have_ to
specify a NULL for that column, depending how you're doing your inserts.
You haven't show us your table or what INSERT you're using, but all of
these examples will work, and don't spe
On Tue, 12 Feb 2019, Laurenz Albe wrote:
If you insert a string into a "date" column, PostgreSQL will try to
convert the string to a date with the type input function. The type input
function fails on an empty string, since it cannot parse it into a valid
"date" value. This also applies to the e
The query is to return the latest next_contact date for each person. Using
the max() aggregate function and modeling the example of lo_temp on page 13
of the rel. 10 manual I wrote this statement:
select (P.person_id, P.lname, P.fname, P.direct_phone, O.org_name,
A.next_contact)
from People as P
On Tue, 12 Feb 2019, David G. Johnston wrote:
You put the open parenthesis after the word select instead of before.
A.next_contact = (SELECT max(A.next_contact) FROM A)
David.
Color me suitably embarrassed.
Thank you,
Rich
On Tue, 12 Feb 2019, Jeff Ross wrote:
Try (select (max(A.next_contact) from A)
Thanks, Jeff.
The syntax accepted by psql is
A.next_contact = (select (max(A.next_contact)) from Activities as A)
but the date is not included in the output.
The revised statement is now:
select (P.person_id, P.ln
On Tue, 12 Feb 2019, Rich Shepard wrote:
A.next_contact = (select (max(A.next_contact)) from Activities as A)
Errata:
The parentheses around the max aggregate are not necessary.
A.next_contact now displays at the end of each returned row as 'infinity'.
Rich
On Tue, 12 Feb 2019, Adrian Klaver wrote:
'infinity' is the max date, so this is what you want?
Adrian,
Nope. When I went to make a cup of coffee I realized that I need the other
date constraints (such as IS NOT NULL), too. I'm re-wording the statement to
put everything in the correct order.
On Tue, 12 Feb 2019, Ken Tanzer wrote:
select (P.person_id, P.lname, P.fname, P.direct_phone, O.org_name,
(select max(A.next_contact) from Activities as A WHERE
p.person_id=A.person_id)
FROM ...
Ken,
Yes, cheers indeed. A bit of thinking and re-organizing resulted in a
working statement that
On Tue, 12 Feb 2019, Ken Tanzer wrote:
If that's getting you what you want, then great and more power to you. It
looks like you'll only get people who have a next_contact in your target
window there. You might also consider something like this...
Ken,
I'll work with your example. This loo
On Wed, 13 Feb 2019, Andrew Gierth wrote:
Rich> Will probably try DISTINCT ON, too, if that makes it simpler or
Rich> faster.
You want LATERAL.
Andrew,
That's new to me so I'll read about it.
Thanks,
Rich
On Tue, 12 Feb 2019, Ken Tanzer wrote:
If that's getting you what you want, then great and more power to you. It
looks like you'll only get people who have a next_contact in your target
window there. You might also consider something like this...
select
p.person_id,
p.lname,
p.fname,
On Wed, 13 Feb 2019, Adrian Klaver wrote:
The LEFT JOIN. There are rows in people for which there no records coming
from the sub-select on activities, so the row is 'padded' with NULL values
for the missing data.
Adrian,
I assume it's the inner left join. I'll trace what's happening at each s
On Wed, 13 Feb 2019, Adrian Klaver wrote:
AFAIK there is no inner left join:
https://www.postgresql.org/docs/10/sql-select.html#SQL-FROM
Sigh. There are two LEFT JOINS in the statement. I referred to the SECOND
one as INNER. I correct my message to refer to the second of the two left
joins.
R
On Wed, 13 Feb 2019, Adrian Klaver wrote:
Should have been clearer in my previous post, you can get rid of the nulls
by filtering out the entire row.
Adrian,
Thank you. I'm rebuilding the statement from the inside out (which helps me
learn more SQL in the process). For example,
select * from
On Wed, 13 Feb 2019, Adrian Klaver wrote:
It will work if you use it to filter after the joins are done.
I'll work on finding the proper syntax to do this. Need to do more reading
and trial-and-error testing.
Regards,
Rich
On Wed, 13 Feb 2019, Andrew Gierth wrote:
Adrian> Close to your last posted query. person_id 2 and 3 have NULL
Adrian> values for activities data as there is no record for 2 and 3 is
Adrian> out of the date range.:
DISTINCT ON with no matching ORDER BY at the _same_ query level is
non-determi
On Wed, 13 Feb 2019, Adrian Klaver wrote:
Given a sufficiently large date range that may not be true as you may have
contacted a given person multiple times during that range and generated
multiple activities records.
Adrian,
This is true as it has occurred. I want only the most recent activi
On Wed, 13 Feb 2019, Brent Wood wrote:
I have not really followed this thread but would not a query along the lines of
select * from activity where person_id = n and timestamp = (select
max(timestamp) from activity where person_id = n);
give the required answer ie, always return the latest resul
On Wed, 13 Feb 2019, Andrew Gierth wrote:
You want LATERAL.
Andrew, et al,:
I found a couple of web pages describing the lateral join yet have not
correctly applied them. The manual's page did not help me get the correct
syntax, either. Think I'm close, however:
select p.person_id, p.lname,
On Fri, 15 Feb 2019, Andrew Gierth wrote:
LATERAL (SELECT ...) is syntactically like (SELECT ...) in that it comes
_after_ a "," in the from-clause or after a [LEFT] JOIN keyword. Don't
think of LATERAL as being a type of join, think of it as qualifying the
(SELECT ...) that follows.
Andrew,
On Fri, 15 Feb 2019, Andrew Gierth wrote:
LATERAL (SELECT ...) is syntactically like (SELECT ...) in that it
comes _after_ a "," in the from-clause or after a [LEFT] JOIN keyword.
Andrew,
Yes, the missing ',' made a big difference.
You'd want a condition here that references the "people"
On Fri, 15 Feb 2019, Andrew Gierth wrote:
Rich> I've not before run 'explain' on a query. Would that be
Rich> appropriate here?
Yes.
Andrew,
I'll learn how to use it.
The problem here is that you have no join conditions at all, so the
result set of this query is massive. And you've duplica
On Fri, 15 Feb 2019, Andrew Gierth wrote:
select p.person_id, p.lname, p.fname, p.direct_phone, o.org_name, sq.*
from people as p
join organizations as o on p.organization_id=o.id -- OR WHATEVER
cross join
lateral (select a.next_contact
from activities a
On Thu, 28 Mar 2019, Ken Tanzer wrote:
You need the ORDER BY in the outer join.
Ken,
I thought so. But, ...
(And I don't think the one inside the lateral join is doing you any good).
Try:
...
a.next_contact is not null
limit 1) sq
order by sq.next_contact
On Thu, 28 Mar 2019, David G. Johnston wrote:
Yes, if you join the result on an ordered subquery to anything you no
longer have a guaranteed order for the combined relation.
David,
This makes sense to me.
select ...
from ...
join ...
cross join lateral ...
-- now add an order by for the top
On Thu, 28 Mar 2019, David G. Johnston wrote:
It returns something at least. If you put the output you get into a
spreadsheet are you able to manually sort it the way you desire?
David,
Probably, but that's not practical for the application.
Thanks,
Rich
On Thu, 28 Mar 2019, Ken Tanzer wrote:
Really? Is your next_contact field a date field and not a text field? What
order does it come out in?
(And I assume you saw David J's correction to the misinformation I offered.)
Ken,
Mea culpa. the next_contact column is a date, I did apply David's
cor
On Fri, 29 Mar 2019, Andrew Gierth wrote:
That query seems correct assuming you want the result in descending order
of next_contact. How did the actual result differ from your expectation?
Andrew,
User error: I had a couple of date typos (2018 rather than 2019) and was
thinking of generating
An unexpected result this morning that I'd like to understand. In emacs I
loaded the file organizations.sql in a buffer to insert new rows in that
table. Rather than running psql from a virtual console, I opened an emacs
shell and entered the command,
psql -f organizations.sql -d bustrac
and saw
On Tue, 2 Apr 2019, Adrian Klaver wrote:
What was the exact message?
What was in the last line?
Difference in shell escaping?
Adrian,
Cannot answer the first two because that work is long gone. So, I just tried
it again with only one row to insert and psql inserted that row without
complaint.
Just out of curiosity, how does postgres assign serial primary key
identifiers when rows are inserted in multiple, separate working sessions?
I'm populating tables using INSERT INTO statements in separate working
sessions and see that the assigned id numbers are sequential in each
session, but ha
On Thu, 4 Apr 2019, Adrian Klaver wrote:
See:
https://www.postgresql.org/docs/11/sql-createsequence.html
Thanks, Adrian.
My web searches did not find this URL, only results on how to set up
automatic serial id generation.
Regards,
Rich
When I created the database I set primary key data types as integer; for
example:
Column| Type | Collation | Nullable | Default
--+---+---+--+-
org_id | integer | | not null |
nextval('organizations_o
On Fri, 19 Apr 2019, Michel Pelletier wrote:
https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-SERIAL
"The data types smallserial, serial and bigserial are not true types, but
merely a notational convenience for creating unique identifier columns"
so really there's no differ
On Fri, 19 Apr 2019, Adrian Klaver wrote:
If it is working for you now I see no reason to switch.
Adrian,
It does work. I just learned about the SQL identity type and want to learn
when it's most appropriate to use. The databases I develop all work with
integers as primary keys and reading ab
On Fri, 19 Apr 2019, Adrian Klaver wrote:
Mainly for folks that want cross database SQL compliance. It is not a type
so much as a way of specifying an auto-increment column.
Thank you, Adrian. I saw that it was a column specification and your
explanation of its application is really helpful.
On Tue, 23 Apr 2019, Peter Devoy wrote:
I think you may have serial already there (indicated by sequence in the the
default value).
Peter,
As serial is an alias for integer (the actual data type) using integer and
specifying it as the primary key works.
If you wish to change to identity col
I just updated a column in a table (postgresql-10.5) and accidently applied
it to all 185 rows rather than just one. There is no active transaction to
roll back.
Each night I do a backup and just started working on the database a few
minutes ago. If I restore all contents of
/var/lib/pgsql/10/dat
On Tue, 14 May 2019, Adrian Klaver wrote:
A file level backup or database dump?
Adrian,
File level. April 20th is my most recent database dump because I forgot to
run it last Friday afternoon.
Rich
On Tue, 14 May 2019, Adrian Klaver wrote:
Does the table you overwrote the data change much?
Adrian,
Yes. It's in my business tracking database so it's updated almost every day.
If not it might be safer to just fetch it from the April 20th dump and
then apply the changes since then.
The c
On Tue, 14 May 2019, Tom Lane wrote:
Yeah. You can't just selectively copy files, because the data files are
dependent on the contents of the pg_xact transaction log; it's all or
nothing.
Tom,
That's why I thought of copying the entire data/ directory.
Also, I don't know what method you've
On Tue, 14 May 2019, Brad Nicholson wrote:
Might I suggest you setup proper backups with continuous archiving
instead? If you had those, you would be able to restore this database back
to the point right before you issued the bad update statement.
I'd highly recommend pgBackRest for the task.
On Tue, 14 May 2019, Adrian Klaver wrote:
Or just fetch them from the table data you have saved in the dump file.
Adrian,
Sigh. I should have thought of that. A great time saver.
Thanks,
Rich
On Tue, 14 May 2019, Adrian Klaver wrote:
Or just fetch them from the table data you have saved in the dump file.
Adrian,
This did save a lot of time! Thanks for the pointer.
And I think I'll set up a cron job to do a database dump each day with the
date appended to the file name in the bas
I'm cleaning and formatting a 800-line data file to be inserted into a
database. Some of the input file fields will be inserted into an
'organizations' table letting postgres assign sequential org_id numbers.
Other fields will be inserted into a separate 'people' table associated with
each organiz
On Tue, 21 May 2019, Adrian Klaver wrote:
Well you are not going to know the org_id until the organization table is
loaded, which means something like:
1) First run through file load the organizations table.
2) Build a mapping of org_id to organization.
3) Run through data file again and loa
On Tue, 21 May 2019, Francisco Olarte wrote:
From how you say it, I assume you have some data in your original
dumps which can relate boths, lets assume it's org_name, but may be an
org-code. If you do not have it it means you cannot match people to
orgs in your data, all is lost.
Francisco,
On Tue, 21 May 2019, Michael Lewis wrote:
For each row-
Insert into organizations table if the record does not exist, returning ID.
Insert into people using that ID.
Michael,
The org_id will not exist until I run the insert script.
Else, load all the data with empty ID column on person tabl
On Tue, 21 May 2019, Adrian Klaver wrote:
The other way is to create the org_id for each organization ahead of time
and put it into the data file. Either way you have create the org_id for
the FK relationship, it is just a matter of where and when.
Adrian,
I had thought of that but overlooked
On Tue, 21 May 2019, Will Hartung wrote:
You can either use a script for the entire process, or, convert the people
table to INSERT statements that have a SELECT for the foreign key as part
of the insert.
INSERT INTO PEOPLE (id, name, org_id) VALUES (1, ‘Bob’, (SELECT org_id
FROM org WHERE org_
On Wed, 22 May 2019, Francisco Olarte wrote:
I'm curious, what org_id do you put (manually) to the people? you must
have some way to match it ( like, say, "I have an organization line,
followed by lines for people in this organization"
Francisco,
The first data entered was in small chunks so
On Wed, 22 May 2019, Jeremy Finzel wrote:
There's absolutely no need to use anything beyond SQL here, though you
could if you want to.
Jeremy,
This is a new experience for me so I didn't think of a SQL solution.
I really wonder how much we are just talking past each other simply because
we
On Wed, 22 May 2019, Adrian Klaver wrote:
So does the people data have an organization attribute?
Adrian,
Yes. It's the FK to the organization table.
If so why not just assign the org_id while cleaning up the data?
That's what I thought to do based on your suggestion yesterday. It would
m
On Wed, 22 May 2019, Francisco Olarte wrote:
You are not reading what we write to you. Note YOU AND ONLY YOU are the
one speaking of PK. We are speaking of "unique identifier" ( that would
be, IIRC, "candidate keys", you can peek any as your PK, or even introduce
a new synthetic one with a seque
On Wed, 22 May 2019, Francisco Olarte wrote:
Also, when I speak of "unique identifier" I'm not speaking of the one if
your FINAL tables, I assume you would have at least the *_id field as
PKEY, so nothing else needed, but the one in your SOURCE data set (it can
be anything, like the row number i
On Wed, 22 May 2019, Jeremy Finzel wrote:
Are you saying your database already has an organizations table, and this
data file is appending to it with all-brand-new organizations and people?
Jeremy,
The database has both organizations and people tables (among others) which
are already populate
On Wed, 22 May 2019, Adrian Klaver wrote:
A sample of the data you are cleaning up.
Adrian, et al.:
I have it working properly now. Both org_id and person_id numbers are
prepended to each row in the appropriate table and they are unique because
each series begins one greater than the max(*_id
On Thu, 23 May 2019, Frank Alberto Rodriguez wrote:
If you have the database modeled, the most quickly think I can thinks is
with python framework Django. Configure the connection to the DB and make
reverse engineer with Django, this create the entities class, then
activate the administration fo
On Tue, 4 Jun 2019, Lou wrote:
To start off, I just need to convert true to 's'. false will have to be
manually changed to 'f' or 'p' or 'e' as appropriate.
Lou,
I'm far from an expert so take my comments with a bag of salt. First,
'false' is displayed in a column as 'f' when you look at a ta
On Tue, 4 Jun 2019, David G. Johnston wrote:
Actually, given that "f" is becoming multiple different values it seems
like the OP is improving upon their data model. That should very much be
done at the table level at not relegated to views, let alone a UI layer.
It is not unusual to want to con
On Mon, 24 Jun 2019, David Gauthier wrote:
I've been poking around
https://wiki.postgresql.org/wiki/Community_Guide_to_PostgreSQL_GUI_Tools
to see if there is anything that can read PG metadata in and display it
graphically in a gui. You know, the kind of picture that is 1 block per
table with 1
It's been a _very_ long time since I wrote a SQL script and, despite looking
at my SQL books and web pages, I don't know how to fix the error.
The three line script is:
-
SELECT p.lname, p.fname, p.job_title, p.company_nbr, p.email, c.company_name
FROM people as p, companies as c
LEFT JOIN
201 - 300 of 500 matches
Mail list logo