Viewing 15 posts - 436 through 450 (of 2,007 total)
Gohloum (10/24/2012)
October 24, 2012 at 9:27 am
This: -
AND (a3.ORDPROD LIKE 'OTHER%')
breaks your outer join and turns it into an inner join.
Try this: -
SELECT a1.CUSTID, a1.COMPANY AS [Co Name], a2.STATUS AS [TYPE], a3.ORDPROD AS [Product]
FROM dbo.TABLE1 a1...
October 24, 2012 at 9:01 am
Hey and welcome to SSC!
I'd love to help, but I'm afraid that you haven't quite provided enough information. What I could do with from you is readily consumable sample data...
October 24, 2012 at 8:21 am
Change your DESC to ASC for your ROW_NUMBER to get them in the correct order.
Why do you want to get rid of the records that are gone? Is it because...
October 24, 2012 at 7:39 am
Whoever sent that would go into my "junk" filter for all time.
October 24, 2012 at 7:00 am
EamonSQL (10/24/2012)
Wrap in brackets giving you a derived table.
Run a delete command against the table and...
October 24, 2012 at 6:54 am
ThomasRushton (10/24/2012)
use tempdb
go
declare @testtable table (id int, value int, name char(4))
insert into @testtable values
(1, 10, 'test'), (2, 5, 'prod'), (3, 10, 'test'), (4, 4,...
October 24, 2012 at 5:45 am
davdam8 (10/24/2012)
Hi geniuses.
I got a report to build and I need data from a field which contains lots of junk data, like:
MNN.helloworld
SSD.goodbyeworld
DDS.seeulaterworld.oops
....
What I really need when there's only 1 '.'...
October 24, 2012 at 3:32 am
davdam8 (10/24/2012)
ThanksIt gives me an error: Argument data type ntext is invalid for argument 1 of len function
Solutions?
Regards
That would be because you didn't supply DDL or readily consumable sample data,...
October 24, 2012 at 3:20 am
Something like this: -
SELECT
realXML.value('(/Announcement/Headline/BroadcastDate)[1]', 'DATE') AS [Date],
realXML.value('(/Announcement/Headline/BroadcastTime)[1]', 'TIME') AS [Time],
realXML.value('(/Announcement/Full_News/Code)[1]', 'VARCHAR(8)') AS [Code]
FROM (SELECT CONVERT(XML,CAST(XMLData AS NVARCHAR(MAX)), 2)
FROM @t)a(realXML);
October 24, 2012 at 3:16 am
--========================--
--== CREATE SAMPLE DATA ==--
--========================--
SELECT yourData
INTO #yourTable
FROM (VALUES('MNN.helloworld'),('GFF.goodbyeworld'),('SSW.seeyoulaterworld.oops')
)a(yourData);
--========================--
--== SOLUTION ...
October 24, 2012 at 3:02 am
dwain.c (10/16/2012)
October 17, 2012 at 1:47 am
dwain.c (10/16/2012)
When I run mine on the OP's sample data I get this:
DETAILS_IDCol1Col2Col3Col4
EA22749B180C41D09B4CC986D21C8F0211/28/200601/01/19001PL625245
BTW. Changing the CONVERT format...
October 17, 2012 at 12:43 am
Lowell (10/16/2012)
October 16, 2012 at 8:31 am
sj999 (10/16/2012)
Column A is int (3)
Column B is varchar 10
I wish to remove all non-alphanumeric characters from Column B
using a tally table.
Lets set a limit of...
October 16, 2012 at 1:12 am
Viewing 15 posts - 436 through 450 (of 2,007 total)