Click here to Skip to main content
14,579,459 members
   

Database

 
Questionhow to delete specific data from multiple tables in sql database Pin
Ko Htet Kyaw7-Feb-18 5:53
MemberKo Htet Kyaw7-Feb-18 5:53 
AnswerRe: how to delete specific data from multiple tables in sql database Pin
ZurdoDev7-Feb-18 7:16
mveZurdoDev7-Feb-18 7:16 
QuestionQuick Join to get the weight Pin
jkirkerx5-Feb-18 11:16
professionaljkirkerx5-Feb-18 11:16 
AnswerRe: Quick Join to get the weight Pin
Richard Deeming6-Feb-18 2:33
mveRichard Deeming6-Feb-18 2:33 
GeneralRe: Quick Join to get the weight Pin
jkirkerx7-Feb-18 6:56
professionaljkirkerx7-Feb-18 6:56 
QuestionTo update multiple dynamic field in a single query Pin
Member 136574851-Feb-18 23:01
MemberMember 136574851-Feb-18 23:01 
AnswerRe: To update multiple dynamic field in a single query Pin
Richard Deeming2-Feb-18 1:16
mveRichard Deeming2-Feb-18 1:16 
Something like this should work:
DECLARE @SQL nvarchar(max) = N'';

SELECT
    @SQL = @SQL + N', ' + QUOTENAME(name) + N' = @value'
FROM
    sys.columns
WHERE
    object_id = OBJECT_ID('Record')
And
    name Like '%_edit'
;

SET @SQL = Substring(@SQL, 3, LEN(@SQL) - 2);
SET @SQL = N'UPDATE Record SET ' + @SQL;

PRINT @SQL;

EXEC sp_executesql @statement = @SQL, 
    @params = N'@value varchar(10)', -- TODO: Use the correct data type and size here
    @value = 'XXX';




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: To update multiple dynamic field in a single query Pin
Member 136574854-Feb-18 22:46
MemberMember 136574854-Feb-18 22:46 
QuestionPossible to use Linq to query a column that contains a description and remove the whitespaces? Pin
jkirkerx18-Jan-18 8:40
professionaljkirkerx18-Jan-18 8:40 
AnswerRe: Possible to use Linq to query a column that contains a description and remove the whitespaces? Pin
Jörgen Andersson18-Jan-18 9:17
professionalJörgen Andersson18-Jan-18 9:17 
AnswerRe: Possible to use Linq to query a column that contains a description and remove the whitespaces? Pin
Chris Quinn18-Jan-18 22:13
MemberChris Quinn18-Jan-18 22:13 
AnswerRe: Possible to use Linq to query a column that contains a description and remove the whitespaces? Pin
Eddy Vluggen19-Jan-18 4:12
professionalEddy Vluggen19-Jan-18 4:12 
AnswerTable of straight text Pin
jkirkerx19-Jan-18 7:30
professionaljkirkerx19-Jan-18 7:30 
AnswerRe: Possible to use Linq to query a column that contains a description and remove the whitespaces? Pin
jschell20-Jan-18 6:06
Memberjschell20-Jan-18 6:06 
QuestionEntity Framework 6 - Set Connection String at Runtime Pin
Kevin Marois12-Jan-18 7:17
professionalKevin Marois12-Jan-18 7:17 
AnswerRe: Entity Framework 6 - Set Connection String at Runtime Pin
Richard Deeming12-Jan-18 8:23
mveRichard Deeming12-Jan-18 8:23 
QuestionProblem with Access Pin
JackMisani10-Jan-18 7:51
MemberJackMisani10-Jan-18 7:51 
AnswerRe: Problem with Access Pin
Tim Carmichael12-Jan-18 3:50
MemberTim Carmichael12-Jan-18 3:50 
GeneralRe: Problem with Access Pin
JackMisani12-Jan-18 4:23
MemberJackMisani12-Jan-18 4:23 
GeneralRe: Problem with Access Pin
Tim Carmichael12-Jan-18 5:13
MemberTim Carmichael12-Jan-18 5:13 
GeneralRe: Problem with Access Pin
JackMisani16-Jan-18 22:07
MemberJackMisani16-Jan-18 22:07 
GeneralRe: Problem with Access Pin
Tim Carmichael17-Jan-18 2:24
MemberTim Carmichael17-Jan-18 2:24 
QuestionOLEDB connection to a SQL server database hosted in an availability group (repost) Pin
kmoorevs2-Jan-18 11:38
Memberkmoorevs2-Jan-18 11:38 
AnswerRe: OLEDB connection to a SQL server database hosted in an availability group (repost) Pin
PIEBALDconsult2-Jan-18 14:12
professionalPIEBALDconsult2-Jan-18 14:12 
GeneralRe: OLEDB connection to a SQL server database hosted in an availability group (repost) Pin
kmoorevs4-Jan-18 8:33
Memberkmoorevs4-Jan-18 8:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.