raphasem.blogg.se

Extracting output from mike 21 in ascii format
Extracting output from mike 21 in ascii format




extracting output from mike 21 in ascii format

Wilson II Senior Programmer Analyst Information Technology Department 9311 San Pedro Suite 600 San Antonio TX 78216 (800) 527-0066 x7368 (210) 321-7368 (direct) “Make everything as simple as possible, but not simpler.” Albert Einstein. That forces that last column to contain a CRLF which, as a result, will cause each row/record to come out on a separate line. One “trick” is to add one more column to your SELECT statement and specify that column as: We get a file from an as/400 that is one big long string and after X charaters a new row starts) and you have varying column values that are throwing off the row length then you will need to pad the field values as needed in order to get a fixed length row. OTOH, if this is a case where there is no row delimiter (I’ve got a DTS that has to specifically deal with this. BTW, this works equally well with exported data. As an example assuming you have a column that is varchar(20) and named “M圜olumn” then LEFT(‘M圜olumn’ + SPACE(20),20) will return you the string ‘M圜olumn’ with an appropriate amount of spaces after it. I would use a LEFT and SPACE function to do this. In the case of padding I would just pad with spaces as appropriate. My suggestion (assuming this is the case) would be to truncate and/or pad the column names to fit the specs as needed. If I’m understanding this correctly it sounds like some of the column names are longer than the output for the column and consequently the names get skewed. Wilson II Senior Programmer Analyst Information Technology Department 9311 San Pedro Suite 600 San Antonio TX 78216 (800) 527-0066 x7368 (210) 321-7368 (direct) via sql-server-l” 07:56 PM Please respond to Ralph Wilson cc Now, if I output it to a tab or comma delimited CSV file, I get my column names correctly output but it is no longer fixed width. Of course, some of my column names get a bit screwed up because they are longer than the width of the output column. Then, in what manner is it “not fixed width”?Įvery time I try to export to a file in fixed width format, I get a fixed width format file. Subject RE: RE: Export table to a flat file(fixed width) in SQL Server 2005īasically data in the file is missaligned, i.e. Wilson II Senior Programmer Analyst Information Technology Department 9311 San Pedro Suite 600 San Antonio TX 78216 (800) 527-0066 x7368 (210) 321-7368 (direct) via sql-server-l” 06:37 PM Please respond to Ralph Wilson cc (This is kind of like saying to an auto mechanic, “Well, the car is making a funny noise and doesn’t run right.” That’s not a real problem if you have the car there but if you drove up in another car or called on the phone, you need to provide more information. “the first column contains an ID number but it seems to not be outputting leading zeros”).Ĭan you provide any more details about _how_ “the file is misaligned”? commas, quotes, tabs, “pipes”)?Ĭan you decipher, at all, any of the columns by hand (e.g. Okay, does this mean that a) there are no commonly used delimiters (e.g. >basically data in the file is missaligned What part of fixed width did you not understand? Subject RE: Export table to a flat file(fixed width) in SQ L Server 2005 Wilson II Senior Programmer Analyst Information Technology Department 9311 San Pedro Suite 600 San Antonio TX 78216 (800) 527-0066 x7368 (210) 321-7368 (direct) via sql-server-l” 09:13 AM Please respond to Ralph Wilson cc Now, if you can explain how a file could be “fixed width” and NOT “fixed width” at the same time, I would be happy to accept the slap in the face that you gave me otherwise, perhaps you should consider posting an apology for being rude. Since I DO know what “fixed width” means, I rather assumed that NOT “fixed width” meant something OTHER than “fixed width” and I was trying to establish what sort of “something other than” it was. Perhaps, you didn’t read that far or you assumed that that still meant that the output was in “fixed width” in spite of what the original poster said. >After successful execution the file is not in fixed width. My question was in reference to following sentence in the original post. >What part of fixed width did you not understand? What part of “the file is not in fixed width.” are YOU having trouble with.






Extracting output from mike 21 in ascii format