Viewing 15 posts - 1,066 through 1,080 (of 1,390 total)
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
drop table if exists #sale_order;
drop table if exists #sale;
drop table if exists #sale_result;
go
create table #sale_order(
id int identity primary key
,item_id...
April 1, 2020 at 8:53 pm
Why not update the 'sale' table directly? Do the 'sale' table and 'sale_result' table always have the same # of rows? If so, could this be implemented by making 'sale'...
April 1, 2020 at 7:44 pm
Is it correct: rows with NULL ship_date in the 'sale' table are created before the corresponding ship_date in the sale_order table? Units always ship in the quantity ordered?
April 1, 2020 at 6:43 pm
The way this is set up isn't straightforward because there's no way to join to the duplicated rows in sale WHERE ship_date is null. I re-jiggered the script to not...
April 1, 2020 at 3:40 pm
This is simpler
declare
@start_dt datetime='2019-12-02',
@end_dt ...
April 1, 2020 at 2:28 pm
Viewing 15 posts - 1,066 through 1,080 (of 1,390 total)