Archive

Posts Tagged ‘SQL Snippet’

I’m back… I think?

August 2, 2012 Leave a comment

Live and in print…

Sorry for the hiatus.  The regularly scheduled programming was interrupted by a job change, getting the feel of things and working out what to write about. 

2012-07-20 14.16.21

Now, this I don’t get.  A “Professional” toilet tissue dispenser.  Professional? Is the roll holder at home an amateur?  How does a toilet tissue dispenser make it to professional?  Is there a dispenser competition?  What would the events be?  The quick change?  The long pull?  Side tear? 

 

Sorry, got on a tangent there…

Teradata

Here’s a neat little snippet for checking if data coming into a table that is supposed to be numeric strips out the alpha in Teradata syntax:

index(upper(prop36),prop36(casespecific))=0

If the field coming in is not Case Specific then the following check will not catch the alpha characters even though logically it seems that it should:

upper(prop36)<>lower(prop36)

Using “CASESPECIFIC” is certainly a lot easier than messing around with collation options.

MS SQL

In looking around, I found this blog on the topic dealing with MS SQL:

Make SQL Queries Case Sensitive

Here’s some interesting information on SSIS from MS Connect:

SSIS – SQL Server 2008 – Add Case INsensitive search ability to lookup component

Collate is a popular solution:
SQL Server Journey with SQL Authority

 

A short snippet sure but it’s good to be back and writing away.

Categories: Teradata Tags: