Viewing 15 posts - 946 through 960 (of 4,087 total)
We have not configured any shift timing, we are simply assuming that the MIN value...
September 5, 2018 at 7:56 am
SELECT 'AB99'+CAST(RIGHT('00000000' + CAST(ABS(CHECKSUM(NEWID())) % 99999999 AS VARCHAR(8)), 8) AS VARCHAR)...September 5, 2018 at 7:17 am
SELECT c.value('(ParameterValue[Name ="TO"]/Value/Text())[1]', 'nvarchar(max)') AS Emailreceipt, c.value('(ParameterValue[Name ="CC"]/Value/Text())[1]', 'nvarchar(max)')...
September 4, 2018 at 12:35 pm
Drew
September 4, 2018 at 12:19 pm
I did try it your way and I'm getting an error...
XQuery [@sample.field.value()]: The XQuery...
September 4, 2018 at 11:52 am
September 4, 2018 at 11:35 am
The best way is to mail it to an email distribution list, which will then email it to the appropriate people. It's usually much easier to adjust a distribution list than...
September 4, 2018 at 11:24 am
DECLARE @sample TABLE (field XML)
INSERT @sample
VALUES('<ParameterValues><ParameterValue><Name>prmExpandState</Name><Value>Collapse</Value></ParameterValue><ParameterValue><Name>AKDunsNumber</Name><Value>146159</Value></ParameterValue></ParameterValues>')
SELECT c.value('Value[1]', 'int') AS AKDunsNumber, d.value('Value[1]', 'varchar(50)') AS...
September 4, 2018 at 9:18 am
The problem is that you are grouping on the DATE instead of the shift. Without sample data, it's hard to tell you how to go about grouping by the shift...
September 4, 2018 at 8:41 am
September 4, 2018 at 8:16 am
Why do people have such trouble understanding the relationship between sample data and expected results. The expected results should have more than a tenuous relationship to the sample data.
August 31, 2018 at 2:48 pm
Well you didn't set up your sample data in a table, so I did that for you. Also, there is no way that you are deriving those expected results from...
August 31, 2018 at 2:30 pm
If the data is formatted in XML why aren't you using xquery?
You also want to look into using a table value constructor. If you post sample data and...
August 31, 2018 at 1:45 pm
This is also not the best approach anyhow. The best approach is either to use a CROSS APPLY/TOP(1) or to use a CTE/ROW_NUMBER. The CROSS APPLY/TOP(1) tends to perform better...
August 31, 2018 at 12:39 pm
With an appropriate index, the following may perform better. The index would be on Vendor(INV_ITEM_ID, ITM_VNDR_PRIORITY).
SELECT vu.*
FROM #Vendor_UOM vu
CROSS APPLY
(
SELECT...
August 30, 2018 at 11:54 am
Viewing 15 posts - 946 through 960 (of 4,087 total)