I have two tables that I'm joining using left outer joins that have duplicate fields, but I only want to output these fields in one output field.
example;
select
c.field_name,
name_out =
case when a.name is not null then a.name
when b.name is not null then b.name
end
from
table_name...
OK thanks, also I'm having a mind cramp, if one of the tables on the right side that I'm joining has multiple rows per id and I just want to select one of them how can I do that?
I have a problem, I need to be able to pull fields from a table and can have 2 possible id's that can refer to the same id field in the table but come from 2 different tables.
I need to be able to do syntax like the following:
LEFT OUTER JOIN
chrisprd.TASSIGNMENT A
on...
I am importing a 13 field text file into SQL Server using DTS and the first column is a 9 digit text field and the last field is a 9 digit text field. The first field will always have data, but the last field can contain "null" values, but when I import the file, if the last field is...
I have a view that I am building that uses left outer joins to combine multiple views and tables. Up to a point of adding addition (needed) views and tables to this join it will execute in about 1:40 sec, and returns about 850 rows, but if I add just one more table/view then the execution time...
Does anyone know how to use just a select statement to
1. return the first 250,000 records from a table, then
2. return the next 250,000 records from a table.
on subsequent runs of the sql script?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.