Viewing 15 posts - 6,271 through 6,285 (of 8,731 total)
Maybe something like this could work?
WITH SampleData AS(
SELECT '00345.0001' code UNION ALL
SELECT '02345.0123' code UNION ALL
SELECT '025013'
)
SELECT ISNULL(...
June 12, 2014 at 11:57 am
cbrammer1219 (6/12/2014)
No that didn't work, all it did was return NULL values for every column 1 through 10
Well, that's not what I've got using the data that you posted.
June 12, 2014 at 10:56 am
I noticed that you didn't only have spaces and you have tabs as well.
Would this help you?
SELECT MAX( CASE WHEN ItemNumber = 1 THEN LTRIM(Item) END) Col1
...
June 12, 2014 at 10:24 am
tim.berry 88829 (6/12/2014)
Should really be a begin try with a subsequent error handling begin catch
I'm not sure that I would like to have a single try block for complex procedures.
June 12, 2014 at 9:56 am
simon.crick (6/12/2014)
jfogel (6/12/2014)
simon.crick (6/12/2014)
Tavis Reddick (6/12/2014)
[/p][p]My understanding of a database administration role is close to Wikipedia's, where a DBA...
June 12, 2014 at 9:49 am
The Wizard Of Oz (6/12/2014)
Luis Cazares (6/12/2014)
But that won't work to find customers that bought A & C but not B. 😀
Haha! Yes Luis, good thing that A & C...
June 12, 2014 at 9:17 am
The Wizard Of Oz (6/12/2014)
I've got it so the index/table only gets scanned once (instead of 3 times)
by just using a...
June 12, 2014 at 9:06 am
cbrammer1219 (6/12/2014)
June 12, 2014 at 9:03 am
I just wanted to play a little bit with the DelimitedSplit8k and this is what came out.
CREATE FUNCTION [dbo].[ItemsLength]
(
@pString [varchar](8000),
@pDelimiter [char](1)
)
RETURNS...
June 12, 2014 at 9:01 am
What's the data type on the table for those values? string or numeric?
Have you tried formatting the columns correctly before converting them to csv?
June 12, 2014 at 8:43 am
I missed the question. What's your problem?
June 12, 2014 at 8:35 am
Where do you have those csv values?
In a file? a parameter? a table?
June 12, 2014 at 8:35 am
I'm not so sure about this, but you could deny delete on your tables/schema. http://technet.microsoft.com/en-us/library/ms176128.aspx
June 11, 2014 at 3:23 pm
mushin2003 (6/11/2014)
Luis Cazares (6/11/2014)
The problem with your first query is that you missed to add the join condition for the CustomerID. In result, you're getting a cross join between...
June 11, 2014 at 1:48 pm
You're on the right direction. You just need to quote your characters/strings. 😉
SELECT ProdID, REPLACE (PATH, '/', '\')
FROM (SELECT 1 AS ProdID, '/folder/folder/file' AS [PATH])blahblah
June 11, 2014 at 12:37 pm
Viewing 15 posts - 6,271 through 6,285 (of 8,731 total)