Viewing 15 posts - 76 through 90 (of 1,993 total)
as for the original topic of this forum. I've just wasted 30 minutes of oxygen to have to explain (after no details added) that emptystring is not the same as...
MVDBA
March 12, 2020 at 4:38 pm
blank is not NULL,it is emptystring - you need to use DBNULL
if you are passing empty strings in then how does sql know if you want to set the value...
MVDBA
March 12, 2020 at 4:31 pm
ok - here is an example that does not null out your columns
CREATE TABLE x (id int, firstname VARCHAR(50),lastname VARCHAR(50))
GO
INSERT INTO x SELECT 1,'mike','jones'
go
CREATE PROC upd @id...
MVDBA
March 12, 2020 at 4:25 pm
give me 2 minutes and i'll get you a working example
MVDBA
March 12, 2020 at 4:16 pm
Well this is what I have below, and if the parameter is NULL it is wiping it out.
Am I doing it wrong somehow?
UPDATE [dbo].[DebtorACH]
SET first_name =...
MVDBA
March 12, 2020 at 4:13 pm
I do not see how you would do this. would you have an example?
Thank you
nope - both phil and my solution set the value to itself if the parameter...
MVDBA
March 12, 2020 at 4:04 pm
What happens if you try the install from a config file or command prompt switches, specifying Latin1_General_CI_AS as your collation?
that wont fix the OP's issue - all that will...
MVDBA
March 12, 2020 at 3:50 pm
I know this might sound stupid, but check to see if all of your parameters are NULL - then don't update a row that is setting itself to itself.
MVDBA
March 12, 2020 at 3:07 pm
phil's idea is better than mine
MVDBA
March 12, 2020 at 1:57 pm
or even better, rather than building up the table variable inside the proc , could you pass a TVP through?
MVDBA
March 12, 2020 at 1:45 pm
just a thought (might be a bad one)
build a table variable or temp table and put the values in there in a format that mimics the target table (as a...
MVDBA
March 12, 2020 at 1:43 pm
It gets weirder and weirder. The row with PK value "0000001" did have 2 another fields which were empty. This did make this row faulty in real-life (but from...
MVDBA
March 12, 2020 at 12:45 pm
most likely nothing has happened to the installation of your database server.
More than likely it is the input file or the input process
how about using an "if not exists then...
MVDBA
March 12, 2020 at 12:26 pm
ok
we probably need to see the SQL that is being executed, but 15k records is very small for SQL. are you trying to put them all on screen in a...
MVDBA
March 12, 2020 at 12:15 pm
is your reason for switching to read only mode just to preserve the original database?
at that point the AG becomes useless anyway - so break the AG.. if you can...
MVDBA
March 12, 2020 at 12:03 pm
Viewing 15 posts - 76 through 90 (of 1,993 total)