Skip first letters of all values ​​returned from sql server database

as stated in this section, I don’t want to return the first two letters of the returned values ​​just an example: select the company name from the companies returns companyX

Is it possible to write a query that returns panyX instead?

Thanks in advance

+4
source share
6 answers

select right(companyname, len(companyname)-3) as companyname will do this (this should work on microsoft T-SQ, see more string functions here )

+4
source

Since you are not saying which RDBMS you are using, here is the ANSI answer:

 SELECT SUBSTRING(mycolumn,3,CHARACTER_LENGTH(mycolumn)) 
+1
source

SELECT SUBSTRING (company name, 3, len (company name) - 2) FROM companies

0
source

Here is a bunch of sql row processing tools

Tutorial 4: SQL Functions

0
source

SELECT SUBSTR (COMPANY, 3) FROM COMPANIES;

0
source

u can solve the problem using the following queries,

  --> select substring([image],4,len([image]))from dbo.emp --> select replace([image],'ima','') from dbo.emp 

thanks

Venkat

0
source

Source: https://habr.com/ru/post/1312403/


All Articles