Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2016 : Technical Questions
Message Icon Topic: Teradata Producing Bad Query Error Post Reply Post New Topic
Author Message
BlakeJ
Newbie
Newbie
Avatar

Joined: 27 Aug 2007
Location: United States
Online Status: Offline
Posts: 11
Quote BlakeJ Replybullet Topic: Teradata Producing Bad Query Error
    Posted: 28 Oct 2012 at 8:22am
I posted this in the wrong forum earlier.
 
I'm getting an error in a sub-report that uses custom SQL in a command using a union query.  This query works fine when I run it in Teradata SQL Assistant but when I run it from Crystal Reports on my desktop I get this error:
"HY000:[NCR][ODBC Teradata Driver][Teradata Database] TDWM Filter Violation for Query Result: For Rule Name ‘LimitEndUserBadQuery3’[Database Vendor Code: -3149]"

The report uses one parameter for loan number.  I haven't been able to find reference to this error anywhere else on the Internet.  Has anyone seen this error before or know anything about it?



Edited by BlakeJ - 28 Oct 2012 at 8:23am
Blake
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3668
Quote hilfy Replybullet Posted: 29 Oct 2012 at 6:17am

This is a Terradata error, not a Crystal Error.  I just did a quick Google search on:

 
Terradata error 3149
 
which came up with over 34K results.
 
-Dell
IP IP Logged
BlakeJ
Newbie
Newbie
Avatar

Joined: 27 Aug 2007
Location: United States
Online Status: Offline
Posts: 11
Quote BlakeJ Replybullet Posted: 29 Oct 2012 at 9:29am
Finally figured it out.  It seems to be both Teradata and Crystal and how they're communicating.
 
The report ran fine for 2 years, and then after a Teradata driver update, began producing the error.
 
After much research and testing, finally figured out that Crystal was sending a loan number parameter as numeric now when it used to send it as a string (should be a string since it as leading zeros).  I solved the issue by putting single quotes around the parameter object in the SQL command.
 
Curiously, all other sub-reports in this report also use the loan number parameter, and it is sent correctly as a string in all of those.  It's only in the custom SQL where it suddenly started sending it as numeric.
Blake
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.