Viewing 15 posts - 10,291 through 10,305 (of 13,879 total)
Mitesh Oswal (12/21/2012)
DECLARE @tbl TABLE
(
ID INT IDENTITY(1,1),
SomeData VARCHAR(100)
)
INSERT INTO @tbl SELECT 'NA11345'
INSERT INTO @tbl SELECT 'NA113456'
INSERT INTO @tbl SELECT 'RA11345'
UPDATE @tbl SET SomeData = SUBSTRING(SomeData,CHARINDEX('NA',SomeData)+2,LEN(SomeData))
WHERE CHARINDEX('NA',SomeData) = 1
select *...
December 21, 2012 at 5:56 am
eklavu (12/20/2012)
UPDATE #TEST_TABLESET COLS = SUBSTRING(COLS,3,LEN(COLS)-2)
WHERE LEFT(COLS,2) = 'NA'
Possibly not relevant here, but if the 'COLS' column is indexed, a better option would be
where cols like 'NA%'
As this will...
December 21, 2012 at 2:18 am
Someone at MS will write a conversion utility for sure if this is implemented. I don't think it's worth worrying about - there is no agreement as to exactly when...
December 20, 2012 at 9:35 am
Koen Verbeeck (12/20/2012)
you could use the Export column to export each location to a seperate flat file (you'd need to combine all the data columns you need...
December 20, 2012 at 7:59 am
Another way:
where len(Col) > len(replace(Col, '''', ''))
December 20, 2012 at 4:22 am
venkatareddy.mora (12/20/2012)
I have a flatfile which contains 100 diff locations, i want split the data based on the name of city
Ex:-
cid,cname,loc
1,aa,us
2,bb,uk
3,cc,russaia
........ upto 100
so want split the data based...
December 20, 2012 at 4:01 am
In relation to the convert, it actually did work. I thought this would work as my perception of running a linked server to MySQL still means I am making the...
December 19, 2012 at 2:28 pm
10e5x (12/19/2012)
I heed ur advice and did a debug. It was strange it doesnt return me any data. Hence i read through my script and realize it may...
December 19, 2012 at 11:59 am
Brad Marsh (12/18/2012)
Duplicate column names are not allowed in result sets obtained through OPENQUERY and OPENROWSET. The column name "name" is a duplicate.
Owh the joys of...
December 19, 2012 at 1:14 am
Steve Jones - SSC Editor (12/18/2012)
I don't like the idea of them after BEGIN-like statements. I'd see...
December 18, 2012 at 11:51 am
I saw an example only today of over-zealous use of the semi-colon terminator, with something like this:
Begin try;
--do stuff
End try
Begin Catch
--error handling stuff here
End Catch;
This does not generate an error...
December 18, 2012 at 10:54 am
..which you will quickly diagnose when running in debug. Sounds like the datareader may not be getting populated at all.
December 18, 2012 at 10:44 am
Single quotes within single quotes may be causing issues. Try this instead:
select *
from openquery([connection], '
-- Forum Messages by User
use databasebname;
select u.name, convert_tz(from_unixtime(m.modificationDate/1000),''+00:00'',''-08:00'') as TimePST, m.subject, m.body, m.messageID, f.forumID, f.name
from jiveMessage...
December 18, 2012 at 10:42 am
Have you tried setting a breakpoint and debugging line by line? It might illuminate the problem.
December 18, 2012 at 6:08 am
david.ostrander (12/14/2012)
Oh I understand the message. Its my eyes that are not seeing where the issue is.
Try running the queries one at a time and counting the columns ...
December 14, 2012 at 1:07 pm
Viewing 15 posts - 10,291 through 10,305 (of 13,879 total)