All language subtitles for 6. SUBSTRING

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

0 Next is the substring function 1

Substring function is used to extract a substring of a string 2

So for example, if you have a long string and you want to take out a part of that string 3

That is where substring will help you 4

The syntax for substring is you write substring and within the parentheses 5

You write the string first 6

Then you mention 7

From the starting position so you will give the starting position after writing the keyword from 8

After that you can mention the length of characters 9

That you want after the starting position 10

So for this much length 11

Let us look at an example to understand the substring function 12

If you remember in the customer table customer id has two parts 13

The first part is the two characters these two characters are the first characters of the customers name first name 14

Last name 15

After those two characters that is a hyphen 16

And after that hyphen there are five numbers which may be randomly generated 17

If you want to 18

Segregate these two parts 19

So, if you want to get the initials of the customer 20

Separately into one column and if you want to get the unique identifying number 21

Into another column 22

You can do that using the substring 23

with the first select statement I am writing customer ID customer name 24

and I am getting the substring, the first two characters of the customer ID 25

You can see the syntax here substring 26

I will mention the column name 27

For 2 I have not mentioned from 28

Because 29

From 30

By default it will be the first character if I want to get it to some other position I have to mention the 31

From keyword 32

This column I have named as customer group 33

From customer table where substring 34

Customer ID for 2 is equal to AB so what this will give me is 35

Only those 36

Records with customer ID is starting with characters AB 37

The 2nd select statement 38

I am taking out the five randomly generated 39

Digits 40

To do that 41

I have to start from the 4th position 42

In the first two position is the these two characters 43

The third position is taken by 44

The hyphen 45

So the number starts from 4th position 46

and the number has 47

Length of 5 characters 48

So there are five different 49

Numbers 50

I'll take out this 51

5 52

Characters as a substring 53

Let us go and write these two queries to get the two 54

Parts of the customer ID 55

So select customer ID customer name 56

and Substring 57

Mention the string 58

Which will be the column name 59

For two characters 60

Name this column as customer group 61

This all is coming from table 62

Customer 63

Where 64

The first two characters 65

are AB. so I will copy this substring down and this should be same as AB 66

Let us select this query and run it 67

You can see I have only those 68

Customers where customer ID is starting with AB 69

and the customer group column has that 70

Substring 71

The first two characters of the customer ID 72

so it is AB for all these customers 73

Now let us take out the last 74

Five digits 75

These are the five digits of the customer ID 76

We want to take these out into a separate column. Let us go and write the query for that 77

Select 78

Customer ID customer name 79

and substring 80

Customer ID 81

From 4 82

it starts from the fourth character for 5 characters 83

as 84

Customer number 85

From customer table 86

Where substring 87

Customer ID for 2 is AB 88

So for this customer group only we find out the 89

Last five digits 90

So it should contain 10165 for the First row 91

Let's select and run this query 92

So can see 93

10165 is the value mentioned here 94

So this customer num column has the last five digits 95

of the customer ID 96

This is how we use substring to take out a 97

Second string 98

From a primary string

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.