Click here to Skip to main content
15,075,806 members
Home / Discussions / Database
   

Database

 
QuestionHow to design sql db for storing Name/Value objects with unknown value type (EF Core 5 as ORM)? Pin
Member 146377867-Sep-21 0:43
MemberMember 146377867-Sep-21 0:43 
Rant[REPOST] How to design sql db for storing Name/Value objects with unknown value type (EF Core 5 as ORM)? Pin
Richard Deeming7-Sep-21 1:00
mveRichard Deeming7-Sep-21 1:00 
QuestionWhy not to use NoSQL instead of RMDBS? (not Mongo) Pin
Hopeless Idealist14-Aug-21 1:21
MemberHopeless Idealist14-Aug-21 1:21 
AnswerRe: Why not to use NoSQL instead of RMDBS? (not Mongo) Pin
Mycroft Holmes14-Aug-21 12:36
professionalMycroft Holmes14-Aug-21 12:36 
AnswerRe: Why not to use NoSQL instead of RMDBS? (not Mongo) Pin
jschell5-Sep-21 9:07
Memberjschell5-Sep-21 9:07 
QuestionSql query , comparing a table field to a list of values , condition (MS SQL) Pin
zira178929-Jul-21 15:32
Memberzira178929-Jul-21 15:32 
AnswerRe: Sql query , comparing a table field to a list of values , condition (MS SQL) Pin
Richard MacCutchan29-Jul-21 21:15
mveRichard MacCutchan29-Jul-21 21:15 
AnswerRe: Sql query , comparing a table field to a list of values , condition (MS SQL) Pin
Anand RB 20218-Aug-21 18:16
MemberAnand RB 20218-Aug-21 18:16 
Send the list of products as comma seperated to parameter List of Products and change this query into Dynamic query.

For ex: @listOfProducts is parameter. Send as tilde or comma seperated to SQL query


Inside Query, split the comma seperated and change to list. Use the below script.

DECLARE @listOfProducts VARCHAR(2000) 
SET @listOfProducts='174~175~78~77~191~399~451' 
IF OBJECT_ID('tempdb..#listOfProducts') IS NOT NULL DROP TABLE #listOfProducts
 
SELECT  
DISTINCT  Split.a.value('.', 'VARCHAR(100)') AS Prod INTO #listOfProducts
FROM  (SELECT    
CAST ('<M>' + REPLACE(@listOfProducts, '~', '</M><M>') + '</M>' AS XML) AS String  )
AS A CROSS APPLY String.nodes ('/M') AS Split(a)
WHERE  Split.a.value('.', 'VARCHAR(100)')<>''
	 

	   
SELECT stock_id , loc_id
FROM S_ware D
WHERE D.product_id IN  (select Prod from #listOfProducts)

GeneralRe: Sql query , comparing a table field to a list of values , condition (MS SQL) Pin
CHill609-Aug-21 23:23
mveCHill609-Aug-21 23:23 
AnswerRe: Sql query , comparing a table field to a list of values , condition (MS SQL) Pin
RedDk10-Aug-21 7:57
MemberRedDk10-Aug-21 7:57 
QuestionLooking for advice on key/value storage options Pin
Chris Maunder16-Jul-21 6:21
cofounderChris Maunder16-Jul-21 6:21 
AnswerRe: Looking for advice on key/value storage options Pin
Mycroft Holmes16-Jul-21 12:23
professionalMycroft Holmes16-Jul-21 12:23 
GeneralRe: Looking for advice on key/value storage options Pin
Chris Maunder16-Jul-21 16:11
cofounderChris Maunder16-Jul-21 16:11 
AnswerRe: Looking for advice on key/value storage options Pin
k505416-Jul-21 14:21
mvek505416-Jul-21 14:21 
GeneralRe: Looking for advice on key/value storage options Pin
Chris Maunder16-Jul-21 16:19
cofounderChris Maunder16-Jul-21 16:19 
AnswerRe: Looking for advice on key/value storage options Pin
Gerry Schmitz9-Aug-21 6:04
mveGerry Schmitz9-Aug-21 6:04 
GeneralRe: Looking for advice on key/value storage options Pin
Chris Maunder9-Aug-21 6:22
cofounderChris Maunder9-Aug-21 6:22 
QuestionOpen Office Database Pin
Bram van Kampen1-Jul-21 14:26
MemberBram van Kampen1-Jul-21 14:26 
AnswerRe: Open Office Database Pin
Richard MacCutchan1-Jul-21 21:04
mveRichard MacCutchan1-Jul-21 21:04 
GeneralRe: Open Office Database Pin
Bram van Kampen2-Jul-21 14:54
MemberBram van Kampen2-Jul-21 14:54 
QuestionSelect with pivot Pin
Ismael Oliveira 202119-Jun-21 18:25
MemberIsmael Oliveira 202119-Jun-21 18:25 
AnswerRe: Select with pivot Pin
CHill6023-Jun-21 4:50
mveCHill6023-Jun-21 4:50 
GeneralRe: Select with pivot !! Pin
User 1407655213-Jul-21 21:34
MemberUser 1407655213-Jul-21 21:34 
GeneralRe: Select with pivot !! Pin
CHill6014-Jul-21 3:50
mveCHill6014-Jul-21 3:50 
GeneralRe: Select with pivot !! Pin
User 1407655214-Jul-21 3:58
MemberUser 1407655214-Jul-21 3:58 

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.