Viewing 15 posts - 1,066 through 1,080 (of 1,396 total)
It randomly picks one of the words
;with data_cte(which_word) as (
select 'some' union all select 'word' union all select 'here')
select top(1)
which_word
from
...
April 6, 2020 at 6:13 pm
This is a beginning and it might get the OP past the id assignment issue.
drop table if exists #src_data;
go
create table #src_data(
EmpId ...
April 6, 2020 at 3:58 pm
Now while i was trying to implement merge, problem is how to assign new identifier value for new record (it should be max value +1 , and this column...
April 6, 2020 at 1:30 pm
Right there with you. I wouldn't bother on that other thread, though. That subject keeps cropping up over and over and over and some of the participants do too. ...
April 4, 2020 at 8:57 pm
Jeff are the results reversed? It lists FORMAT d14 method as 802ms. Maybe copy/paste gone off?
And, please... for the love of your servers and your customers, stop all the...
April 4, 2020 at 6:01 pm
@scdecade - your solution will not work for the OP. The trim function is not available on SQL Server 2016 and would need to be replaced with a rtrim(ltrim(...)). ...
April 4, 2020 at 5:39 pm
If using nested replace then this could be done in the select list. What if the list of replacements is variable?
select
ltrim(rtrim(replace(replace(replace(replace(replace(Employee, '<td><br>', '||'), '<td>',...
April 4, 2020 at 5:28 pm
Here's a table based scalar function approach. Actually, I had a very similar issue this week and this code is lifted from that solution. Which I'm not super happy with...
April 4, 2020 at 3:29 pm
VIN as ID makes more sense to me too.
I kept thinking that IDs would automatically fill but my confusion was mostly with surrogate keys i think.
Imo there is...
April 4, 2020 at 1:18 pm
I am trying to create a row in a table that is created as: CREATE TABLE tax_table ( Data char(275)). Within this table the "Data" consist of 4 fields that...
April 4, 2020 at 12:33 pm
Lordy, no. That's one of the slowest methods possible. I'll be back to prove it. Just don't use FORMAT!
Jeff, maybe so, maybe so. It appears the OP's...
April 4, 2020 at 12:27 pm
One way to do this would be to do search and replace. It would nice to have a regex but it depends on your faith in a single pattern. Per...
April 4, 2020 at 12:19 pm
I am trying to create a row in a table that is created as: CREATE TABLE tax_table ( Data char(275)). Within this table the "Data" consist of 4 fields...
April 3, 2020 at 9:02 pm
declare @qtramt1 numeric(11,0)=94500;
select format(cast(@qtramt1 as bigint), 'd14');
April 3, 2020 at 7:56 pm
That's intended to work for 1 id from #sale_order at a time. Is that how you're intending to update the #sale table?
April 1, 2020 at 9:06 pm
Viewing 15 posts - 1,066 through 1,080 (of 1,396 total)