Viewing 15 posts - 541 through 555 (of 3,544 total)
You have to LEFT JOIN both tables, i.e.
SELECTp.YearMonth AS PastYearMonth, OH.SHIPTO AS Location, LEFT(OH.ORDDATE, 6) AS YearMonth
FROMPast12Months AS p
LEFT JOIN OEORDH AS OH ON LEFT(OH.ORDDATE, 6) = p.YearMonth
AND...
Far away is close at hand in the images of elsewhere.
Anon.
March 9, 2015 at 7:41 am
Grant Fritchey (3/9/2015)
Grace09 (3/8/2015)
SELECT DISTINCT .[ID], .[ParentID]
FROM [Items]
WHERE LOWER(.[Name]) = 'Test'
execution...
Far away is close at hand in the images of elsewhere.
Anon.
March 9, 2015 at 7:37 am
Example
SELECT h.SHIPTO,LEFT(h.ORDDATE,6) AS [YearMonth],p.YearMonth AS [PastYearMonth]
FROM Past12Months p
LEFT JOIN OEORDH h ON LEFT(h.ORDDATE,6) = p.YearMonth
NOTE: The use of LEFT to match ORDDATE is not efficient as it...
Far away is close at hand in the images of elsewhere.
Anon.
March 9, 2015 at 7:11 am
If Past12Months contains ALL 12 months then you need to start with Past12Months and left join OEORDH and OEORDD
Far away is close at hand in the images of elsewhere.
Anon.
March 9, 2015 at 6:57 am
faulknerwilliam2 (3/2/2015)
However, when you say ' otherwise data will be aggregated ' -...
Far away is close at hand in the images of elsewhere.
Anon.
March 2, 2015 at 2:44 am
Sorry forgot you are using ToolStrip, to close the menu use the HideDropDown method on the owning ToolStripMenuItem of RandomIntToolStripMenuItem
Far away is close at hand in the images of elsewhere.
Anon.
March 2, 2015 at 2:38 am
Glad you found a solution however if you are grouping by day name make sure your date range does not span more than a week otherwise data will be aggregated...
Far away is close at hand in the images of elsewhere.
Anon.
March 2, 2015 at 2:13 am
but it didn't work
My query (with changed column names) against the new sample produced the results shown.
run for almost 1 hours
This solution will not scale well as the joining the...
Far away is close at hand in the images of elsewhere.
Anon.
March 2, 2015 at 2:08 am
RandomInt is set up as a combo box (dropdownlist)
You should use SelectedIndexChanged event to monitor when the user selects a value from a combo box and in your case...
Far away is close at hand in the images of elsewhere.
Anon.
February 27, 2015 at 9:32 am
Try this instead
=String.Format("{0:dddd}",Fields!Date.Value)
Far away is close at hand in the images of elsewhere.
Anon.
February 27, 2015 at 6:10 am
;WITH cte (BrNum,Emp_Num,Trn_Dt,_Time,Trn_Dt_Time,RowNum)
AS (
SELECTBrNum,Emp_Num,Trn_Dt,_Time,
CAST(CONVERT(char(10),Trn_Dt,120)+' '+STUFF(_Time,3,0,':') as datetime),
ROW_NUMBER() OVER (PARTITION BY BrNum,Emp_Num,Trn_Dt ORDER BY _Time ASC)
FROM Store_
)
SELECT a.BrNum,a.Emp_Num,a.Trn_Dt,a._Time,
ISNULL(CAST(STUFF(CONVERT(char(5),DATEADD(minute,DATEDIFF(minute,b.Trn_Dt_Time,a.Trn_Dt_Time),0),114),3,1,'') as int),0)
FROM cte a
LEFT JOIN cte b ON b.BrNum = a.BrNum AND b.Emp_Num...
Far away is close at hand in the images of elsewhere.
Anon.
February 27, 2015 at 4:12 am
Already answered in dupe post
http://www.sqlservercentral.com/Forums/Topic1664045-391-1.aspx
Far away is close at hand in the images of elsewhere.
Anon.
February 27, 2015 at 3:22 am
Personally I use the appSettings section of the app.config and have a standard form I use to add to projects to show and edit the settings and restart the app...
Far away is close at hand in the images of elsewhere.
Anon.
February 26, 2015 at 6:40 am
What second dataset?
Do you not have one parameter and one dataset (to retrieve all data for all databases) and currently filtering the dataset with the parameter?
Far away is close at hand in the images of elsewhere.
Anon.
February 17, 2015 at 6:58 am
Add a filter to the dataset
Set the expression to
=Left(Fields!DatabaseName.Value,Len(Parameters!ReportParameter1.Value))=Parameters!ReportParameter1.Value
Change the expression return to Boolean
Leave operator as =
Set Value to true
Far away is close at hand in the images of elsewhere.
Anon.
February 17, 2015 at 6:35 am
Viewing 15 posts - 541 through 555 (of 3,544 total)