Viewing 15 posts - 826 through 840 (of 3,482 total)
Expected results?
OR the two parts together????
select p.PartID, p.PartNumber,m.SupplierId,m.TradeCode from #tempsupplier m
inner join #parts p on p.SupplierId=m.SupplierId
where not exists ( select 1 from #TradeCodes t where t.TradeCode=m.TradeCode)
OR...
January 22, 2020 at 3:38 am
One way... You may need to modify the FORMAT()… bit to get the dates formatted the way you want. I did that because I wanted them cast as strings.
January 18, 2020 at 3:27 am
Be brave. Read the documentation. There are examples of how to properly use all this stuff there.
January 16, 2020 at 4:36 am
CREATE TABLE #d(
HTS_NUM CHAR(4),
Ctry CHAR(2),
GA_REQ_CODE CHAR(3)
);
GO
INSERT INTO #d VALUES ('1062','US','FD3'),('1062','US','FW2'),('1062','US','FD3');
SELECT DISTINCT HTS_NUM
, Ctry
,stuff((
SELECT ', ' + cast(GA_REQ_CODE as varchar(max))
FROM #d
FOR XML...
January 10, 2020 at 9:35 pm
Could you post some sample data in the form of CREATE TABLE and INSERT scripts?
January 9, 2020 at 7:27 pm
and where's your CREATE TABLE script?
TOP and CROSS APPLY... and absent another table, you might need DISTINCT.
Post your attempt... if we just tell you the answer, you won't learn anything.
January 8, 2020 at 5:04 am
What's the business question you're trying to answer?
January 8, 2020 at 4:37 am
Back up a step. What's the question you're trying to answer?
Why not post some consumable data so people can just run it and help solve your problem?
use...
January 8, 2020 at 3:11 am
You have to specify defaults when you create the table using the DEFAULT keyword. Then if you don't specify a value for that column when you insert a new record,...
January 4, 2020 at 9:32 am
It's easier to start with one fact table and create dimension tables for that. It's certainly possible to have more than one fact table in a model, but if you're...
January 3, 2020 at 3:37 am
Use the Import/Export wizard to create an SSIS package that does it?
January 2, 2020 at 4:34 pm
There's probably a better way, but one option is to automate Word.
Open file,
Run Replace
Save
Go to next file. (you can use DIR() to get the next file)
December 30, 2019 at 1:21 am
like this?
-- create some consumable data...
CREATE TABLE test(
txtdatetime varchar(50)
);
GO
INSERT INTO test(txtdatetime) values ('12-18-2019 T 09:00 AM')
,('12-18-2019')
,('12-15-2019');
SELECT txtDateTime As origvalue
, CAST(REPLACE(txtDateTime,' T','') AS DateTime) AS testreturn
FROM test;
December 18, 2019 at 5:55 pm
" I would like to start the count over again for each dealer"
You need to use PARTITION BY to do that. It's analogous to GROUP BY, but works inside windowing...
December 14, 2019 at 1:53 am
Repeat On New page doesn't work? Is this a matrix or a Tablix?
I created a Tablix on a report and selected the first column's header (after showing advanced properties), and...
December 11, 2019 at 4:20 am
Viewing 15 posts - 826 through 840 (of 3,482 total)