Skip to content

Tag: sql

How do I safely read from a stream in asp.net?

If: Reading from a stream in a single call to Read is very dangerous. You’re assuming all the data will be made available immediately, which isn’t always the case. You should always loop round, reading until there’s no more data. How should I change the above code to make it ‘less dang…

How to get missing values in sql?

I need help. I have a sql table t2 related to two other tables t1 and t3. t2 has fields: I’m searching for values, where ifFromt3 is missing. I want to fint in this example, the value ifFromt3 = 3, because of it’s not present. I’m doing it like this example, but it doesn’t work correct…

using DateDiff to find duration in minutes

I am trying to use Datediff to find out the duration between columnA and columnB. This produces errors. Can anyone please help me with what I’m doing wrong? Answer how about trying this, not sure why you have stime = [exceptions2].starttime and etime = [exceptions2].endtime

How to divide two columns?

I tried to divide two columns from joined tables but the result (value of column relative_duration) is always 0. The query is the following: SELECT t1.[user_1] ,t1.[user_2] ,t1.[…