Viewing 15 posts - 1 through 15 (of 24 total)
This is nearly identical to the example provided by Microsoft.
I question testing the transaction state in the catch block. If there is an error thrown, regardless of the state...
April 28, 2022 at 3:22 am
Since a MERGE is basically an INSERT/UPDATE, and you have 3 possible caes, you might want to just skip the MERGE and use separate INSERT/UPDATE statements.
IF (TestInvalid) BEGIN INSERT...
December 17, 2021 at 5:26 am
So ORDER BY CONVERT(datetime, last_activity_date, 3) desc
Now shows error
Invalid column name 'last_activity_date'.
August 14, 2021 at 8:21 am
Let the presentation layer handle the formatting, that should only really ever be done in T-SQL as an absolute last resort.
The problem is that I am using this result...
August 13, 2021 at 12:24 pm
and please please replace all those selects from tblIssuedTrack onto a outer apply and do the aggregations within it so you only access the table once
Sir, could you please...
August 13, 2021 at 12:20 pm
Hi Gaurav
You are converting date into Varchar hence it is ordering how it will order a string. If you want order as date may be do not convert it...
August 13, 2021 at 9:08 am
This was removed by the editor as SPAM
August 13, 2021 at 9:08 am
Thank You Mr. Brian for your reply on my post.
Yes, it shows the correct data. Now I can update it.
Just one confusion, in update there is no WHERE clause, because...
August 13, 2021 at 3:56 am
FROM tblRecievedQuantity TRQLEFT JOIN tblOrderQuantity AS TOQ ON TOQ.order_id = TRQ.order_idLEFT JOIN tblIssuedQuantity AS TIQ ON TOQ.order_id = TIQ.order_idLEFT JOIN tblReceivedTrack AS TRT ON TOQ.order_id =...
July 15, 2021 at 3:09 pm
Now I have modified the query as suggested by you.
Declare @diesel_expenditure INT;
SET @diesel_imprest = dbo.Total_Diesel_Imprest(11, 04, 2021);
SET @diesel_expenditure = dbo.Total_Diesel_Amount(11, 04, 2021)
SELECT TEI.imp_id, TE.Name
AS Name,
...
May 5, 2021 at 6:13 pm
Makes it impossible to determine what table has a column named expenditure_submit.
expenditure_submit belongs to tbl_emp_imprest
Could avoid calling that function for each row by setting the result to a...
May 5, 2021 at 4:30 am
Thank you Mr. Gale for your reply on this.
I will go with winmerge.
March 18, 2021 at 3:59 am
Thank you @steve-2 Collins
February 15, 2021 at 4:13 am
Thank you Steve Collins for replying
it now shows error
Msg 207, Level 16, State 1, Line 21
Invalid column name 'dt'.
Msg 207, Level 16, State 1, Line 14
Invalid column name 'dt'.
Msg 207,...
February 12, 2021 at 11:55 am
shows error
Msg 102, Level 15, State 1, Line 17
Incorrect syntax near 'dfp'.
Msg 102, Level 15, State 1, Line 26
Incorrect syntax near 'dfp'.
what is dfp(start_dt) ?
February 12, 2021 at 10:18 am
Viewing 15 posts - 1 through 15 (of 24 total)