I've been coding too long this week!
I think I'm done, actually, which is GOOD NEWS. Why? Cause this is what I'm starting to see when I close my eyes to go to bed at night... GAH!!!
--------------------------
CREATE VIEW dbo.UHG_Compiled AS
--------------------------
select
convert (varchar(5), b.VersionIndicator) AS VersionIndicator,
convert (varchar(8), b.GroupID) AS GroupID,
convert (varchar(12), '') AS B01,
convert (varchar(2), a.Relationship_Code) AS Relationship,
'00' AS F01,
convert (varchar(9), b.SSN) AS SSN,
convert (varchar(4), '') AS B02,
CASE a.Relationship_Code
When '18' THEN '00'
ELSE ' '
END F02,
CASE a.Relationship_Code
When '18' THEN convert (varchar(9), b.SSN)
ELSE ' '
END ESSN,
convert (varchar(4), '') AS B03,
'00' AS F03,
convert (varchar(13), '') AS OSSN,
convert (varchar(16), '') AS B04,
convert (varchar(8), b.HireDate) AS HireDate,
convert (varchar(12), '') AS B05,
replace((replace((replace((replace((replace(convert(varchar(20), a.LastName), '/', ' ')),'-','')),'#','Nbr ')),',','')),'.','') AS LastName,
--------------------------
DTS UHG_Export
--------------------------
HEADER.txt
DECLARE
@count int,
@use varchar(5)
set @count = (select count(*)+1 FROM UHG_Compiled)
set @use = convert(varchar(5), @count)
SELECT
' ' AS Filler,
replicate ('0', 8 - LEN(@use))+@use AS InclHeader,
'|' AS EOF
BODY.txt
VIEW dbo.UHG_Compiled
--------------------------
UHG.bat
--------------------------
# Create UHG Export File, compile header.txt and body.txt,
# add date-stamp to .gsf file
#
@echo off
for /f "tokens=1-4 delims=/ " %%i in ("%date%") do (
set dow=%%i
set month=%%j
set day=%%k
set year=%%l
)
set date=%year%%month%%day%
set file=SUBMITID.U.%date%0000.gsf
copy c:UHGUHG_header.txt+c:UHGUHG_body.txt c:UHG%file%
exit
January 11th, 2007 at 09:58 pm 1168552737
January 11th, 2007 at 10:08 pm 1168553307
January 11th, 2007 at 10:16 pm 1168553776
January 11th, 2007 at 10:19 pm 1168553986
I usually don't remember any of my dreams. I am too tired to remember!
January 12th, 2007 at 12:27 am 1168561642
Whatever it is, that's impressive! You're the first woman I know that can actually code (not to imply that women can't code or anything).
I've done QuickBasic, REALBasic, Python, C, Cplusplus (the plus symbol doesn't seem to want to show), Objective C and a tiny bit of C# and Pascal. I don't do any coding right now (and honestly, don't remember much anyways), but maybe someday, when I have a lot more time on my hands, I'd probably like to do it again just for fun... like the way I used to do it in my childhood days.
January 12th, 2007 at 12:31 am 1168561869
Married or not, I doubt you'll have trouble finding (geeky) men slobbering after you.
edit: I just looked at your script again. Is that a DOS batch file?! Probably not, but if it is, your geek creds just shot up from "WOW!" to "INSANE WOW!".
January 12th, 2007 at 12:50 am 1168563003
actually, i don't mind it. i'm good at determining the logic flow, but the syntax always get me when i get started.
went from turbo pascal (HA!) to C + +, to HTML, to Perl, PHP, java. currently at work it's mainly SQL, XML, JavaScript, some C#. since we do a lot with Lotus Notes and Domino, there's also Lotus Script/Formula, which is based on JavaScript/Visual Basic (respectively).
no real training, just good at reverse engineering. it reminds me of a MasterCard commercial, actually!
Oracle DBA book: 79.99
Lotus Domino Admistrator book: 59.95
JavaScript in a Nutshell (800 pgs no less): 55.00
Ability to fake it well enough to get the job done? PRICELESS!!!
i don't know many geeks anymore, actually. other than those i work with. in the past, i've dated my fair share of geeks. remember those 2 federally recognized hackers? ex's, and one designed the original BoA automated phone system....
and to the feds, i again say "I hack for good, not evil!"... i can only imagine what's in my file, guilt by association you know
January 12th, 2007 at 01:07 am 1168564030
Wow, that's scarey. A good looking woman who likes weaponry and has coding chops. With such a fearsome and fascinating combination, the mind truly boggles as to why any man would cheat on you!
January 12th, 2007 at 01:15 am 1168564552
boy, i just realized that sounds like a bunch of gobbilty gook! sorry to wax geeky, all!
as for the possible cheating, i'm stickin' with "mo-ron!".
January 12th, 2007 at 01:23 am 1168565022
And yes, it's a bunch of gobbly gook, but I don't mind it (don't know about anyone else though
Conceptually though, it does seem like a rather clever workaround. So long as it works!
January 12th, 2007 at 01:37 am 1168565871
my problem was that columns 1,2, and 3 had to be different character lengths for the first row than for the 868 other rows. a normal 'copy everything' DTS won't do the trick here. and, without using an activeX DTS procedure, i couldn't even get it to append to the same file it kept overwriting. that's no good!
so, i went around my elbow to scratch my a$$. all in all, still pretty elegant considering...
i am, however, sticking my head in the sand about trying to create a web interface for this crap. first time i've ever seen a website that runs on a .dll coded in C#. WTF!!!
January 12th, 2007 at 06:41 am 1168584099