Skip to content

How to transpose NULL value to 00:00

I have a view that gets data from an internet database. The view I created works, but when there is no data (NULL) I need it to return 00:00. How can I achieve this? Using SSMS I am getting the starttime of booked resources. I already get them in the right way. But sometimes it returns NULL. I searched the

SQL – FOR XML – How to add property to tag

I have the a stored procedure to generate an XML document based on the UBL-TR-2.1 standard. This is the query where the xml data is generated: A sample output of this query is this XML file: This works so far so good. But now some XML elements shall have attribute in the element itself. One example is: How ca…

SQL – create SQL to join lists

I have the following table: Add Data: Find users who share addresses. Expected Results: Question: How do I formulate a SQL query to obtain the expected result? Much appreciated. More info: PostgreSQL 9.5.19 Answer I don’t know if this is the most efficient method, but I can’t come up with somethin…