Skip to content

Instantly share code, notes, and snippets.

@yos-virtus
yos-virtus / update-sql-table-with-csv-file.sql
Last active April 23, 2017 05:28
Update SQL Server table with csv data/Обновление данных таблицы SQL Server с помощью csv
IF OBJECT_ID('TempDB.dbo.#tmp_table', 'U') IS NULL
BEGIN
-- Create temp table if not it does not exest already / Создаем временную таблицу если ее еще нет
CREATE TABLE #tmp_table
(
field1 integer,
field2 varchar(255),
field3 varchar(255)
)
END
@yos-virtus
yos-virtus / process_large_xml.php
Last active February 16, 2021 07:31
Read large xml files with php
<?php
// Assuming we have the following xml structure:
//<redords>
// <record>
// <field1>Lorem ipsum</field1>
// <field2>Doler</field2>
// <field3>Sit amet</field3>
// </record>
// ...