Click here to Skip to main content
15,797,606 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 1:43
Member 146377867-Sep-21 1: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 2:00
mveRichard Deeming7-Sep-21 2:00 
QuestionWhy not to use NoSQL instead of RMDBS? (not Mongo) Pin
Hopeless Idealist14-Aug-21 2:21
Hopeless Idealist14-Aug-21 2:21 
AnswerRe: Why not to use NoSQL instead of RMDBS? (not Mongo) Pin
Mycroft Holmes14-Aug-21 13:36
professionalMycroft Holmes14-Aug-21 13:36 
AnswerRe: Why not to use NoSQL instead of RMDBS? (not Mongo) Pin
jschell5-Sep-21 10:07
jschell5-Sep-21 10:07 
QuestionSql query , comparing a table field to a list of values , condition (MS SQL) Pin
zira178929-Jul-21 16:32
zira178929-Jul-21 16:32 
AnswerRe: Sql query , comparing a table field to a list of values , condition (MS SQL) Pin
Richard MacCutchan29-Jul-21 22:15
mveRichard MacCutchan29-Jul-21 22:15 
AnswerRe: Sql query , comparing a table field to a list of values , condition (MS SQL) Pin
Anand RB 20218-Aug-21 19:16
Anand RB 20218-Aug-21 19: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
CHill6010-Aug-21 0:23
mveCHill6010-Aug-21 0:23 
AnswerRe: Sql query , comparing a table field to a list of values , condition (MS SQL) Pin
RedDk10-Aug-21 8:57
RedDk10-Aug-21 8:57 
QuestionLooking for advice on key/value storage options Pin
Chris Maunder16-Jul-21 7:21
cofounderChris Maunder16-Jul-21 7:21 
AnswerRe: Looking for advice on key/value storage options Pin
Mycroft Holmes16-Jul-21 13:23
professionalMycroft Holmes16-Jul-21 13:23 
GeneralRe: Looking for advice on key/value storage options Pin
Chris Maunder16-Jul-21 17:11
cofounderChris Maunder16-Jul-21 17:11 
AnswerRe: Looking for advice on key/value storage options Pin
k505416-Jul-21 15:21
mvek505416-Jul-21 15:21 
GeneralRe: Looking for advice on key/value storage options Pin
Chris Maunder16-Jul-21 17:19
cofounderChris Maunder16-Jul-21 17:19 
AnswerRe: Looking for advice on key/value storage options Pin
Gerry Schmitz9-Aug-21 7:04
mveGerry Schmitz9-Aug-21 7:04 
GeneralRe: Looking for advice on key/value storage options Pin
Chris Maunder9-Aug-21 7:22
cofounderChris Maunder9-Aug-21 7:22 
QuestionOpen Office Database Pin
Bram van Kampen1-Jul-21 15:26
Bram van Kampen1-Jul-21 15:26 
AnswerRe: Open Office Database Pin
Richard MacCutchan1-Jul-21 22:04
mveRichard MacCutchan1-Jul-21 22:04 
GeneralRe: Open Office Database Pin
Bram van Kampen2-Jul-21 15:54
Bram van Kampen2-Jul-21 15:54 
QuestionSelect with pivot Pin
Ismael Oliveira 202119-Jun-21 19:25
Ismael Oliveira 202119-Jun-21 19:25 
AnswerRe: Select with pivot Pin
CHill6023-Jun-21 5:50
mveCHill6023-Jun-21 5:50 
GeneralRe: Select with pivot !! Pin
User 1407655213-Jul-21 22:34
User 1407655213-Jul-21 22:34 
GeneralRe: Select with pivot !! Pin
CHill6014-Jul-21 4:50
mveCHill6014-Jul-21 4:50 
GeneralRe: Select with pivot !! Pin
User 1407655214-Jul-21 4:58
User 1407655214-Jul-21 4: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.