The destination table is empty and I copy using DTS the corresponding table from an other dB. (Both databases looks the same . One is a test dB the...
I finally got help from a collegue The solution select TIM.TIM_id , CUR.CUR_id , isnull((select CUH_averageHisto from CUH_CH CUH where...
More Info CREATE TABLE CUR_C ( CUR_id INT NOT NULL, CUR_average decimal(18,10), ) INSERT INTO CUR_C (CUR_id,CUR_average) Values(2,0.11) INSERT INTO...
Hi FrankKalis! No his solution does only include rows that exists in CUH_CH. CUR.CUR_id, TIM.TIM_id, Value 2 470 .1200000000 2 471 .1200000000 2...
Hi raoshan03! Your query only return rows from CUH_CH and does not include all the remaining TIM_ids with the latest currency from CUR_C table Here...
select CUR.CUR_id,TIM.TIM_id, CASE WHEN CUH_averageHisto IS NULL THEN CUR.CUR_average ELSE CUH_averageHisto END from TIM_TP TIM left join CUH_CH...
These are the rows I would like to be returned 345 NOK 195 530 12.5150738809 30452 911 DKK 195 530 32.1182352919 26492 962 EUR 195 530 1.5285702000...
SELECT KRR.KRR_COM_id AS CompanyId, CUR_code AS CurrencyCode, AKA.AKA_MED_id AS MetadataId, AKA.AKA_TIM_id AS TimeId, AKA.AKA_keyValueY AS TimeYear...
I want to only select one row for each CONSENSUS_RECOMMENDATIONS.ORIGDATE. So if the column CONSENSUS_RECOMMENDATIONS.ORIGDATE consists of several...
Thanks FrankKalis! Your link helped me out Great help on this forum Have a nice day wherever you are, By the way Berlin is my favourit city in...
Hi ranjitjain! No that does not solve my problem, because I have values in my CPV_CompanyPriceValues from 1980 and then I receive values from the...
Well I nned to first select certain rows from the table and THEN take the last row after the selection. Not NrROWS=1. The rows position is variable...
I'm using SQL2000 I would like to create a SP that take a variable @NrRows so I need to use ROWCOUNT instead of TOP, but I want to only return the...
Ok thanks thats good to know adriaan
OK I think I solved it CASE WHEN [IS_Adjust] IS NULL THEN [IS_NetIncome]- (CASE WHEN [IS_WritedownGW])IS NULL THEN 0 ELSE [IS_WritedownGW]) END)...
Ok Adrian I need to separate the Null vales and only add upp values thar are NOT NULL. But to test all the combinations I get lost in the CASE WHEN...
I want to transform the whole Excel formula to a SQL formula, but it's a bit to complex to solve for me. All values needs to be checked for IS NULL...
I have the following IF clause How can I trasform it easily into SQL with CASE WHEN IS NULL? The combinations are quite a few (24)? and I cannot...
An example of the result Headers: CompanyId,MetadataId,Mnemonic,Short,format,MetaData,Type,lngValue,charValue...
I'm not really getting your answer, but i appreciate it, hence. My order table, the table that distinguise which mnemonics should be included is,...
Separate names with a comma.