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...
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...
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...
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...
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...
I will try to explain my problem: In a table for companydata. Each company has several rows (lots of data for the same company). Each row has until...
Anyone who can give good advise in using XML in a SQL server 2000 dB. Microsoft is pumping out there mantra about XML. But is it at all so good to...
I have a 2 column tabel, with column name Person_id and Comp_id I would like to select the Person_id(s) that satisfy criterias like the following...
I want to use GetRows to fill an array from an ADO recordset Arr =RS.GetRows But I also would like to specify which Fileds from my recordset to...
I tried to use the following syntax RS.Field.Delete("Name of Field") and RS.Field.Delete 1 without success. Both give med following error in...
I have a problem when I want to extract all data from a tabel in my SQL 200 data base. Some columns allow up to 900 caracters. How should I be able...
select KRR_id,KRR_CurrencyId,KRR_publishedDate,CUR_changedDate, CUR_average,CUR_id,CUR_code,DateAdd(day,-1,CUR_ChangedDate) from KRR_keyratioReport...
Hi! My users would like to be able to choose if they want to save a full year like 2004 or 2004-02 or 2004-02-10. I was thinking of saving this in...
I use dynamic SQL in stored procedure to calculate values and update a table SET @SQLStatement = 'UPDATE CAV_CalcValues ' SET @SQLStatement =...
Separate names with a comma.