Viewing 15 posts - 1 through 15 (of 46 total)
It is correct, if there is any open transaction while executing the Rollback transaction command.
Check if any transactions are open after commiting transaction by using this command
SELECT @@TRANCOUNT.
If you get...
June 28, 2012 at 5:43 am
Hi
You can use the following query:
DECLARE @CSV_String VARCHAR(2000)
SET @CSV_String = 'UNIPAR LLC , IAE Power Products , MID-AM Equipment Inc.
, Diesel Electrical Equipment, Inc. , K & L Electronics...
June 28, 2012 at 5:31 am
i think u can solve the problems using Synonyms
use master
go
alter procedure p1
@dbname varchar(100)
as
begin
--<<<< is there any way i can change the db context over here>>>
IF...
January 11, 2012 at 1:58 am
Here is the DDL Script in case if any body wants it.
declare @tab table(ClientID int, Act varchar(6), Deposit varchar(6), TransactionDate DateTime)
insert into @tab values (100, 'A-123',...
December 30, 2010 at 9:33 pm
Hi Gsquared
Thank you very much for the explanation.
December 30, 2010 at 9:32 pm
SELECT CONVERT(VARCHAR(12), GETDATE(), 107) AS [Mon DD, YYYY]
Check this link for further references
December 29, 2010 at 9:37 pm
Hi Gsquared
Thanks for correcting me
I was thinking the if @imported is null
so this 'DailysettlementYN = @imported' will fetch the rows containing only the rows having DailysettlementYN as NULL and...
December 29, 2010 at 9:35 pm
Add this code in ur proc
declare @crds_DueAmount_prev float
select top 1 @crds_DueAmount_prev = crds_DueAmount from ISV_CreditSettlement
WHERE crdp_CreditDepositID = @crds_CreditDepositID
order by crds_CreditSettlementID desc
...
December 29, 2010 at 5:50 am
GSquared (12/27/2010)
DECLARE @imported BIT;
SELECT @imported = null;
SELECT *
FROM #M_Vendor
WHERE DailysettlementYN = @imported
OR @imported IS NULL;
Change the value of the variable, as if...
December 29, 2010 at 5:30 am
There is also an 'as' between there
'tipo_mon, 'as' descr_mon '
this might also be the cause of ur problem
December 29, 2010 at 5:17 am
It seems like you have 2 different columns EditingDt and testDate.
So case in one column has nothing to do with cast in another column.
What is the datatype of t.STRT_DTM, t.END_DTM...
December 28, 2010 at 10:10 pm
Hi New Commer
I agree with kingston for not using varchar for date.
And try to minimize datatype conversion
If ur date columns are same as the dafault format of sql server then...
December 28, 2010 at 4:28 am
Sorry New Commer for the previous code
Please use the following code
It will give u the desired result.
DECLARE @CYBeginDate smalldatetime, @CYEndDate smalldatetime,
@LYBeginDate smalldatetime, @LYEndDate smalldatetime
Declare @para datetime
set @para =...
December 28, 2010 at 4:22 am
Kingston u r right
this code will not work if the date fall in first 3 months of the year
Thanks for pointing it out
I will put an updated code
December 28, 2010 at 4:16 am
Viewing 15 posts - 1 through 15 (of 46 total)