Teradata Database - WHERE Clause In EXCEL

Jul 29, 2013

Still having a problem with my SQL WHERE clause…

I have three variables on an Excel form that connects to a Teradata database. The first variable is a date format (DateworkedF and DateworkedT) the other two are text fields. (StatusX and ErrorTypeX)

I want to be able to search on any or all of these fields. (If the field is blank return all values)

Query = "SEL SRN_ACCT_NUM, QUEUE_NAME, ERROR_TYPE, SUB_ERROR_TYPE, DATE_WORKED, MONTH_WORKED, DATE_APPLICATION_RECEIVED, ASSOC_WORKED, ACCT_ID, STATUS, COMMENTS, REVIEWED_IND, REVIEWED_AGENT, LOAD_DT " & _
"FROM UD402.JD_MCP_MASTER WHERE " & _
"(DATE_WORKED >= #" & DateworkedF & "# Or #" & DateworkedF & "# IS NULL)" & _
"AND (DATE_WORKED <= #" & DateworkedT & "# Or #" & DateworkedT & "# IS NULL)" & _
"AND (STATUS = '" & StatusX & "' OR '" & StatusX & "' IS NULL)" & _
"AND (ERROR_TYPE = '" & ErrorTypeX & "' or '" & ErrorTypeX & "' IS NULL);"

View 5 Replies


ADVERTISEMENT

DTS Excel Import, Transform - How Do I Use OR Clause In SQL Query

Jul 20, 2005

Howdy. I'm trying to build a query that will take an Excel file andpull a few rows of data from a particular sheet. I'm having a problemwith my WHERE clause - I can can tell it to import WHERE a fieldmatches a value, or WHERE the field matches another value, but notboth.I've tried bunches of different variations, but can't get it to work.Is there any way to do this?Works:select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12from `RAF082604$`where ((F1 = 'Body'))Works:select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12from `RAF082604$`where F1 = 'Cash'Doesn't:select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12from `RAF082604$`where F1 = 'Body' OR F1 = 'Cash'Doesn't:select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12from `RAF082604$`where (F1 = 'Body' OR F1 = 'Cash')Doesn't:select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12from `RAF082604$`where ((F1 = 'Body') OR (F1 = 'Cash'))

View 1 Replies View Related

OLE DB Provider For Teradata

Jun 19, 2008

Hi,

I am trying to query Teradata tables from SQL Server 2005 using SSIS that will populate a table in SS 2005. I have been able to test the connection successfully. I choose the Query option b.c the tables in Teradata are over 100 million records and I don't want to copy those tables locally.

I am able to enter my query and parse it. I can even preview the query and see the results. A very simple query:

select distinct acc_yr
from d4574fdp.clm_dim

But when I try and execute the query, I get the following error message:

quote:
TITLE: SQL Server Import and Export Wizard
------------------------------

Could not connect source component.

Error 0xc0202009: Source - Query [1]: An OLE DB error has occurred. Error code: 0x80040E21.
An OLE DB record is available. Source: "OLE DB Provider for Teradata" Hresult: 0x80040E21 Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".


------------------------------
ADDITIONAL INFORMATION:

Exception from HRESULT: 0xC0202009 (Microsoft.SqlServer.DTSPipelineWrap)

------------------------------
BUTTONS:

OK
------------------------------


I have the latest OLE DB Provider for Teradata installed. Is there some security setting that needs to be set? Any help would be greatly appreciated.

Thank You.

View 2 Replies View Related

SSIS And Teradata

Nov 30, 2006

Does anyone know if/how SSIS works with Teradata?

View 1 Replies View Related

SSRS And Teradata

Oct 13, 2006

Is anyone out there using SSRS with a Teradata data source?

R

View 22 Replies View Related

Teradata Datapump Issue

Nov 8, 2007

Wether I'm trying to access a datapump task in an imported package in SSIS, or in 2000 enterprise manager

they crash once created. I can not alter or redo mappings or anything else.
After enterprise manager churns for 5-10 min it crashes.

SSIS partially crashes: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. After this I can no longer click on anything and have to end task on Visual studio.

I can do a disconnected edit on the package in enterprise manager and alter the statement, but as far as I know you can't really change much as far as mappings back in there.
This also means that my 2000 packages have been limited to 1 teradata pump per package.

This happened on my laptop, 2 coworker's desktops, and now that i've migrated to a new high end developer box it's happening on it also.

Any feedback/ideas?

View 1 Replies View Related

Teradata Data Source

Jan 14, 2008

I'm trying to convert old DTS packages over to SSIS and also create new SSIS packages that use teradata as a warehouse source for many different departments.

So far i've tried what I can find here on the forums:

using special syntax and wrapping the sql command in an alias/variable name

