Linked Questions

-1 votes
2 answers
5k views

I have a table "INSERTIF" which looks like this - id value S1 s1rocks S2 s2rocks S3 s3rocks Before inserting a row into this table, I wanted to check if the given id exists or not. If ...
Steam's user avatar
  • 10k
0 votes
0 answers
35 views

I am trying to update the table based on the values passed. I need to check if the same row exists in the table. If it doesn't exist then insert the values into table. If exists the update the ...
beginner's user avatar
  • 303
2 votes
1 answer
2k views

I have database table of 100,000 rows, imported from CSV each week using an SSIS package. Usually updates, but sometimes it can add rows. I see a few exceptions with staging table during the update ...
BKChedlia's user avatar
  • 337
2 votes
0 answers
2k views

I need to update several rows from a table in a single operation. What I'd normally do, is to delete (soft delete) all previous records with the same foreign key and insert everything again. But this ...
eddy's user avatar
  • 4,413
0 votes
2 answers
778 views

I need to perform some calculations using few columns from a table. This database table that gets updated every couple of hours generates duplicates on couple of columns every other day. There is no ...
WallStreetBets's user avatar
0 votes
1 answer
557 views

I have a very basic cfquery insert that is inserting my form information 3 times on submit. Anyone know how to stop this? Here is my form. http://jsfiddle.net/DTcHh/27952/ And my page that the ...
LetterThirteen's user avatar
1 vote
1 answer
433 views

I have a table with the below structure. ID Entity UserName UserRole UserStatus UpdatedDate Clustered key is defined on columns Entity, UserName, UserRole. UserStatus for an Entity-UserName-UserRole ...
CodeMaster's user avatar
0 votes
1 answer
691 views

i'm trying to insert data from one table to another with dynamic column name from @array to @array2 error The multi-part identifier "s.id" could not be bound. SQL CODE: DECLARE @Array TABLE ( ...
Jah's user avatar
  • 1,016
0 votes
1 answer
522 views

Situation: a third party drops an XML file in a location, daily, where my windows app pick it up, drop the data from a table in my DB and replace it by the new data. Basically the XML represent the ...
Aurélien Ouédraogo's user avatar
1 vote
3 answers
334 views

I'm using SQL Server and I have a table related N-1 to another table and I have a process that updates the information of the N table by removing all the related rows and inserting them again. I ...
lpaloub's user avatar
  • 868
1 vote
2 answers
79 views

I'm looking for some views on how to go about resolving this challenge. I have a variable say @Var1 which holds a SQL statement within it. Example @Var1 = `SELECT * from another_table WHERE City IS ...
Gary's user avatar
  • 27
1 vote
2 answers
70 views

In a table of my database I want to create new entries that don't exist and update them if they do exist. I got a table that links the UserID LernfeldID and Schoolyear to the Marks. There should only ...
M_Asubi's user avatar
  • 11
1 vote
0 answers
43 views

I am trying to create a SCD type 2 table in SQL server for a data warehouse. I am using the MERGE statement, and my problem is with the "When Matched" part. For example: I have a certain ...
Tal Cordova's user avatar