Viewing 15 posts - 12,496 through 12,510 (of 13,870 total)
OK, maybe this works:
declare @a varchar(100)
set @a = 'a.b.c.d.f.g'
SELECT REPLACE(SUBSTRING(@a, charindex('.', @a), LEN(@a) - charindex('.', REVERSE(@a))-1), '.','')
October 22, 2009 at 10:51 am
SELECT SUBSTRING(REPLACE('ab.cd.ef.gh.kl','.',''), 3, len(REPLACE('ab.cd.ef.gh.kl','.',''))-4)
SELECT SUBSTRING(REPLACE('hh.jj.kk.rr.ee.bb','.',''), 3, len(REPLACE('hh.jj.kk.rr.ee.bb','.',''))-4)
You didn't remove the left and right 2 characters 🙂
--edit aaah, just seen the latest post - that's tougher
October 22, 2009 at 10:34 am
My best guess is that the data is probably coming in as null from Excel (you can check this using a data viewer). Excel has 'decided' that that field contains...
October 22, 2009 at 10:12 am
So the requirement is to remove all the dots and remove the left 2 chars and the right 2 chars?
Would you like it in SQL or in script?
October 22, 2009 at 9:59 am
What is the datatype of the column to which you would like to pass this data?
October 22, 2009 at 9:55 am
Try removing the T2 aliasing and writing out the full name of the table. You cannot alias a table in the first line of an update statement, even in T-SQL...
October 21, 2009 at 2:05 pm
Is the PK an IDENTITY field? If so, you'll have to enable IDENTITY insert.
October 21, 2009 at 1:22 pm
bitbucket-25253 (10/21/2009)
Phil Parkin
You are wrong in thinking that SSIS cannot import values from Excel which are the result of calculations. I just tried this and it works fine.
Phil did...
October 21, 2009 at 10:05 am
I just expanded my testing to include cells populated via drop-down and these worked fine too. So there must be something more to this ...
October 21, 2009 at 9:51 am
bitbucket-25253 (10/21/2009)
If they do then
2. Check Excel help for "Replace a formula with its result"
Unfortunately the only...
October 21, 2009 at 9:38 am
That's too complex for anything but the Script Component - I suggest you concentrate your efforts there.
October 21, 2009 at 9:02 am
Except for your post, the word 'wizard' appears nowhere in this thread.
October 21, 2009 at 5:17 am
Siddharth Mehta (10/21/2009)
October 21, 2009 at 5:14 am
Siddharth Mehta (10/21/2009)
Step 2: Use the option of Edit Top 200 rows by right-clicking the table in SSMS
Step 3: Paste the data,...
October 21, 2009 at 5:10 am
I suspect that you need to use SQL syntax which is supported on DB2.
Check here and search for INSERT as a possible resource to get you through this.
October 21, 2009 at 1:28 am
Viewing 15 posts - 12,496 through 12,510 (of 13,870 total)