Viewing 15 posts - 466 through 480 (of 1,923 total)
Do you want to delete or insert or both?
You can tweak ur merge to perform all 3 operations in one statement. Please throw some more light on your requirement
March 1, 2012 at 7:43 pm
Try this:
Create procedure Get_Dept_Details
(
@pCode nvarchar(10),
@pDesc nvarchar(50) output,
@pRemarks nvarchar(50) output
)
as
select @pDesc = description,@pRemarks = Remarks from dept where code = @pCode;
I just moved the columns to get assigned to the...
March 1, 2012 at 7:39 pm
Isnt it straight forward UPDATE?
Update t1
set finalprice = price * 100
March 1, 2012 at 7:35 pm
If u r using SQL 2008, use this:
SELECT * FROM #Destination;
BEGIN TRAN ;
MERGE #Destination TGT
USING #Staging SRC
ON TGT.Account = SRC.Account...
March 1, 2012 at 7:19 pm
Desired result is same as the Destination table! :pinch:
Question is a paradox 😀
March 1, 2012 at 7:14 pm
How about multiple REPLACEs?
select replace( replace( replace( replace( replace( replace (Numb, '.','') , '-','' ) , '/','') , ' ','') , ')','') , '(','')
from
(
...
March 1, 2012 at 7:01 pm
You very well can, as long as the statement you are using after the THEN clause does not return more than 1 value (1 column 1 row)
March 1, 2012 at 4:16 pm
atchristian, please have a look at the following article to follow the forum etiquettes : http://www.sqlservercentral.com/articles/Best+Practices/61537/.
We need to get more info on effectively give you an answer.
You requirement may...
March 1, 2012 at 3:11 pm
I must also ask a question here. What should happen if there are 2 LocationIDs with same number of appearances for a particular OrgID ?
March 1, 2012 at 9:37 am
Cadavre (3/1/2012)
OK, I'll give it a go but I've been told before that my teaching method comes across as abrasive.
Not at all Cadavre! Awesome explanation! Thanks for that. Hope the...
March 1, 2012 at 9:35 am
Try this:
SELECT DATES
, CrsApp2.DtAd WeekStart
, DATEADD(DD, 6, CrsApp2.DtAd) WeekEnd
FROM dt
CROSS APPLY ( SELECT DATEDIFF(WK,0,DATES) ) CrsApp...
February 29, 2012 at 9:47 pm
Hello Anjali..
Can you be more specific on your ask? I see some anamolies. The query you provided wont work.
Here is the set-up. Play with it and give exactly how...
February 29, 2012 at 7:11 pm
i am unclear with your requirement? what value u wnat to update the weekrange with?
Follow this post for Forum Etiquettes : Forum Etiquettes[/url]
February 29, 2012 at 6:54 pm
Viewing 15 posts - 466 through 480 (of 1,923 total)