Home
Useful MySQL Queries for a Linguist Data Manager
- Details
- Category: Generalia
Find fields/words with regex having one character in between, for example all words containing .aXe.
SELECT * FROM database.table where headword REGEXP '.*a.e.*'; and pron1 like '%end%' and charlen < 6;
Best method to backup and restore all DBs in MySQL. This ensures that the dbs are separate and does not have bulk issues.
Step 1. get a list of all the databases
Step 2: Create a batch file to dump all the DBs, one by one, using the following command:
mysqldump -u user -pPassword dbname > dbname.sql
Step 3: Create a batch file to restore all the DBs, one by one, using the following command:
mysql -u user -pPassword dbname < dbname.sql
Update a column with the character count of another column within the same table.
update dbName.tableName a set a.columnToUpdate=char_length(a.columnToCountCharacterOf) where a.columnToCountCharacterOf=a.columnToCountCharacterOf;
Load tab delimited data into a table:
Remove tabs from a given mysql field:
update dbName.TableName set ColumnName = replace(ColumnName,'\t','');
Enable Local Data load after logging into the MySQL prompt: SET GLOBAL local_infile=ON;
LOAD DATA LOCAL INFILE 'C:/director/importdata.txt' INTO TABLE dbName.tableName FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n';
select distinct(lang), (sum(textlength)) FROM dbName.tableName group by lang;
Count number of words in a field:
SELECT LENGTH(langtext) - LENGTH(REPLACE(langtext, ' ', ''))+1, id FROM dbName.tableName INTO OUTFILE "D:\\outdirector\\length.txt" limit 10;
अलग भईले झारखंड आब खईह शकरकंद
- Details
- Category: Music
मिसरी मलाई खईलू, मिसरी मलाई खईलू, कईलू तन बुलंद
अलग भईले झारखंड आब खईह शकरकंद
मीलि नाहि दफ़तर मे माहे-माह वेतनिया, करे नाहि पईबू मास-मछरी के सेवनिया
सारी नाहि पहिरे पईबू, सारी नाहि पहिरे पईबू, धनिया मन-पसंद आब खईह शकरकंद
सारी नाहि पेन्हे पईबू, सारी नाहि पेन्हे पईबू, धनिया मन-पसंद आब खईह शकरकंद
अलग भईले झारखंड, आब खईह शकरकंद
Excel Formulas
- Details
- Category: Generalia
- These are some of excel formulas I use often.
1. The following to to find the unique case sensitive entries in a column:
=REPT($A2,SUMPRODUCT(--EXACT($A2,$A$1:$A1))=0)
गोस्वामी तुलसीदास रचित श्री रुद्राष्टकम् - शिव वंदना
- Details
- Category: Generalia
गोस्वामी तुलसीदास रचित श्री रुद्राष्टकम् - शिव वंदना
नमामीशमीशान निर्वाणरूपं, विभुं व्यापकं ब्रह्मवेदस्वरूपम् ।
निजं निर्गुणं निर्विकल्पं निरीहं, चिदाकाशमाकाशवासं भजेऽहम् ॥ १॥
निराकारमोंकारमूलं तुरीयं, गिरा ज्ञान गोतीतमीशं गिरीशम् ।
करालं महाकाल कालं कृपालं, गुणागार संसारपारं नतोऽहम् ॥ २॥
Read more: गोस्वामी तुलसीदास रचित श्री रुद्राष्टकम् - शिव वंदना
Page 2 of 6