Tags for #sql
Convert TSQL function to Teradata
Hi,   I have the following SQL function and want to recreate it Teradata. Is this possible? Any suggestions welcome. The function calcualtes the working days, excluding weekends and business holidays. Thanks in advance, Chris
#sql #function
Create list of dates
select calendar_date as DATEO from sys_calendar.CALENDAR where calendar_date between ?  and cast(? as date)+31 order by calendar_date
#sql CALDATES.cdate dates date format
Expression for the last day of the month based on Accounting Period
=Year(DateAdd("m", -5, DateValue(Parameters!PD2.Value & "/01/" & Parameters!FY.Value))) & "-" & iif(Month(DateAdd("m", -5, DateValue(Parameters!PD2.Value & "/01/" & Parameters!FY.Value)))>9,Month(DateAdd("m", -5, DateValue(Parameters!PD2.Value & "/01/" & Parameters!FY.Value))), "0" & Month(DateAdd("m", -5, DateValue(
#sql # teradata Expression
2616: Numeric overflow occurred during computation.
Hi, I wanted to know under what all circumstances/scenarious can we receive Error 2616. I am facing this issue while running a select query which is joining columns from multiple views. Thank you. Regards Abdulaziz Shaikh
#Error 2616 numeric overflow occurred during computation different datatypes #sql
when to implement these methods in SQL Server?
I am using SQL Server and for the security of my database i want to know when should i apply these methods on my database: Log Shipping Database Mirroring Transaction Replication point-in-time
#sql
Select Failed [2616] Numeric Overflow occurred during computation
I get the Error 2616 (Numeric overflow occurred duing computation) when I run the code below.  I developed 2 separate queries that each run.  When I put them in one query and use a UNION I get the error message.  1 side of the union returns 274 records and the other side returns 277 records.  I'm using Teradata SQL Assistant when I get this message.  We a
#Error 2616 #UNION #teradata #sql #SQLAssistant
RANK() Tiebreaker?
CREATE VOLATILE TABLE MYTBL   (   PERIOD_START DATE NOT NULL,   PERIOD_END DATE NOT NULL,   EMPID INT NOT NULL,   LOCID INT NOT NULL,   LOCNME VARCHAR(50) NOT NULL,   LOC_VST_DT DATE NOT NULL  ) ON COMMIT PRESERVE ROWS; INSERT INTO MYTBL VALUES ('2015-01-01', '2015-01-31', 12345, 98765, 'PLACE1', '2015-01-10');
#sql
How to find SQL Server Blocking?
Is there a way in SQL Server to find SPIDs and other informations that are causing blocking on SQL Server instance?
#sql
pagination over table
Hi, i am trying to query all the data from my table in batches, e.g i have 10000 rows that i want to collect by 10 callls to db, each one will bring 1000 rows. so i will end up with 10000 rows, without duplications and row missing. i dont have any uniqe index or column in this table. 
#teradata #sql #mysql #postgres #offset
Creating derived query from 2 different tables / 3707 Syntax error
I'm trying to add a field from a different table to a derived query.  This is the first time I have tried to do this.  The query below was working unitl I added the bolded information below.  The error message is as follows: SELECT Failed.  3707: Syntax error, expected something like ')' between 'soh' and '.'
#sql #derived table #syntax #Error 3707

Pages