I have two tables Table F and Table D. Table F gives details about Financial Transactions of an Account (Payment, Toll, Interest). Table D shows Delinquency Status (if user has not paid into account)…
Select everything except rows with maxvalue in certain column
I have a table with data and I’m trying to select some values with lower value than maximum. I am using IBExpert, I need to do this in SQL because I am working on a Firebird database. My table looks like this: What I want is to select only rows with GRUPA values lower than maximum, here max value is
Replacing multiple commas with single comma in MS SQL
How do I replace consecutive commas in a column with single comma in MS SQL? For example, I have data like a,,,,b,,,c,,,,,, d,e,,,f,,,,,,g,, I want this to be processed to following format: …
DATEADD in MariaDB
I’m using DATEADD statement in SQL Server and I need migration to MariaDB SUM ( CASE WHEN CONVERT(varchar, Production.MadeDate , 112) BETWEEN DATE_ADD(DAY, -2, ‘2018-06-05’) AND DATE_ADD(…
Excel VBA – Stored Procedure (SQL Server)
I have a slight issue retrieving multiple recordsets (with column names) and pasting the data into an Excel sheet, like the image below The VBA code that I have just retrieves the first recordset but …
JDE how to convert F983051.VRPODATA (long / blob) to a string (varchar2)?
JDE how to convert F983051.VRPODATA (long / blob) to a string (varchar2)? I’m not sure if I can do something like: Where FUNCTION is something that converts the BLOB file into a varchar2. P.d. I cannot use any kind of DDL. Please advise, Answer I actually found what I wanted: DBMS_LOB.SUBSTR({BLOB field…
How to join multiple WHERE clauses together in SqlKata?
I am using SqlKata to creating dynamic SQL queries. I have a list of conditions, stored in my database, which are generated according to my business rules. this is my code sample: var list = new List&…
Get unique values using STRING_AGG in SQL Server
The following query returns the results shown below: SELECT ProjectID, newID.value FROM [dbo].[Data] WITH(NOLOCK) CROSS APPLY STRING_SPLIT([bID],’;’) AS newID WHERE newID….
How to make all combinations with given words in SQL
I’ll make a search query that search on each individual word contains in my table using SQL Server. The query must work as following situation: The query must search in the colour, style, marerial and shape field like an or operator The query must search on each individual search word (like blue, red, m…
insert xml data to table stored procedure sql server
I have xml in following format I want to insert them in table so the table should have 4 records in the example. columns are name and alias. How can I achive this using cursor or something else? What i have tried. In cursor for entity i try insert alias value,but only first alias is taken. Answer