Friday, July 24, 2020

SQL Query to find all tables in a Database containing specified column name

Following query will help to find field name available in any of the table in a database.

SELECT * from INFORMATION_SCHEMA.COLUMNS 
where COLUMN_NAME like '%ColumnName%' 
order by TABLE_NAME



SQL Server:

SELECT Table_Name, Column_Name 
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_CATALOG = 'YOUR_DATABASE'
AND COLUMN_NAME LIKE '%YOUR_COLUMN%'


Oracle:

SELECT owner, table_name, column_name 
FROM all_tab_columns 
WHERE column_name LIKE '%YOUR_COLUMN_NAME%'

AND OWNER IN ('YOUR_SCHEMA_NAME');

Thursday, July 16, 2020

Sort JSON object Array

Sort JSON object Array



Friday, June 19, 2020

Convert Dropdown to Textbox with JQuery

Here is the simple way to convert dropdown to text.


Thursday, May 28, 2020

Extract only text content from HTML in Javascript

1. Create a temporary DOM element and retrieve the text


2. using jQuery

Friday, February 28, 2020

JQuery to create Download Link

Simple way to download file without navigating.

Monday, February 17, 2020

Convert CSV data to JSON

CSV Data


Output as JSON

JSON Group by count, output to key value pair json result

Following is the JSON and need to manipulate it in format to groupBy.