SQL Server 2008 Replace substring [closed] - sql

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 8 years ago.
Improve this question
I have a Screen table which has name and display_name columns. I am trying to replace the word Lawfirm with Law Firm in name and display_name columns for all the records of Screen table.
My SQL experience is pretty premature, I am wondering is there a way to achieve this using a SQL script?

Yes, you can do this:
update screen
set display_name = replace(display_name, 'Lawfirm', 'Law Firm')
where display_name like '%Lawfirm%';

Related

How to compare data in SQL [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have an application which is taking data from questionnaires users are completing on a website and inputting this into a SQL Lite database.
I'm using Django and would like to display data of users who match closest by selecting similar answers.
How could this be done?
You can add multiple join conditions like this
SELECT *
FROM <table>
INNER JOIN <same table different name>
ON (condition1 OR condition2 OR condition3)

In Oracle SQL, how do I find where a column may be referenced using just queries? [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 7 years ago.
Improve this question
I have a specific column, called DELIVER_TO_LOCATION_ID , which is in a table called apps.po_requisition_lines_all
I need to dig into the database and derive the continent from the DELIVER_TO_LOCATION_ID ,
In SQL Developer I can't seem to find a way to do this .
any tips appreciated. thanks
You can use following command-
desc tableName
It'll give you description of table including every column in it having any constraints on it or not like primary key, reference key etc.

SQL code does not work [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 7 years ago.
Improve this question
How can i write a code that i want to choose name and adress of a customer which customer_id is bigger than him. Thank you very much.
select c.name,a.adress,a.postcode_id from customer c left join Adress a on c.customer_id=a.customer_id where c.customer_id>11
SELECT cs.name,ad.adress
FROM Customer cs, Adress ad
WHERE cs.customer_id=ad.customer_id
AND cs.customer_id>11;

How to code SQL statements from generated Crystal [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 8 years ago.
Improve this question
Here we have generated Crystal SQL and I need to make these same on AS/400 db2 for performance reasons. How do you code these in AS/400 SQL?
TodaysDate
like and
<>
select ...
from order_table
where order_date = current date and
status_code in ('E', '1', 'X') and
user = 'BLOGGS';
The DB2 for i Reference manual may be helpful.

Need to replace a part of a value in Sql Server 2005 [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 8 years ago.
Improve this question
My table name is SOFTSKILL. One of Columns is MakeID. The values in the column are,
000277755
000278143
000277738
000277051
i need to change 000 into 100, like
100277755
100278143
100277738
100277051
Anybody please help me how to do this..
UPDATE SOFTSKILL
SET MakeId = STUFF(MakeId,1,1,'1')
WHERE MakeId LIKE '000%'