« first day (2525 days earlier)      last day (1793 days later) » 

6:37 AM
Morning guys
 
7:24 AM
morning
 
8:11 AM
Morning
 
Hi guys I have a quick question
What does this do?
 
Morning
 
MAX(CASE WHEN column_value = '' THEN column ELSE END)
 
Does that work? I'd expect a value between the ELSE and the END?
 
yeah sorry there is a value
MAX(CASE WHEN column_value = '' THEN column ELSE 0 END)
 
8:26 AM
Ah I'm taking from the above, that you have a mix of numbers and characters in that column
 
yeah its a VARCHAR column
 
1. It's checking if the column_value = '' (an empty string)
2. If it is, it's saying "treat it as a 0 instead"
3. It's the finding the highest value in that column
 
so it will return a single row right?@Shaneis
 
Depends on the rest of the query but if it's something like SELECT MAX(CASE WHEN column_value = '' THEN column ELSE 0 END) FROM table; then yes it will
 
@Shaneis nice one
didn't know it was possible
 
8:31 AM
I would hope you'd never need it @AndyK
 
@Shaneis I did ETL with access so I can never say never but hopefully, I will never use it :)
 
ah! Good point
 
Can you show a case where it might return more than one rows? @Shaneis
I actually came across a query that does like that but I am not understanding how
 
| Name | column_value |
| :----- | ----: |
| Shane | 30 |
| Andy | 18 |

`SELECT MAX(CASE WHEN column_value = '' THEN column ELSE 0 END) FROM table GROUP BY Name;`
 
I didn't get the output that will be shown in the above case
Can you please explain it elaborately?
 
8:46 AM
Guru, give me some coffee already!!!!
 
@ARr0w you drink coffee?
@Shaneis 18? I'm 18 yo?
I wish
 
9:06 AM
@Shaneis please explain how we are getting more than one result in the sample dataset you took?
 
asking him once is enough
give the man some time :) we are all at work
 
Was in the server room tracing cables >:(
works for me
 
10:11 AM
ey guys, anyone got xp with SSRS ... I have a problem, managed to get up a server and deploy few reports, so now in my .net core app, from my local machine (from debug) i successfully get a report from a server, but when i publish application and a same server where my SSRS is running, i get error that operation timed out, error is System.Net.HTTP.WinHttp.Exception: The operation timed out
 
10:58 AM
it isn't really returning multiple rows where a single is expected, it's just that you aren't showing the name column that you are grouping on
 
Looks like many computer science classes are just tackling SQL: whole mess of beginner questions popping up. Let's be nice to them.
 
i noticed that. I still think that it doesn't excuse the inability to ask a questiion properly. The basis of good database querying is understanding how to ask the right question in the right way.
 
11:22 AM
@Veljko89 connection with database is timing out maybe?
@AndyK off course i do.
 
@ARr0w nah mate, if it was that, i couldn't generate it from local, i added bunch of logging (every 3rd line) and i got most pleasant MS error description ...
System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Ntlm'. the authentication header received from the server was 'NTLM'
 
so there is something wrong in the header when data is being transferred via HTTP ?
 
these might be worth looking at...
13
Q: The HTTP request is unauthorized with client authentication scheme 'Ntlm'

kruviWhile calling a web service I get the following error: The HTTP request is unauthorized with client authentication scheme 'NTLM'. The authentication header received from the server was 'NTLM'. The HTTP request is unauthorized with client authentication scheme 'NTLM'. The authentication header...

 
@Veljko89 if data format is in JSON, check google json header types and try accordingly
@iainc nice share!
 
I am connection to ReportExecutionServiceSoapClient ... will check all links and give it a shot
 
11:55 AM
Hi all,

a user can have more than one order at a time in my database. i need to update orders for many users at a time. I am using Case When construct for bulk update. My requirement is that only single order of a user be updated only
can u plz write me a query?
 
UPDATE TableName SET ColumnName = NewValueHere WHERE ID = YourChoiceOfID
 
12:54 PM
@ARr0w oh \o/
 
R K
1:27 PM
CREATE TABLE tempTable AS
SELECT * FROM items
WHERE CategoryName = 'Household';
is this wrong?
this is where i'm learning this from (w3schools.com/sql/trysql.asp?filename=trysql_create_table2)
apparently syntax error both on my teacher's webpage as well as my learning platform
 
1:40 PM
what database is that? It won't work on MSSQL
 
R K
1:50 PM
yes
 
@RK I don't think "yes" is a helpful answer here XD It's definitely an answer, just not helpful :)
Is the database you're learning in this list "Micrsoft SQL Server", "MySQL", "SQLite", "Postgres", "db2", "Oracle"?
 
@Shaneis any ideas about user dictionaries in pgsql ?
 
afraid not - you did remind me again I do want to try and learn a "free" database though
 
@Shaneis lmaooo
291
A: How do I list all columns for a specified table

bhambyIn addition to the command line \d+ <table_name> you already found, you could also use the Information Schema to look up the column data, using information_schema.columns: SELECT * FROM information_schema.columns WHERE table_schema = 'your_schema' AND table_name = 'your_table' Note: As per...

 
2:13 PM
interesting!
 
2:24 PM
steals shaneis's coffee muhahahahaha
 
I always knew there was a devious side to @ARr0w >:(
 
2:59 PM
heading off, ttyl all
 
3:09 PM
@Shaneis \o/
@Shaneis ttyl man, take care
 
@Shaneis see ya
why everyone is leaving so early?
 

« first day (2525 days earlier)      last day (1793 days later) »