Viewing 15 posts - 121 through 135 (of 541 total)
John Mitchell-245523 (8/12/2014)
Use ROW_NUMBER() over that first column, and just select the one where the row number is 1.John
Thanks John,
The problem is how do I differentiate between NATBX7686 and NATBX7686A...
August 12, 2014 at 9:22 am
Luis Cazares (8/12/2014)
SELECT column1,
column2,
column3,
...
August 12, 2014 at 9:15 am
pwalter83 (8/12/2014)
I have requirement to display only a single unique row out of the 2 rows. In the attached screenshot for example NATBX7686 and NATBX7686A shows twice but container number...
August 12, 2014 at 8:47 am
ChrisM@Work (8/7/2014)
I don't see any parameters in your code, Paul.
Any ideas, Chris ??
August 8, 2014 at 3:03 am
LutzM (8/7/2014)
Like I said before: Step 1 is to get the query you're looking for without the additional countries that aren't included in the result set.Please post that query.
Sorry Lutz,...
August 7, 2014 at 9:18 am
ChrisM@Work (8/7/2014)
I don't see any parameters in your code, Paul.
Sorry Chris, the code should be as attached. I am making blunders after blunders. This is what happens when you have...
August 7, 2014 at 9:08 am
ChrisM@Work (8/7/2014)
pwalter83 (8/7/2014)
ChrisM@Work (8/7/2014)
SELECT *
INTO #Offices
FROM (VALUES
('KBE ANR','BELGIUM'),('KBE ZEE','BELGIUM'),('KEU ANR','BELGIUM'),
('KDE VIE','AUSTRIA'),
('KDE BRE','GERMANY'),('KDE BRV','GERMANY'),('KDE DUS','GERMANY'),('KDE FRA','GERMANY'),('KDE HAM','GERMANY'),('KDE MUC','GERMANY'),('KDE STR','GERMANY'),
('KFR BOD','FRANCE'),('KFR DKK','FRANCE'),('KFR FOS','FRANCE'),('KFR...
August 7, 2014 at 8:50 am
ChrisM@Work (8/7/2014)
SELECT *
INTO #Offices
FROM (VALUES
('KBE ANR','BELGIUM'),('KBE ZEE','BELGIUM'),('KEU ANR','BELGIUM'),
('KDE VIE','AUSTRIA'),
('KDE BRE','GERMANY'),('KDE BRV','GERMANY'),('KDE DUS','GERMANY'),('KDE FRA','GERMANY'),('KDE HAM','GERMANY'),('KDE MUC','GERMANY'),('KDE STR','GERMANY'),
('KFR BOD','FRANCE'),('KFR DKK','FRANCE'),('KFR FOS','FRANCE'),('KFR LEH','FRANCE'),('KFR LIO','FRANCE'),('KFR...
August 7, 2014 at 8:02 am
LutzM (8/7/2014)
WITH cte_with_values AS
(
SELECT xxx
FROM abc INNER JOIN cde ON abc.col1=cde.col1
)
SELECT your_columns
FROM tbl_with_list_of_countries t
LEFT OUTER JOIN cte ON t.country=cte.country
The verbal description:
Within the cte calculate the...
August 7, 2014 at 7:52 am
ChrisM@Work (7/7/2014)
SELECT mc.COUNTRY_DSC, alias.POL_LOCATION_CD, alias.TEU, mcc.TYPE_CDFROM MG_COUNTRY mc
LEFT JOIN (VALUES
('Germany'),('Austria'),('Netherlands'),('Belgium'),('France'),
('Ireland'),('Sweden'),('Finland'),('Denmark'),('Norway')
) d (COUNTRY_DSC)
ON d.COUNTRY_DSC = mc.COUNTRY_DSC
LEFT JOIN MG_OFFICE mo
ON mo.COUNTRY_CD = mc.COUNTRY_CD
LEFT JOIN MG_BOOKING_DATASET mgd
on mgd.BOOKING_OFFICE_CD = mo.OFFICE_CD
AND alias.Booking_status_cd...
July 7, 2014 at 6:02 am
ChrisM@Work (7/7/2014)
SELECT d.COUNTRY_DSC, alias.POL_LOCATION_CD, alias.TEU, mcc.TYPE_CDFROM (VALUES
('Germany'),('Austria'),('Netherlands'),('Belgium'),('France'),
('Ireland'),('Sweden'),('Finland'),('Denmark'),('Norway')
) d (COUNTRY_DSC)
LEFT JOIN MG_COUNTRY mc
ON mc.COUNTRY_DSC = d.COUNTRY_DSC
LEFT JOIN MG_OFFICE mo
ON mo.COUNTRY_CD = mc.COUNTRY_CD
LEFT JOIN MG_BOOKING_DATASET mgd
on mgd.BOOKING_OFFICE_CD = mo.OFFICE_CD
AND alias.Booking_status_cd...
July 7, 2014 at 5:18 am
ChrisM@Work (7/7/2014)
SELECT alias.COUNTRY_DSC, alias.POL_LOCATION_CD, alias.TEU, mcc.TYPE_CDFROM MG_COUNTRY mc
LEFT join MG_OFFICE mo
ON mo.COUNTRY_CD = mc.COUNTRY_CD
LEFT JOIN MG_BOOKING_DATASET mgd
on mgd.BOOKING_OFFICE_CD = mo.OFFICE_CD
AND alias.Booking_status_cd in ('H','F','I','P')
LEFT join MG_BOOKING_EQUIPMENT_REQ ber
on mgd.BOOKING_ID = ber.BOOKING_ID
LEFT join...
July 7, 2014 at 4:52 am
Any help would be appreciated...
July 4, 2014 at 5:29 am
Hi,
I need a code for a split function that can also handle double quotes in values along with the usual commas. Could anyone please help in this regard ?
I need...
July 4, 2014 at 3:19 am
Jack Corbett (7/3/2014)
Have you verified that the split function is returning what you expect?
When you pass in a single...
July 3, 2014 at 9:38 am
Viewing 15 posts - 121 through 135 (of 541 total)