Viewing 15 posts - 841 through 855 (of 1,396 total)
It's missing a comma at the end of line 6. There's not any sample data so I'm not able to run the code.
September 29, 2020 at 11:50 am
It appears you're looking for something that either works completely or fails and completely rolls back. Something like this try/catch script which doesn't have error handling or parameters. The reserved...
September 28, 2020 at 10:18 pm
4. There 56 left brackets and 56 right brackets in your code which could/should be replaced by nothing. They're necessitated by spaces in object names. Please, please, please never again,...
September 28, 2020 at 2:32 pm
i already remove the where clause and add where clause to the left join on, but the return result got wrong quantity in every column
It's good news we're making...
September 28, 2020 at 1:05 pm
A couple of things
1. Opening an xlsx file is going to be a tough sell around here. Not a good practice.
2. Table aliases are essential for readable code. Please choose...
September 27, 2020 at 10:04 pm
Heh... as a bit of a sidebar, it's nice to see someone use the term "Record" correctly. 😀
Has a consensus been reached and record = row? I fear you've...
September 27, 2020 at 5:57 pm
There are a couple of ways.
The most preferred imo would be to create 'count_grp' using a windowing function and exclude in the WHERE clause of the outer query.
September 26, 2020 at 12:14 pm
Just a note about the table design. For this purpose all of the rows which are not a holiday are irrelevant. Meaning if there were a table of just holidays...
September 26, 2020 at 2:56 am
select distinct a.KeyId
from applications a
where not exists (select 1
from...
September 26, 2020 at 2:38 am
Here are two ways depending on whether GETDATE() returns the date you're interested in. If it does you could use something like this
/* use GETDATE() to determine...
September 26, 2020 at 2:13 am
My "favourite" response ever for that question is "do you mean now?"
We're in now now
September 25, 2020 at 2:30 pm
"How do you get the current date and time using T-SQL question that 20 out of 22 candidates couldn't answer before I stopped counting. It's NOT a trick question,...
September 25, 2020 at 2:12 pm
There's a documented process for submitting performance issues. In the footer of Jeff Moden's forum posts there's a link.
September 24, 2020 at 10:15 pm
Here's some code to test for what works
declare
@number1 varchar(12)='121',
@number2 varchar(12)='126';
select top(1) tp.number, tp.username
from (values ('4581265', 'J'), ('14121587', 'K')) tp(number, username)
where tp.number like '%'+@number1+'%'...
September 24, 2020 at 6:55 pm
Could each user entered number be assigned to a different variable? If you have number1 and number2 then something like this
select top(1) tp.number, tp.username, ...
from tb_phone tp
where...
September 24, 2020 at 5:06 pm
Viewing 15 posts - 841 through 855 (of 1,396 total)