Hi!
i am facing a probleum while excuting the query having join operator
i am using sql server 6.0 and my query is
Select BABLU.COM_NAME,BABLU.INDNT,VEER.ADDRESS From BABLU Join VEER on BABLU.COM_NAME = VEER.COM_NAME
14 1402
What is the error u r getin ?
Hi
THIS IS THE ERROR " SYNTAX ERROR NEAR VEER"
What is the error u r getin ?
Try specifying if you want an INNER, LEFT or RIGHT join...
-- CK
HI!
NO ONE EXECUTED CORRECTLY, EVERY JOIN WHETHER IT IS INNER JOIN ,LEFT OR RIGHT JOIN
PLEASE PROVIDE SOME HELP
Try specifying if you want an INNER, LEFT or RIGHT join...
-- CK
Please provide more info.
Paste same sample rows (it does not have to be the actual data) here and the query what you have so far.
-- CK
Hi!
i have two tables customer and sales in both tables "cus_id " column name is common and i am using the query
SELECT CUSTOMER.FIRST_NAME,CUSTOMER.LAST_NAME,SALES.DATE FROM CUSTOMER LEFT OUTER JOIN SALES
ON CUSTOMER.CUS_ID = SALES.CUS_ID
i want to get all the rows from customer tables and some from sales which matched in both tables
with regareds
varinder
Please provide more info.
Paste same sample rows (it does not have to be the actual data) here and the query what you have so far.
-- CK
What error are you getting?
-- CK
SYNTAX ERROR NEAR JOIN
BUT I AM NOT GETTING WHAT IS WRONG IN MY CODE
What error are you getting?
-- CK
Have you tried using aliases?
SELECT C.FIRST_NAME,C.LAST_NAME,S.DATE FROM CUSTOMER C LEFT OUTER JOIN SALES S
ON C.CUS_ID = S.CUS_ID
And if you'd like to get only the rows that has the same CUS_ID from both tables then you might want to use INNER JOIN.
Hi
THIS QUERY IS ALSO SHOWING THE SAME ERROR
"INCORRECT SYNTAX NEAR LEFT"
Have you tried using aliases?
SELECT C.FIRST_NAME,C.LAST_NAME,S.DATE FROM CUSTOMER C LEFT OUTER JOIN SALES S
ON C.CUS_ID = S.CUS_ID
And if you'd like to get only the rows that has the same CUS_ID from both tables then you might want to use INNER JOIN.
Where are you running this?
-- CK
Hi!
I AM RUNNING THIS QUERY IN SQL SERVER 6.0 QUERY ANALYZER
Where are you running this?
-- CK
Hi!
I AM RUNNING THIS QUERY IN SQL SERVER 6.0 QUERY ANALYZER
The query seems to be correct... - SELECT C.FIRST_NAME,C.LAST_NAME,S.DATE
-
FROM CUSTOMER C
-
LEFT OUTER SALES S ON C.CUS_ID = S.CUS_ID
-- CK
I don't know if SQL Server 6.0 can support Join statements.. I don't have version 6.0 here.
You may code it differently, like:
SELECT CUSTOMER.FIRST_NAME, CUSTOMER.LAST_NAME, SALES.DATE
FROM CUSTOMER, SALES
WHERE CUSTOMER.CUS_ID = SALES.CUS_ID
The difference of that query from the query with Join statement is that Join statement could retrieve data faster.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Jonas Gorauskas |
last post by:
I am having this one problem on an app I am writing where it shows the
following error on some error trapping that I did:
Query failed:
Error Number: 1064
Description: You have an error in...
|
by: Matias Silva |
last post by:
Hi Everyone, I wrote a for loop to build several select
statements that are combined with a UNION. When I execute
one of the queries separately, it works, but when I execute
the query with a UNION...
|
by: frbn |
last post by:
hi all,
we currently experience an original problem
on a production server with a postgresql 7.1.3
( a bit old, I know :\ )
We just want to know if somebody experienced this problem:
the...
|
by: Gary |
last post by:
Hi,
I get this error " "
when my web page run,
what does it mean?
Hope someone can help!!!
Gary
|
by: Dax |
last post by:
Hi,
I have a problema of query in an asp page, if I run the query in sql
query analizer is time running it's about 3-4 seconds, if I made the
same query in an asp page it create the error of...
|
by: EJO |
last post by:
Thanks everyone!
My workgroup is in a mixed enviroment for using an Access 2k mde as the
front end of a sql server 2000 which is running on the same machine
that some of my users access using...
|
by: Omer |
last post by:
Hi,
I am using C# 2.0 along with MS Access database. All my queries are
working perfectly fine, but one inner join query is ocntinously
throwing. I ahve tried it both from code and running...
|
by: scorpion53061 |
last post by:
My Visual Studio 2005 Query Window reports the following error when
this query runs. Any idea what might be causing it? Thanks for any
help. I have tried subsitituing for the parameter a fixed...
|
by: Yesurbius |
last post by:
I am receiving the following error when attempting to run my query. In my mind - this error should not be happening - its a straight-forward query with a subquery. I am using Access 2003 with all...
|
by: tejasmore |
last post by:
Hi,
I am running a following query in DB2 and getting SQL0338n error.
This is primarily because, there are subqueries at few places (marked in bold)in the main query, after 'ON' clause.
Could...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
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...
|
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,...
|
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...
| |