Methods i've tried:
using an ODBC connection string that works just fine in VB for pulling data. - test connection succeeds but when I select data reader source I get:

Error at Data Flow Task [DataReader Source[185]]: Cannot acquire a managed connection from the run-time connection manager

Using an OLE DB connection where I get the standard error many have gotten and I tried the listed use special syntax and wrapping the sql command in an alias/variable name from :
MSDN
Error at Data Flow Task [Source - Testing]: An OLE DB error has occurred. Error code: 0x80040E21. An OLE DB record is available. Source: "OLE DB Provider for Teradata" Hresult: 0x80040E21 Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".
Currently i'm testing/trying this on a very simple view that produces 2 columns and 173 rows of string data.
I have not tried the .net provider and am reluctant to accept that as the only solution if it works as it would involve permissions issues and red tape here at the bank and is a less user-friendly solution for my dev team.

Any ideas?

Driver version on my machine and likely the other 5 that would need this to work:
3.03.00.01 12/17/2003

View 1 Replies View Related

SSIS - Teradata Connectivity

Nov 21, 2006

Hi,

How do I connect from SSIS to TeraData database. Is there any OLEDB providers available for evaluation.

If any of the experiences can be shared on this, it would be greatly helpful.

Thanks,

S Suresh

View 1 Replies View Related

IA64 Teradata OLE-DB Or ODBC

Sep 5, 2006

I have a 32 bit development/playbox SQL 2005 SSIS that can see and run 32 bit OLE DB drivers from Teradata. Granted I have the same issues as others where a table or a view would work and not a query or a variable query. The alternative is to use Linked Server and OPENQUERY.

But our real development box is a 64 bit IA 64 using 64 bit SQL 2005. Non of the Teradata.com drivers would work/show up in the dropdown box of the Connection Manager since they are 32 bit. One option is to use the 64 bit Teradata ODBC drivers and then use the .Net ODBC connection instead. Linked server doesn't work either because the SQL 2005 is 64 bit and it is looking for 64 bit drivers.

Has anyone have any experience with 64 bit SQL 2005 and Teradata?

Looked at other 3rd party vendors such as ETI but their documentation excludes IA 64 (Itanium).

Planning to try again using the 64 bit ODBC and .Net Adapter but I'm interested to hear if someone (MSFT & NCR) would have a real solution for 64 bit.

Thanks

Anatole

View 4 Replies View Related

Passing Native SQL To Teradata

Aug 7, 2007

I want to add a step to an SSIS package to passthrough native Teradata sql statements so that they can be executed on Teradata. Does anyone know if I can use an "Execute SQL Task" to accomplish this? It should be very similar to passing native Oracle SQL to an Oracle server.

View 6 Replies View Related

Connectivity To Teradata Through Linked Server

Feb 22, 2005

I've been informed that our data feed systems are going to be shut down and that our data will be residing in Teradata V2R5 databases. I was wondering if anyone knows if you can get connectivity to a Teradata server via Linked Server in the Security folder of SQL Server Enterprise Manager? If no then; Is it possible through a DTS package? Thanks for the info...

View 2 Replies View Related

SQLServer To Teradata Data Load Via DTS

Feb 24, 2004

I am extracting data from an SQLServer database to load into Teradata using DTS. The performance is abysmal. The same data in a text file loads quickly via multiload. I can move the data to other DBMSs via DTS quickly as well. Is there some way for me to improve the elapsed time/performance while using DTS? If not, what is the best way to move data from SQLServer into Teradata?

View 1 Replies View Related

Linked Server 2005 SQL Sent To Teradata

Sep 17, 2007

I am trying to set up the Linked 2005 Server to Teradata v2r5, and have got most of the way there. My problem is that using both methods (OPENQUERY and SELECT with 4-part naming string) seems to submit only the SELECT * part to Teradata with the rest of the SQL waiting until the data is all pulled back to SQL Server. This is a problem when working with big tables! It puts a huge strain on the network, and also runs me out of temp space in Teradata. Is there a way to get ALL the SQL passed to Teradata? I am looking to create a Report Model for Report Builder or Pro-Clarity. I have a dummy SQL Server 2005 database set up with views of the Teradata tables through the Linked Server. Any help would be greatly appreciated!

View 1 Replies View Related

Teradata Data Extension Question

Jun 16, 2006

I recently installed the Teradata .NET data provider and I am trying to use named parameters and multi-value parameters in my SQL.  I am finding information on this topic hard to come by.
 
In order to get parameters to work do I need to write my own Teradata data extension from scratch, expand an existing data extension to work with Teradata, or can I simple edit my .config files to point to a generic extension wrapper already existing?
 
Thanks!

View 3 Replies View Related

Connection To Teradata Via SQL Server 2005 X64

Oct 24, 2006

Hi!

