Viewing 15 posts - 31 through 45 (of 337 total)
You will have to use APPLY clause to send item code from the left input (outer table).
Something like this...
Select t1.*,t2.* from yourtable t1
Cross Apply dbo. Getgrnqty_test3 (t1.ItemCode) as t2
March 28, 2016 at 1:54 am
You can do something like this
SELECT *
FROM (VALUES ('My Aggregated data1',
'My Aggregated data2'))T(data1, data2)
CROSS APPLY (SELECT...
March 27, 2016 at 8:12 pm
Please see the screenshot below.
http://oi68.tinypic.com/xcn3o2.jpg
When generating scripts you can play with these options in the Advanced Settings.I always have this options set
"Check For Object Existence"=False.This makes sure that the script...
March 27, 2016 at 7:48 pm
Forgot the column alias for SUM in the earlier code.
ALTER FUNCTION [dbo].[Getgrnqty_test2] (@ItemCode VARCHAR(10))
RETURNS TABLE
AS
BEGIN
RETURN
...
March 26, 2016 at 4:45 am
If your log chain is broken then there is no way that log shipping can continue.I am afraid you will have to break the LS and restore a diff backup...
March 26, 2016 at 4:05 am
ALTER FUNCTION [dbo].[Getgrnqty_test2] (@ItemCode VARCHAR(10))
RETURNS TABLE
AS
BEGIN
RETURN
(SELECT S1.divisionid,
...
March 26, 2016 at 3:57 am
kocheese (3/25/2016)
The table has the following columns:
[ProjectType]
[ProjectSubType]
[ProjectCategory]
[ProjectSubCategory]
I...
March 26, 2016 at 3:04 am
Your function is scalar valued so it will return only a single value.What you need to do is convert the scalar valued function to a inline table valued function so...
March 26, 2016 at 2:47 am
Please post the table structure,your update query and the index definition that you added.
March 25, 2016 at 9:01 pm
...WHERE NOT EXISTS (
SELECT EmployeeID
FROM budCrewDetail
WHERE budCrewDetail.Co = JCDET.JCCo
AND budCrewDetail.Project = JCDET.Job
AND budCrewDetail.[Date] = JCDET.ActualDate....
Negation operators like NOT are nonsargable expressions.An index is not useful in nonsargable expressions.SQL Server cannot...
March 25, 2016 at 8:58 pm
Try using @@Rowcount instead.But make sure nothing gets executed before the except clause and if it does then reset the @@rowcount value to 0.
select col1,col11 from table1
except
select col2,col22 from...
March 25, 2016 at 8:50 pm
Alan.B (3/25/2016)
Original Solution:
Table 'Worktable'. Scan count 38, logical reads 194...
Table '#TranTable__00000000003A'. Scan count 1, logical reads 2...
Original Solution + Window framing specifications on subquery a:
Table 'Worktable'. Scan count 19, logical...
March 25, 2016 at 8:24 pm
Jacob Wilkins (3/25/2016)
It could just be this:
SELECT accountid,
trandate,
tranvalue,
...
March 25, 2016 at 8:16 pm
Incase you are implementing witness server as well then it gets a little bit complicated.
Make sure you have created its own certificate on the witness server and on the principal...
March 25, 2016 at 8:05 pm
Viewing 15 posts - 31 through 45 (of 337 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy