Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Saturday, 16 April 2016

MySQL queries

To select records containing a particular string chain:

SELECT * FROM tablename WHERE instr(fieldname, "find this string");

To update text strings in records:

update films set fieldname = replace(fieldname, 'find this string', 'replace found string with this string');

Tuesday, 1 January 2013

SQL Find and Replace part of text

Want to update (find and replace) part of a text using SQl? Check out this query: UPDATE TABLE my_table REPLACE(my_column,'string_toreplace','new_string');

Wednesday, 23 February 2011

SQL Update with two tables

SQL query to update fields matching a field from an other table:


UPDATE A
SET A.NAME = B.NAME
FROM TableNameA A, TableNameB B
WHERE A.ID = B.ID


or better

UPDATE A
SET A.NAME = B.NAME
FROM TableNameA A
INNER JOIN TableName B ON
A.ID = B.ID

Sunday, 29 March 2009

SQL Server Remote Connection

Free management tool: SQL Server Management Studio:

--> SQL Server Management Express

Or Toads:

--> Toad ™ for SQL Server Freeware

***


How do I configure MS SQL Express Server to allow remote connections?

--> Server Setup

***

If using a different TCP/IP port for your SQL Sever remote connection:

Sever name should use format: 192.168.1.1\SqlExpress,2301
Don't forget the comma!