I'm using SQL Server 2005 Enterprise on a Win2003 x64. I want to connect to a Teradata 2.6, but there are no x64 ODBC- or OLE-DB-drivers for Teradata yet. So, only OLE-DB can't be used as the 32-Bit OLE-DB-driver for Teradata is not visible e.g. if you want to create a linked-server-connection. One workaround would be to use "OLE-DB for ODBC", but this OLE-DB is also not available on my system.

Does anybody know a way to connect SQL 2005 x64 to Teradata or to get "OLE-DB for ODBC" up and running???

There is an entry to a similar issue (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=699116&SiteID=1) where the workaround "use 64Bit-ODBC with .net ODBC" (?) puzzles me!

Thanks

B.G.

View 7 Replies View Related

Teradata Data Source And Parameters

Dec 27, 2006

Does anyone have any experience setting up paramters when using a Teradata data source? I am specifically looking for how to set up dates and multi-select drop down boxes as parameters. Using a fixed query against Teradata using SSRS is straight forward and is working well. Parameters, not so much.

R

View 1 Replies View Related

Redbrick And Teradata OLE DB Drivers For SQL 2005

Oct 10, 2007

Anyone know where I can find these drivers?

View 3 Replies View Related

Integration Services And Teradata As Source

Nov 17, 2006

Hi All,

Please let me know whether we can use Teradata as Source in SSIS (Target is SQL Server 2005). ie. Do we have oledb driver for NCR Teradata to connect to it. Our SSIS will be hosted in 64 bit SQL, but for development we use 32 bit.

Any inputs is really appreciated.

Regards, kart

View 7 Replies View Related

Can't Create Report Model For Teradata?

May 5, 2008

Hello!

I've created a data source that uses the OLE DB Provider for Teradata to connect to an existing Teradata database. Works fine.

I then use this data source within my project to create a Data Source View. Again, all works well.

However, the final step - creating a Report Model, bombs out in the wizard at the Completing the Wizard step with the following error: "[NCR][Teradata Database] Syntax error, expected something like a name between the 'SET' keyword and the 'TRANSACTION' keyword." (I elected for the wizard to only create entities for all tables, and create attributes).

If I try to create a Model manually, I get the following error when trying to build: "The Entity '<EntityName>' does not have any IdentifyingAttributes. Entity must have at least one IdentifyingAttribute."

Still fairly new to SSRS, so I'm hoping the issue is just a loose nut behind the keyboard Does anyone know what I'm doing wrong in trying to set this up?

Thanks in advance!

View 1 Replies View Related

SQL 2012 :: Data Import From Teradata To Server

Jun 9, 2015

I am fetching large amount of data from teradata to sql server using linked server. I am facing below query:

A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.)

View 0 Replies View Related

Connection Problem To Connect To TeraData From SSIS

Feb 10, 2008

Hi
I have a problem to connect to TeraData from SSIS.
I have the TeraData client (Query Man) that I connect to the TeraData using ODBC connection. When I connect with Query Man I can see the objects (views) of the correct scheme. However, when I try to connect with SSIS using the same ODBC connection €“ I don€™t see the objects of the specific scheme. The way that I connect to TeraData using SSIS is creating DS connection (with odbc) and then I create DSV €“ where this is the point that I can see lots of other schemes objects, but not the scheme€™s objects that I can see in the Query Man.
Can anyone assist?

Thanks,
Mario

View 5 Replies View Related

Teradata, SSIS OLE DB Source Error (0x80040E21)

Nov 21, 2005

I am trying to use SSIS to pull data from teradata to SQL2005.

View 19 Replies View Related

SQL Server 2012 :: Fetching Large Data From Teradata?

Jun 9, 2015

I am fetching large amount of data from teradata to sql server using linked server. I am facing below query:

A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.)

View 0 Replies View Related

Integration Services :: Teradata Connector Doesn't Run As A Scheduled Job

Jun 8, 2015

I have an SSIS package that successfully runs a Teradata connection query. However, when I schedule the job to run in the SQL Server Agent I get the following error:

Executed as user: SERVER_NAMEAdministrator. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 64-bit  Copyright (C) Microsoft Corporation.
All rights reserved.    Started:  7:53:26 AM  Error: 2015-06-08 07:53:26.78     Code: 0x00000216     Source: Package1 Connection manager "Teradata"

[Code] ....

Why would a connection work in SSIS but not in a scheduled SQL Server Agent job?

View 2 Replies View Related

Webinar On High-perf Extracts From Oracle, DB2, Teradata, Etc.

Jul 12, 2006

This webcast from our partner, ETI, may be of interest to readers on the forum - we see questions quite often about high-performance interaction with other databases.

Donald

View 4 Replies View Related

Reporting Services :: Report Server Intermittent Teradata Errors

Jan 24, 2011

