Hello,
We are trying to quantile a large number of rows.
We have ran this code before and it ran fine.
The code is:
Select
Cust_ID
,quantile(100, Profit - ZeroIfNull(ABS(Acc_Amt))/12) as Perc
From
Customer_Table
We have tried removing the calculation, so we are quantiling a single value...
Hello,
I have a small SQL Server running that services some users.
I wish to set up an alert when an extarnal feed fails or a stored Procedure completes etc.
In order to inform me of when an extarnal feed fails, I need to put a value into a table.
When a value is placed in this table I want...
Hello,
I have got a DTS job that extracts from a table held in an Access databse held on the D:\ drive of my work terminal. This DTS Job is held on a separate SQL 2000 Server over a LAN.
When I execute this DTS Job manually, it is fine - it finds MY work station version of the Access Database...
Hello,
I know who to return an error code from within a stored procedure, using SQLCODE. Is there a way to get the full corresponding error message back too?
i.e. Table_1 does not exist
I have tried SQLERRM, but this is not recognised.
Do I have to write my own, or am I missing something...
dnoeth,
Good point about reading the manual...
Basically what I am trying to do is:
if you use query man and type
Select 1+1; you get 2
In a stored procedure, if i try to say
Select :MyVar1 into MyVar2 i get '1+1'
Is there a way to get the actual calculated answer as the variable with out...
DNoeth,
I am trying to compile a stored procedure.
e.g.
Replace My_Proc
( Out My_Var
)
Begin
DECLARE
CALL DBC.SYSEXECSQL ('Select Current_time;')
;
End;
I get the error message:
SPL1078:E(L227), User is not authorized to use the DDL/DCL/Dynamic SQL statement.
If I try to do a Show...
Hello,
I have a stored procedure and want to execute some derived SQL.
I have tried
CALL DBC.SYSEXECSQL ('Select ' || :Measure_Calc || ';');
But do not have access
I have also tried
EXEC SQL 'Select ' || :Measure_Calc || ';'
END EXEC;
The second one should work, according to the...
Hello,
I have a text field:
@(999104,1)
and I want to pick out
'999104' and then '1'
Easy!
But what heppens if:
@(999104,1) + @(999105,2)
and I want to obtain
'999104' & '1' and then '999105' '2'
I have a cursor that is set up to bring in the rows from a table, and will try to find a loop...
Hello,
I would like to take a text string, find a numeric, and substring it from the numerical value - 1
e.g.
'BS12 6QQ' I would like to turn into 'BS'
I also need to turn the above into
'BS12'
with the proviso you could potentially have BS1 6QQ, and I would want to return 'BS1'.
so far I...
Hello,
Is there a large benfit to be had collecting Stats on Group by columns.
If so, can I use a composed stats (Field_1, Field_2 etc)?
I don't want to create an INDEX unless necessary - I doubt this would even help?
I do this insert and group by 11 times due to spool issues, and our...
Hello,
Is there a way of getting the IP address of my conncetion, or of the system though the Teradata system tables?
They have given us a new system and it has knocked out my host file...
Thanks in advance,
Liam1.
Thanks for the reply,
I know why we do what we do and how it is used, I was just curious as to how it actually calculates these statistics.
It knows how many unque values are in a column, is it more complicated than that? What is the difference between an column and an index (in sats terms)...
Hello,
We are having a bit of a 'discussion' in our office...
Wht does COLLECT STATS actually do?
If I have a column (Col_1) on a table (Tab_1) - does the collect stats basically carry out:
Select
Count (*)
,Col_1
From
Tab_1
Group by 2;
Or does it do more complex things?
You can use...
Hello,
Basically if you are trying to "whatch" yourself on the box try
Select
Databasename
,vproc as Amp_No
,MaxSpool(dec(18,0)) as Max_Allowed_Spool
,CurrentSpool(dec(18,0)) as Current_Usage
,PeakSpool(Dec(18,0)) as Peak_So_Far...
Hello,
I have experienced similar problems, but I am trying to access a Teradata box via a laptop with a newotrk connection.
I get exactly the same error as above, but do actually have a
127.0.0.1 localhost
entry in the host file.
Do I need to edit any other host files?
I have copied the...
Hello,
For the past month I have been continuously been locked out of my machine.
I changed my password a month ago, and this is when the trouble started. All Task Manager applications have been switched off, and the NT Roaming Profile has been re-built twice.
Microsoft Office is installed...
Dieter,
Everything is now fine! :o)
It might be usefull for you to know that the file names you use can only be a finite length.
I was using a path to the files that was quite long (over 80 chars?) and this seemed to make Teradata ignore the logon part, Was it wrapping the text around the...
Dieter,
I am using the "bteq < Myscript" method described above.
I am running this through an Access created interface that used to work.
I have created a batch file that that uses an input file and creates an output file to view the errors. If i enter the password within the script...
Hello,
I have been using the script
.logon NameInHostFile/UserName,PWord
as in DOT Logon connection name in host file FORWARD SLASH username COMMA password
This seems to have stopped working over night.
"Error Invalid Logon!!" is generated.
I cannot put my password within the same...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.