Tags » SQL

How to clean text based on ASCII range

Ok, how can I clean my text with simple English symbols, let’s say from CHAR(10) to CHAR(125). In other words, if I have text “‘1,2,3…,4,5,•,6,ÿ,7′”, how can I get “1,2,3,4,5,,6,,7” ? 189 more words

SQL

How to add in programming languages

This is a tongue-in-cheek attempt to expose programming language expressiveness.

1. Scheme

(+ 1 2)          
(+ 1 2 3 4)  
Miscellaneous

SQL SERVER - Search Records with Single Quotes

Every day when I woke up there are hundreds of emails with various questions related to SQL. I spend my first hour of the day answer each of them. 62 more words

SQL Authority

Module: biz.dfch.PS.System.Data

This module provides Cmdlets that let you work with Microsoft SQL Server database (regular and LocalDB) by utilising System.Data.SqlClient (instead of relying on the buggy ‘SqlServerCmdletSnapin100′ snapin and its ‘Invoke-Sqlcmd’ implementation. 166 more words

PowerShell

Outer join Filter Push Down (FPD)

Version is 12.1.0.2. Given the below tables:

drop table t1 purge;
drop table t2 purge;

create table t1 (id1 number, id2 number, x varchar2(100));
create table t2 (id1 number, id2 number, x varchar2(100));

insert into t1 select rownum, rownum, lpad('X', 100) from dual connect by level <= 1e5; 
insert into t2 select rownum, NULL, lpad('X', 100) from dual connect by level <= 1e5;  

commit; 

create index t1_id1 on t1(id1); 
create index t1_id2 on t1(id2); 
create index t2_id1 on t2(id1); 
create index t2_id2 on t2(id2); 

exec dbms_stats.gather_table_stats(user, 'T1', estimate_percent=> NULL, cascade=> true);
exec dbms_stats.gather_table_stats(user, 'T2', estimate_percent=> NULL, cascade=> true);
… 430 more words
Oracle

MYSQL - Create CSV File With Fieldnames For Headers

Recently, I went to dump a MYSQL table into a CSV file, with the fieldnames in the first line of the file.

This simple enough in Oracle’s SQLPLUS, so I did some internet searches to determine the syntax. 228 more words

Unix And Linux

SQL SERVER - Combined Multiple .SQL files into One Single File

Here is an interesting problem which I enjoyed solving yesterday.

There were multiple SQL Files in my one folder. When I had to send it to my friend I had to collect all the files into a folder and zip it to send it via email. 211 more words

SQL Authority