Hi,
I am doing a Left Join between two views wherein the column used in the ON condition has empty string rows in the first view. while running the query the application flashes, shows #ERROR value for some of the rows and hangs.
its a simple piece of code but its not working......
SELECT cstr([Updated Deals alive in a month].[Last Roll Date]), cstr([3m CDOR rates].Date) from [Updated Deals alive in a month]
Left outer join [3m CDOR rates]
on trim(cstr([Updated Deals alive in a month].[Last Roll Date])) = trim(cstr([3m CDOR rates].Date))
need help urgently...
Maria
16 2623 FishVal 2,653
Recognized Expert Specialist
Hello, Maria.
CStr() function couldn't get Null as argument.
At the same time Nz() could not be used because it will cause join on Null values.
I suppose you should first filter your tables to get records where join fields are not Null and then join resulting datasets.
BTW, why don't you want to join on the fields as they are without converting them to strings?
Regards,
Fish
Hi,
There are no null values in the column specified - they are empty strings. Also to mention that the first column in the ON condition is from a view and is of datatype string whereas the second 'Date' column is from a table and its datatype is 'Date/Time'. thats why I am converting them to strings.
How do I go about it?
Maria
FishVal 2,653
Recognized Expert Specialist
...
There are no null values in the column specified - they are empty strings....
How do you know this?
Even if I adda Where clause to check for the
[Updated Deals alive in a month].[Last Roll Date] <> ' ',
its not working :((((((
Maria
How do you know this?
I queried the table and view to check for ' ' and Is null values.
FishVal 2,653
Recognized Expert Specialist
Do the queries (each build on a single dataset) including join expression as calculated field run without error?
Do the queries (each build on a single dataset) including join expression as calculated field run without error?
No...
Inner join gives result but before that the application hangs for while
FishVal 2,653
Recognized Expert Specialist
No...
Inner join gives result but before that the application hangs for while
What does it mean? :)
I've mentioned to check whether db engine properly calculates join expressions for all records. Something like the following. -
SELECT cstr([Updated Deals alive in a month].[Last Roll Date]), trim(cstr([Updated Deals alive in a month].[Last Roll Date])) AS Expr1 from [Updated Deals alive in a month];
-
-
SELECT cstr([3m CDOR rates].Date), trim(cstr([3m CDOR rates].[Date])) AS Expr1 from [3m CDOR rates];
-
Additionally, reserved words like "Date" should be enclosed in square brackets.
No...
Inner join gives result but before that the application hangs for while
Do you say the same query with INNER JOIN instead of OUTER JOIN runs fine though in a noticeable period of time?
OUTER JOINs expected to consume more resources and perform more calculations. How many records do you have in the datasets? What is your computer configuration, Access/Windows version?
Additionally, what is behind the view you use in the query?
Regards,
Fish
What does it mean? :)
I've mentioned to check whether db engine properly calculates join expressions for all records. Something like the following. -
SELECT cstr([Updated Deals alive in a month].[Last Roll Date]), trim(cstr([Updated Deals alive in a month].[Last Roll Date])) AS Expr1 from [Updated Deals alive in a month];
-
-
SELECT cstr([3m CDOR rates].Date), trim(cstr([3m CDOR rates].[Date])) AS Expr1 from [3m CDOR rates];
-
Additionally, reserved words like "Date" should be enclosed in square brackets.
Do you say the same query with INNER JOIN instead of OUTER JOIN runs fine though in a noticeable period of time?
OUTER JOINs expected to consume more resources and perform more calculations. How many records do you have in the datasets? What is your computer configuration, Access/Windows version?
Additionally, what is behind the view you use in the query?
Regards,
Fish
Hi,
yes, the wo queries as mentioned works fine.
the view contains 232 record in all with 143 empty string records and 89 data records. The other table does not contain any empty string records. So, ideally I should get 232 records on doing the Left Join..but its not happening.
Also, I could notice from the intermediate results that its trying to retrieve the matching records in both the view and the table, but for an empty string record in the view it is showing "#Error" in the second column.
Moreover,I am working on MS Access 2003 on Windows XP ..
...
Maria
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Steve_CA |
last post by:
Hello all,
I've been recruited to assist in diagnosing and fixing a performance problem
on an application we have running on SQL Server 7.
The application itself is third party software, so we can't get at the
source code. It's a Client Management system, where consultants all over
the
country track their client meetings, results, action...
|
by: thilbert |
last post by:
All,
I have a perplexing problem that I hope someone can help me with.
I have the following table struct:
Permission
-----------------
PermissionId
Permission
|
by: Dam |
last post by:
Using SqlServer :
Query 1 :
SELECT def.lID as IdDefinition,
TDC_AUneValeur.VALEURDERETOUR as ValeurDeRetour
FROM serveur.Data_tblDEFINITIONTABLEDECODES def,
serveur.Data_tblTABLEDECODEAUNEVALEUR TDC_AUneValeur
where def.TYPEDETABLEDECODES = 4
|
by: Andrei Ivanov |
last post by:
Hello,
I have 2 tables:
CREATE TABLE products (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL
);
CREATE TABLE products_daily_compacted_views (
product INTEGER NOT NULL REFERENCES products,
|
by: Ian Boyd |
last post by:
i know nothing about DB2, but i'm sure this must be possible.
i'm trying to get a client to create a view (which it turns out is called a
"Logical" in DB2). The query needs a LEFT OUTER JOIN, but he doesn't know
how to do that, or even if he can, and i don't have to time to learn DB2
from scratch right now.
The following SQL Query is a...
| |
by: rjaw |
last post by:
Hi there,
we have a problem using the left outer join-operation on a db2
database, v7, running on z/os.
Defined are two tables, table1 and table2. Both tables have a primary
key of field1, field2 and field3. There two tables exist in two
different schemas. Also, there are two view, view1 and view2. View1
joins the table1 on both of the...
|
by: Rajat Tandon |
last post by:
Hello there,
I am relatively new to the newsgroups and C#. I have never been disappointed
with the groups and always got the prompt replies to my queries.This is yet
another strange issue, I am facing. Please please help me to solve this as
soon as possible.
So here we go ...
I am not able to take the screen shot of the windows form...
|
by: Jim Devenish |
last post by:
I have 3 views, two of which depend on the other:
CREATE VIEW dbo.CustomerListQueryAccounts
AS
SELECT dbo.CustomerListQuery.*
FROM dbo.CustomerListQuery
WHERE (isProspect = 0)
CREATE VIEW dbo.CustomerListQueryProspects
AS
|
by: RZ15 |
last post by:
Hi,
I have a query that is pulling info from 7 tables (all necessary). The only criteria I have specified is for the invoice date field which is as follows:
Field: INVCDAT
Table: dbo_INIH
Criteria: >=DateSerial(Year(Date()), 1, 1)
This works fine. When I run the query like this it takes less than 20 seconds. However, when I add criteria...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |