Viewing 15 posts - 76 through 90 (of 149 total)
On a separate note.
GO is a batch separator.
https://msdn.microsoft.com/en-us/library/ms188037.aspx
and the definition of a batch is...
"a group of one or more Transact-SQL statements sent at the same time from an application to...
December 9, 2016 at 1:52 pm
You can join Deleted & Inserted so you can include columns of both in one result set. Just make sure you have a unique key to join on.
There are...
December 9, 2016 at 1:28 pm
ZZartin (12/8/2016)
Inside those views are they maybe referencing things with schema specified, ie SELECT <columns> FROM dbo.TABLE in the views in both schemas?
Quoting ZZartin to bring more attention to his...
December 9, 2016 at 1:17 pm
drew.allen (12/6/2016)
CELKO (12/6/2016)
Using proprietary dialect constructs like CROSS APPLY and TOP make optimization difficult
Now you're just making up stuff to support your claims.
and portability impossible.
Who cares?!?! Most people...
December 6, 2016 at 12:42 pm
Igor Micev (12/5/2016)
December 5, 2016 at 9:47 am
mxy (12/1/2016)
;WITH summary AS (
SELECT p.Studentstatus,
p.StudentId ,
...
December 5, 2016 at 8:31 am
DDL & DML would help.
First of all, you've created a temp table #LocalizedCategories, but you are doing a Select Distinct on it. Is there any reason you couldn't have...
December 5, 2016 at 8:17 am
mack53nico (12/1/2016)Is it possible to rewrite the code that encapsulates all these combinations in a concise way?
SELECT Source_System, Identifier, Forename, Surname, Date etc....
FROM tblTable
WHERE
(Identifier = @identifier
OR...
December 5, 2016 at 8:05 am
Another option:
SELECT @Dummy = CASE WHEN LEN( Med_Rec_Nbr ) < 7
THEN RIGHT('000000'...
December 1, 2016 at 11:24 am
SELECT ps.Med_Rec_Nbr, REPLACE(STR(ps.Med_Rec_Nbr,7),' ','0')
FROM @Primary_Summary AS ps
This approach also makes it obvious if you got a number larger than expected, rather than truncating to 7 characters.
December 1, 2016 at 10:24 am
- Cross database access requires some additional security checks.
- The connection to another database will require an additional session, which will have its own CPU and memory overhead....
December 1, 2016 at 8:15 am
mack53nico (12/1/2016)
He may be wrong, but I won't be the one to tell him that 😀
You said you're new, but I strongly recommend you do tell him. His response...
December 1, 2016 at 7:55 am
On an unrelated note, you've created these objects in the master database. That is a very bad idea. If at all possible, you should move those to a...
November 30, 2016 at 11:12 am
wajahatabbas (11/25/2016)
We want to upgrade our database to the latest SQL Server 2014 or 2016, but we dont want to put our efforts on the application upgrade side.
How much...
November 30, 2016 at 9:35 am
A couple more questions:
You said lots of queries time out, but not all. Have you looked to see if there are specific columns that experience the timeouts? I...
November 30, 2016 at 8:24 am
Viewing 15 posts - 76 through 90 (of 149 total)