Viewing 15 posts - 226 through 240 (of 1,390 total)
The prompt was based on minimal code
this sql code omits a 2nd column with which we could order the rows. Could you add a date column...
April 25, 2023 at 1:10 am
Without a second column containing a date (or some ordinal data type) there's no way to ensure the row ordering is consistent. Thanks ChatGPT for fixing the data. You could...
April 24, 2023 at 10:18 pm
No idea what's meant by the rounding. Presumably (to get the correct output) there's a '<=' inequality. To handle the range between 174 and 176 you could create a partial...
April 24, 2023 at 9:47 pm
Here in New Jersey USA it's too nice of a day to sit behind a screen! Spring fever in full effect here 🙂 After my 2 o'clock meeting... adios
April 13, 2023 at 5:17 pm
I am getting this error. How do I fix it?
(573 rows affected)
Msg 468, Level 16, State 9, Line 14
Cannot resolve the collation conflict between "Latin1_General_CI_AS" and...
April 12, 2023 at 11:22 am
drop table if exists #trades;
go
create table #trades(
underlying_symbol varchar(10) not null,
trade_date ...
April 12, 2023 at 2:03 am
From the tables provided what is the expected result?
April 10, 2023 at 4:31 pm
If it were only the 100th row maybe OFFSET paging. Since it's both the aggregation of the rows as well as the 100th value you could try using ROW_NUMBER in...
April 6, 2023 at 4:56 pm
Nice one Jeff. That's a good looking query. It makes good use of '+' as the NULL respecting concatenation operator. My initial thought was to reverse the string and use...
April 6, 2023 at 12:16 pm
All right it sounds tedious. To differentiate the duplicates you're looking to add 1, 2, 3, ... n hours to the datetime column, EffectiveDate. Of course, this could create new...
April 4, 2023 at 7:11 pm
Maybe 3 WHERE clause conditions could be sufficient (A and B or C):
A) the existing criteria
B) NOT College ID 06 under Municipality 25002
C) municipal_ID equals 4269005 (which would be inclusive...
April 4, 2023 at 12:24 pm
Or it could be 5 or ?
March 30, 2023 at 12:45 pm
In conclusion I would recommend a crosstab-type query. Conventions of language don't always map to relational operators. And often predictably so. Language conventions that is. Are you sure you're...
March 30, 2023 at 12:38 pm
Just scanning the code and there are nested Try/Catch and a transaction is declared but rollback only appears in 1 of the TRY code blocks. That's concerning imo. Could you...
March 25, 2023 at 6:09 pm
Maybe throw a general exception and write your own error message. Or the method returns void so maybe just "return;"?
March 25, 2023 at 6:02 pm
Viewing 15 posts - 226 through 240 (of 1,390 total)