I am saving this string into my sql db: This displays fine in a table: But when I display it in a textarea it shows up like this: How can I get the textarea to keep the formatting but not show the <br> tags. Answer You would want to strip out the <br> tags and the extra space. Here’s a
Tag: sql
Change Dateformat in a Column from dd.mm.yyyy to yyyy-mm-dd in SQL
I have a column with Dates like ‘12.05.2021’ and I want to transform the Dates to following format: 2021-05-12. But I dont know how to do it. Answer i assume it’s in string ,so :
Foreign key constraint : alternative for one to one relation with split tables
For tables like this: Book AudioBook PaperBook Is there other way to ensure that PaperBook and AudioBook will not have same book_id without type column on them (remove FK constraint book_id + type references Book and type on childs? Example without fk constraint where AudioBook and PaperBook can have book_id=…
remove extra “WWW_” using sql SUBSTRING [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 11 months ago. Improve this question In the Name_code column, we have these types of I want O/P the value like this SUBSTR(Name…
LIKE group_concat with where clause
i am using Like in group concat & i want to get all modules attached to client even if it does not match to LIKE, i know that that i can do that with HAVING but i don’t want to use HAVING, any solution with WHERE or in join condition ? Any suggestions on how to get my expected result??
Find top parent of child, multiple levels
I make copies of the entries in some cases and they are conneted by parent ID. Each entry can have one copy: Sometimes I need to take a copy and query for it’s top level parent. I need to find the top parent entries for all the entries I search for. For example, if I query for the parents of
Get best hit first
I have a table department with a columns SearchKeysName and BOLD_ID. Bold_ID is just a number for identification of row. It contains data like this: To search data I have SQL like this: In this case I searched for 32-1 so it will pick the rows above. What I want is to make sure the exact hit is placed on
SQL Statement to Return Records with More than Two Instances and Omit the Last Instance
I am looking to write a SQL statement that will pull EventIDs with two or more instances, but will omit the last instance of these records. This seems crazy, but the purpose of this is to look at events that have multiple updates (the updates are related to the TIME_OF_EVENT column, each time a crew/person up…
Summarize unique column in row
I’m new to Firebird and need your help. I have a stored procedure with following reduced output: Player Team Number Reus Ahlen 18 Lewandowski Posen 19 Reus MG 11 Reus BVB 11 Lewandowski BVB 9 Haaland BVB 9 I want to summarize the Players and transform Team&Number to a new column. The output should b…
Generate all combinations of values with set list of values for each character in SQL
I have a dataset that looks like this Position Value 1 1 1 2 1 3 2 8 3 5 3 6 And I’d like to generate all combinations of strings with the value at each position. For this example, the output would look like Output 185 285 385 186 286 386 The order doesn’t particularly matter. Note: There can