Viewing 15 posts - 1,051 through 1,065 (of 2,894 total)
...
now I want to set superkey on (VENDORID+ADDRESS+CITY) which identify unique record.
...
Why three of them? Are you saying that VENDORID in your VENDOR table is not unique by itself?
Or, you...
October 16, 2012 at 5:09 am
Jay B-317395 (10/16/2012)
SELECT *, dbo.tPeriod.PeriodDiscription, dbo.[tTimeTable2012-13].StaffID, dbo.[tTimeTable2012-13].DayID
FROM dbo.tSubject
INNER JOIN dbo.[tTimeTable2012-13] ON dbo.tSubject.SubjectID = dbo.[tTimeTable2012-13].SubjectID
AND (dbo.[tTimeTable2012-13].StaffID = 18) AND...
October 16, 2012 at 4:59 am
vivekkumar341 (10/16/2012)
i had gone through your example its look wrong.
please find the detail.
declare @int1 varchar(100) = '100000000',
@int2 varchar(100) = '984541',
@int3 varchar(100)
your suggestion was mentioned below:
set @int3 = STUFF(...
October 16, 2012 at 4:56 am
jeyis (10/16/2012)
there is no difference in the execution plan of both queries.
Thanks Eugene Elutin for that date format practice .. old habits hard to change...
October 16, 2012 at 4:48 am
For some reason I think that you are not executing the proc you think you do.
Try simple test:
Change proc to something like:
ALTER PROCEDURE [dbo].[usp_updaterate]
AS
BEGIN
RETURN;
END
Then execute...
October 16, 2012 at 4:41 am
The answer is in here:
http://msdn.microsoft.com/en-us/library/ms190488.aspx
DBCC SHRINKDATABASE operations can be stopped at any point in the process, and any completed work is retained.
October 16, 2012 at 4:36 am
Is it just a query behaviour or you see it only when wrapped into stored procedure?
Does look like parameter sniffing to me...
Also, it's a bad practice to use strings for...
October 16, 2012 at 4:09 am
ssurekha2000 (10/15/2012)
no i have not created anytriggers
Can you please post exact error message you have from your application including error source (call-stack would be even better)
October 15, 2012 at 8:06 am
No much details isn't it.
So very generic answer:
SELECT YEAR(YourDateColumn)
,DATENAME(MONTH,MONTH(YourDateColumn)
,MIN(YourDateColumn) AS [first run date in this month]
FROM [YourTable]
WHERE...
October 15, 2012 at 6:54 am
The style you used to write your query I call "noodles" as it takes to much time to read top understand what you're are doing.
Bit messy, really.
I think the following...
October 15, 2012 at 6:47 am
Is it SQL error or application error? Your SP looks fine.
Any triggers on tables involved?
October 15, 2012 at 6:40 am
... There wouldn't be any overhead since the DB isn't querying anything to get the value of [a].
...
Except the fact that this will lead to full table...
October 15, 2012 at 6:37 am
Yeah, it does look more like Jeff Moden nighmare :w00t:
Or, may be, is taken from Oracle...
Your given example doesn't contain anything qualifying use of cursors (or WHILE LOOPs, which may...
October 15, 2012 at 6:31 am
Looks like you need to filter some kind of staging table...
That what you can try:
declare @t table (SomeVal nvarchar(100))
insert @t
select '1' union all
select '9' union all
select '11' union all
select...
October 15, 2012 at 6:23 am
The easiest and fastest way to get it done, is to add temporary SSN column into Parent table, so you can keep correlation between new generated ParentId and existing SSN....
October 15, 2012 at 6:10 am
Viewing 15 posts - 1,051 through 1,065 (of 2,894 total)