Skip to content

Tag: sql

Java Sqlite how to print a.rowname

I asked myself how I print a.rowname in Java with jbdc sqlite. Or did I take the wrong solution to fetch all the Selected data? I tried this: And I get this error: In Python it works kind of like this. I can later just get the Selected data from the array: Answer You do not select a.spieler try: Update

Calculating time difference returns null [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 1 y…

Simpler way to do a SUM with a fanout on a join

Note: SQL backend does not matter, any mainstream relational DB is fine (postgres, mysql, oracle, sqlserver) There is an interesting article on Looker that tells about the technique they use to provide correct totals when a JOIN results in a fanout, along the lines of: A good way to simulate the fanout it jus…

PHP, SQL – INSERT INTO SELECET CASE

I have this PHP code connected with form (using nette framework), name of columns are different in every table but geo column is in everyone: which generate this SQL: but I’m getting this error: The goal is to COPY data into the same table but change value of geo column before insert. I know that ELSE v…

Get DateTime from text

How to separate and display only the DateTime from the string? I have a column that holds this data: I used this query to separate out the time: and it returned the same lines. String didn’t get filtered When I tried using this statement: I got this error Conversion failed when converting date and/or ti…