May 20, 2014 at 6:21 am
i have to qry any qry have one filed
qry1 qry2
name count
----- -------
a 20
b 10
c 15
haw to join or any try away display
qry3
Result
a | 20
b | 10
c | 15
May 20, 2014 at 7:03 am
Multple posts
refer to http://www.sqlservercentral.com/Forums/Topic1572540-3412-1.aspx
Far away is close at hand in the images of elsewhere.
Anon.
May 20, 2014 at 7:45 am
David Burrows (5/20/2014)
Multple postsrefer to http://www.sqlservercentral.com/Forums/Topic1572540-3412-1.aspx
no different question
May 20, 2014 at 7:54 am
Well they look the same to me
You will need to provide both queries and how they relate to each other (ie columns to match on)
Far away is close at hand in the images of elsewhere.
Anon.
May 21, 2014 at 7:29 am
Hello,
As per my understanding of your question, you are looking for joining given two tables.
You need to use join features of SQL Server for joining these tables
i.e. Inner Join, Left Outer Join, Right Outer Join, Full Outer Join, Cross Join.
Please refer below link for more details:
http://blog.sqlauthority.com/2009/04/13/sql-server-introduction-to-joins-basic-of-joins/
May 21, 2014 at 9:00 am
Maybe he means something like this?
Select name + ' | ' + CONVERT(varchar(3), [count]) As Result From some_table
Hard to tell. The question doesn't make any sense.
Maybe you need to learn the terms and what they refer to: table, query, column, join, etc...
May 22, 2014 at 3:35 am
this code
Select filmtype , zhmara FROM query2,query3;
Result
why repeat data
i cant Join, Left Outer Join, Right Outer Join because
my query dont have id or id_fkey
just have one file
query2 one fild name filmtype
query3 one fild name zhmara
May 22, 2014 at 4:25 am
bbf.kurd (5/22/2014)
this codeSelect filmtype , zhmara FROM query2,query3;
Result
why repeat data
i cant Join, Left Outer Join, Right Outer Join because
my query dont have id or id_fkey
just have one file
query2 one fild name filmtype
query3 one fild name zhmara
You'll get it as it behaves as CROSS JOIN
--rhythmk
------------------------------------------------------------------
To post your question use below link
https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help
🙂
May 22, 2014 at 7:28 am
The real issue here is that we can't see your screen and we have no idea what your tables are like. This is most certainly a really simple thing to do but without these details we are guessing.
In order to help we will need a few things:
1. Sample DDL in the form of CREATE TABLE statements
2. Sample data in the form of INSERT INTO statements
3. Expected results based on the sample data
Please take a few minutes and read the first article in my signature for best practices when posting questions.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply