2328 | 10 Oct 2013 @ 11:18 PDT | Database | Reply | How to generate 32 characters unique number | Hi Sagar,
you need to write a UDF.
Probably the easiest way is to search for an open source C-implementation of a UUID version 4 and wrap this in a Teradata C-UDF.
Dieter
|
2327 | 09 Oct 2013 @ 12:54 PDT | Database | Reply | How to convert JAN 1, 2007 12:00:00 AM into timestamp format 'YYYY-MM-DDBHH:MI:SS' ??? | Hi Sayakm,
Teradata's FORMAT doesn't support single digit days, but you can use this:
CASE
WHEN ts LIKE '_____,%' THEN SUBSTRING(ts FROM 1 FOR 4) || '0' || SUBST... |
2326 | 09 Oct 2013 @ 08:27 PDT | Database | Reply | Teradata 14 and REGEXP_INSTR | Hi Piotr,
you can use only two or all six params.
Dieter
|
2325 | 08 Oct 2013 @ 11:32 PDT | Database | Reply | SELECT INTO SQL inside stored procedure | Hi David,
it's valid Teradata SQL :-)
This is based on some really old syntax (before Standard SQL), when you correctly start with the first keyword (SELECT/DELETE/etc.) you can write in non-... |
2324 | 08 Oct 2013 @ 11:28 PDT | Database | Reply | HOw do you ALTER table add partitions on a multilevel partitioned table? | If you want to add on the top level it's a simple ADD RANGE. if it's a sub-partition there's ADD RANGE#Lx.
Check the SQL DDL manual for details.
Dieter
|
2323 | 08 Oct 2013 @ 11:02 PDT | Database | Reply | Casting to An integer giving incorrect result. | Hi Rakesh,
works fine for me, i'ts probably a client problem.
Which client and which connection is used? ODBC?
Dieter
|
2322 | 07 Oct 2013 @ 01:52 PDT | Tools | Reply | Convert date format m/d/yyyy to mm/dd/yyyy in TPT | Check if your release of TPT supports VARDATE, defining your column as
col VARDATE(10) FORMATIN ('mm/dd/yyyy') FORMATOUT ('mm/dd/yyyy')
should allow single digit month/day.
&... |
2321 | 06 Oct 2013 @ 10:48 PDT | Database | Reply | Strong and Weak Join Matches | Try this:
SELECT a.*,
COALESCE(B1.Policy, B2.Policy, B3.Policy) AS Policy2,
COALESCE(B1.Claim, B2.Claim, B3.Claim) AS Claim2
FROM tableA AS A
LEFT JOIN tableB AS B1
ON A.Policy = B1... |
2320 | 06 Oct 2013 @ 07:01 PDT | Database | Reply | Primary index + Partition Key + single AMP operation | Hi Piotr,
no, no, no, no, don't do that!
The number of rows per PI-value should be as low as possible, as a rule of thumb they should fit on a datablock, i.e. up to a three or four digit numb... |
2319 | 06 Oct 2013 @ 04:27 PDT | Database | Reply | How to spell out numeric value in English words by select query. | When you go to my profile page you'll see my email.
Dieter
|
2318 | 05 Oct 2013 @ 04:35 PDT | Database | Reply | What are Resusage table logging rules | There's no view for it, you must use a command line utility, e.g.
xdbw -> get resource/logtable/sumlogtable
ctl -> screen rss
If you only want to know the collection/logging ra... |
2317 | 05 Oct 2013 @ 03:59 PDT | Database | Reply | Strong and Weak Join Matches | You have to be more precise on your rules.
Why is there only one row for policy 126?
I would assume two row because there are two rows for 126 in table B.
Why is 126 | null | 126 | ab... |
2316 | 03 Oct 2013 @ 01:19 PDT | Database | Reply | CASE statement in SQL | If two columns with different datatypes are compared there will be an automatic typecast to get comparable datatypes.
When a string and a numeric colum are compared the string will be converted to... |
2315 | 03 Oct 2013 @ 12:56 PDT | Tools | Reply | Converting Binary extracted file using TPT to ASCII? | TPT DataConnector 14.10 and 14.00.00.08 supports delimited output without casting all columns to Varchars.
This will not add much overhead on server side as the conversion in done on the client.
... |
2314 | 03 Oct 2013 @ 10:17 PDT | Database | Reply | Special Characters in Teradata | Hi Thomas,
your not using the built-in TD14 oTranslate function :-)
It must be a custom implementation which exactly mimics Oracle's empty Varchar equals NULL "feature".
The Oracle... |
2313 | 03 Oct 2013 @ 10:10 PDT | Tools | Reply | waht is Spoolmode option in TPT script? | Check the SPOOLMODE option in the FastExport manual.
In a nutshell: NOSPOOL will avoid creating a huge spool, but locks will be released later.
Dieter
|
2312 | 03 Oct 2013 @ 10:07 PDT | General | Reply | Oracle to Teradata SQL equivalents? | In Teradata you can re-use an alias instead of cut&paste to further simplify to
select CAST(error_date AS TIMESTAMP(0)) + (error_time - (TIME '00:00:00') HOUR TO SECOND) AS Err... |
2311 | 03 Oct 2013 @ 10:04 PDT | Database | Reply | 3556 : Database does not have a permanent journal | Hi Mahesh,
well, the reason is that jedi_cly_db does not have a permanent journal :-)
You must specify another database with an already existing PJ.
Or you add a PJ to jedi_... |
2310 | 02 Oct 2013 @ 03:50 PDT | Database | Reply | problem joining on imported unix column | If it exists in both tables following SQL should return exactly one row:
select * from
(select val from tablea where val= '207b90761400a5f144074567fbac3b07') as a
full join
... |
2309 | 02 Oct 2013 @ 03:35 PDT | Database | Reply | problem joining on imported unix column | Hi Derek,
so you're searching for '207b90761400a5f144074567fbac3b07'?
And this exists in both tables? For 100% shure?
In the beginning i thought there might have been '20'xb ... |
2308 | 02 Oct 2013 @ 02:57 PDT | Database | Reply | problem joining on imported unix column | "does work" is almost as good as "doesn't work" :-)
What is returned by that query? One row or two rows? And for UNION ALL?
Can you show the actual output?
Btw, you never... |
2307 | 02 Oct 2013 @ 12:01 PDT | Database | Reply | problem joining on imported unix column | Strange,
what is returned when you UNION both values?
SELECT value, char2hexint(value) FROM tableA a WHERE value='abc123'
UNION
SELECT value, char2hexint(value) FROM tableB b WHERE va... |
2306 | 02 Oct 2013 @ 09:23 PDT | Database | Reply | Special Characters in Teradata | oTRANSLATE is case sensitive, you need to either add chars 'A' to 'Z' or use
OTRANSLATE(UPPER(your_column), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','')
Dieter
|
2305 | 02 Oct 2013 @ 03:32 PDT | Database | Reply | ORPHAN ACCESS RIGHTS - HOW TO DELETE ? | Hi Pierre,
yes, that's the "official" query to delete orphan access rights.
--DELETE
SELECT count(*)
FROM DBC.AccessRights
WHERE TVMID <> ‘000001000000’... |
2304 | 02 Oct 2013 @ 01:06 PDT | General | Reply | Oracle to Teradata SQL equivalents? | It's just a minor mistake: Within the FORMAT you can't use ' ' for blanks you must use 'B' -> FORMAT 'YYYY-MM-DDbHH:MI:SS'
But if your error_time includes a time... |