I've build a few reports in visual studio, they work and they don't work, in a minute I can run them next minute I can't and I get this errors in event viewer every time they can't be run:

Report Server (MSSQLSERVER) cannot load the SQLPDW extension.

Report Server (MSSQLSERVER) cannot load the TERADATA extension.

View 11 Replies View Related

SQL Server 2005 X64 SP2 Conflict With Teradata Oledb? (class Not Registered)

Jul 23, 2007

SP2 for SQL Server 2005 x64 has been less than happy for me.

The initial problem, mentioned in another thread, concerned SSIS client which stopped liking Data Flow components. It was solved by a removal and reinstallation of the client tools.

However, there now seems to be a problem with making use of the Teradata oledb provider within SSIS. Prior to the installation of SP2 there was no problem.

I create a new SSIS package
Add a Data Flow component
Within the data flow add an oledb source
Create a new connection - using the Teradata oledb provider
Test the connection (it works!)
Use SQL something like "select * from some_teradata_table_on_the_TD_server"
Click on columns, wait a second, a list of columns is returned
Add a SQL Server destination (with a new SQL Server connection)
Connect the two components
Save the package

Click go
The TD oledb source component turns bright red and the error is "class not registered"

I have uninstalled the TD oledb provider (and underlying TD components) and re-installed (32-bit and 64-bit) - no change

Any ideas?

- KjM

View 7 Replies View Related

Integration Services :: Teradata Attunity Connector In SSIS For Unicode Characters

Nov 14, 2015

I'm new to SSIS, using Terdata Attunity connector for integrating data flow between Terdata (source) to SQL Server (Target).

SSIS package is getting failed because of length mismatch between source and Target for Unicode character datatype columns. Reason is Teradata TPT always occupies 3 times more length of actual defined in DB. 

Even I tried by increasing length of attribute in Source but it didn't work.

I know by converting datatype from unicode -> Latin would work, but i don't want to do conversion since loosing some characters.

##################################################
Error is 
[Teradata Source [263]] Error: TPT Export error encountered during Initiate phase. TPTAPI_INFRA: API306: Error: Conflicting data length for column(5) -  Source column's data length is (200) Target column's data length is (300).
##################################################

View 3 Replies View Related

Syntax For WHERE Clause For Access Database

Oct 17, 2006

I have used this query statement with a SQL Server 2005 database and need to use something similar with an Access database:

SELECT products.*, Category AS Expr1
FROM products
WHERE (Category = @Category)

When I test this in a table adapter there is no preview due to lack of parameter. I seem to recall that Access uses different syntax in the WHERE filter clause (i.e., not @). Can someone help me out with this?

View 3 Replies View Related

Alter Database With Remove File Clause

Apr 4, 2001

I'm attempting to alter a database by removing one of two log files. I have truncated both log files successfully and the database has no processes but I get an error stating file cannot be removed because it is not empty. Help

View 2 Replies View Related

Idea: New Database Object That Defines A FROM Clause

Jan 7, 2007

create from dbo.fromExampleasfrom dbo.Customers cjoin dbo.Invoices ion c.CustomerID = i.CustomerIDnow you can use it as follows:select c.CustomerID, i.InvoiceNofrom dbo.fromExampleI find I reuse FROM clauses alotand reusing a "base query" requires writing a very large and cumbersomeselect clause

View 6 Replies View Related

STOPAT Clause In Restore Database Command

Aug 30, 2007



Hi,

I have my backup scheduled as shown below

at 9.00am -- full backup
at 9.15am - Transaction log backup
at 9.30am - Transaction log backup

Suppose at 9.20am(say) the user deletes a table and i want to restore that particular table,i will use STOPAT clause when im restoring the transaction backup at 9.30am (WITH RECOVERY).But my doubt is how to find out the exact time the user has deleted the table.I have even checked the SQLServer Error log file but it doesnt give the exact date and time stamp of the deletion activity tht has taken place so that i can use that in STOPAT clause of RESTORE LOG command.

Please tell me where should i look for date and timestamp for all the Deletions/Updations done on a particular database.

Thanks in advance.

Regards
Arvind L


View 5 Replies View Related

Transact SQL :: How To Create UNION Clause With Two Queries That BOTH Have WHERE Clause

Nov 4, 2015

I have a quite big SQL query which would be nice to be used using UNION betweern two Select and Where clauses. I noticed that if both Select clauses have Where part between UNION other is ignored. How can I prevent this?

I found a article in StackOverflow saying that if UNION has e.g. two Selects with Where conditions other one will not work. [URL] ....

I have installed SQL Server 2014 and I tried to use tricks mentioned in StackOverflow's article but couldn't succeeded.

Any example how to write two Selects with own Where clauses and those Selects are joined with UNION?

View 13 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved