Viewing 15 posts - 1 through 15 (of 25 total)
Thanks for the reply, IF/ELSE is straight forward I know this.
But I want in a single select/Update statement.
July 23, 2013 at 5:15 am
Thanks for the reply..
I understood your point, If possible could you share logic using TVP .
Thanks. Sorry for keep on posting same query. But some how I have to fix...
July 10, 2013 at 7:32 am
Does there any possibility of fine tuning of my procedure to accommodate my requirement, I am stuck with the code.
Please help..
July 10, 2013 at 6:01 am
Thanks for the reply.
In UI I am binding data to a grid.. all the logic will be processed using stored proc and from back end.
In UI user will modify Displayorder...
July 10, 2013 at 4:30 am
Its a logic error..,sorry for the confusion..
My data in table is: A1 - 1, A2 - 2, A3 - 3, A4 - 4, A5- 5, A6- 6
1. User updates :...
July 10, 2013 at 3:13 am
I have below proc: for updating display order:
CREATE PROCEDURE proc_Disporder
@ID INT,
@OldDisplayOrder INT,
@NewDisplayOrder INT
AS
BEGIN
IF(@OldDisplayOrder >= @NewDisplayOrder) OR (@OldDisplayOrder = 0)
BEGIN
UPDATE miscitem
SET DisplayOrder = DisplayOrder + (CASE WHEN...
July 9, 2013 at 11:20 am
1) Say A1, A2, A3, A4, A5, A6 are given Order as 1,2,3,4,5,6
2) Now, Change the existing Order of A3-3, A4-4, A5-5, A6-6 to a New order A3-1, A4-2, A5-3,...
July 9, 2013 at 10:48 am
Try this:
In the Report maintain a new column with Id, like it is an serial number , You can do this Using ROW_NUMBER() OVER (Order BY column)
And in your...
March 29, 2013 at 6:13 am
Try this:
SELECT TOP 3 EMPID FROM EmpTable
UNION ALL
(
SELECT EMPID FROM EmpTable
EXCEPT
SELECT TOP 3 EMPID FROM EmpTable
)
March 29, 2013 at 5:20 am
Hi..
Link is not working:
http://www.simple-talk.com/RedGateBooks/GrantFritchey_SQLServerExecutionPlans_Code.zip
December 6, 2012 at 10:19 am
Hi,
As per my understanding any mail is queued and processed through msdb -System database.
You can clear the entries in the msdb, see below tables.
SELECT * FROM sysmail_mailitems
SELECT * FROM sysmail_log
And...
November 5, 2012 at 8:16 am
Try this, unpivot logic:
CREATE TABLE #Amt(Id INT, Monthly Float,Quaterly Float,HealfYearly Float,Yearly Float)
INSERT INTO #Amt (Id ,Monthly ,Quaterly ,HealfYearly ,Yearly )
VALUES (1,100,200,400,800),(2,200,400,600,900)
--SELECT * FROM #Amt
SELECT ID, PaymentTerm, Amount
FROM
(
SELECT Id ,Monthly ,Quaterly...
November 5, 2012 at 7:05 am
Try this,
CREATE TABLE Img(Id INT, Obj VARBINARY(MAX))
INSERT INTO Img (Id ,Obj)
VALUES (1,(SELECT * FROM OPENROWSET(BULK 'c:\windows\Blue Lace 16.bmp', SINGLE_BLOB) Obj))
DROP TABLE Img
November 5, 2012 at 6:46 am
Hi ,
You can also use below queries :
SELECT DISTINCT OBJECT_NAME(id) FROM SYSCOMMENTS WHERE text like '%search key%'
SELECT ROUTINE_NAME, ROUTINE_TYPE FROM INFORMATION_SCHEMA.ROUTINES where ROUTINE_DEFINITION like'%search key%'
October 11, 2012 at 7:25 am
Viewing 15 posts - 1 through 15 (of 25 total)