Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: One Of Those Days...


I am the Jammie King!




Status: Offline
Posts: 12736
Date: Jun 23, 2004
One Of Those Days...


Have you ever had one of those days where you've done absolutely tons of stuff, but got absolutely nothing done.


I need a nap.



__________________
The King has spoken... But nobody listened.


A.K.A. Damo_Daly
I have a cool name...


Status: Offline
Posts: 559
Date: Jun 23, 2004

Im have a day kind of like that, except Ive done absolutely nothing and got absolutely nothing done, cos my boss is on paternity.
Apart from that, Im the only 1 in the dept who does any kind of windows programming, so all requests = 20 days, usually equating to 15 f***ying about on sites like this :) and 5 days doing work!

Add a field to your form sir? yes, that'll be 20 please.

__________________


Proud House-Owner




Status: Offline
Posts: 1139
Date: Jun 23, 2004

I'm having a day like Damo... once I got to work (erm.. very very late... don't tell on me!) I shuffled some papers around.. checked all the messages on here and source of title... spilled iced green tea on myself.. stared at the wall for an hour...


I'm even more productive now than my first week of work where I didn't even have a computer... Spent all day just staring at the wall, doodling and making a grocery list.



__________________
Joe


Ah Pity Da Foo!

Status: Offline
Posts: 602
Date: Jun 23, 2004

I did this today:
ALTER PROCEDURE uspProcessTrans AS
DECLARE @sSQL VARCHAR(8000)
DECLARE @Table_Name VARCHAR(10)
DECLARE @Identity VARCHAR(10)
DECLARE @Transaction_Identity VARCHAR(10)
DECLARE @Transaction_Name VARCHAR(10)
DECLARE @V1 VARCHAR(10)
DECLARE @V2 VARCHAR(10)
DECLARE @V3 VARCHAR(10)
DECLARE @V4 VARCHAR(10)
DECLARE @V5 VARCHAR(10)
DECLARE @V6 VARCHAR(10)
DECLARE @V7 VARCHAR(10)
DECLARE @V8 VARCHAR(10)
DECLARE @V9 VARCHAR(10)
DECLARE @V10 VARCHAR(10)
DECLARE @V11 VARCHAR(10)
DECLARE @V12 VARCHAR(10)
DECLARE @V13 VARCHAR(10)
DECLARE @V14 VARCHAR(10)
DECLARE @V15 VARCHAR(10)
DECLARE @V16 VARCHAR(10)
DECLARE @V17 VARCHAR(10)
DECLARE @V18 VARCHAR(10)
DECLARE @V19 VARCHAR(10)
DECLARE @V20 VARCHAR(10)
DECLARE @V21 VARCHAR(10)
DECLARE @V22 VARCHAR(10)
DECLARE @V23 VARCHAR(10)
DECLARE @V24 VARCHAR(10)
DECLARE @V25 VARCHAR(10)
DECLARE @V26 VARCHAR(10)
DECLARE @V27 VARCHAR(10)
DECLARE @V28 VARCHAR(10)
DECLARE @V29 VARCHAR(10)
DECLARE @V30 DATETIME(8)
DECLARE Transaction_Name VARCHAR(10)
DECLARE @D1 VARCHAR(10)
DECLARE @D2 VARCHAR(10)
DECLARE @D3 VARCHAR(10)
DECLARE @D4 VARCHAR(10)
DECLARE @D5 VARCHAR(10)
DECLARE @D6 VARCHAR(10)
DECLARE @D7 VARCHAR(10)
DECLARE @D8 VARCHAR(10)
DECLARE @D9 VARCHAR(10)
DECLARE @D10 VARCHAR(10)
DECLARE @D12 VARCHAR(10)
DECLARE @D13 VARCHAR(10)
DECLARE @D14 VARCHAR(10)
DECLARE @D15 VARCHAR(10)
DECLARE @D16 VARCHAR(10)
DECLARE @D17 VARCHAR(10)
DECLARE @D18 VARCHAR(10)
DECLARE @D19 VARCHAR(10)
DECLARE @D20 VARCHAR(10)
DECLARE @D21 VARCHAR(10)
DECLARE @D22 VARCHAR(10)
DECLARE @D23 VARCHAR(10)
DECLARE @D24 VARCHAR(10)
DECLARE @D25 VARCHAR(10)
DECLARE @D26 VARCHAR(10)
DECLARE @D27 VARCHAR(10)
DECLARE @D28 VARCHAR(10)
DECLARE @D29 VARCHAR(10)
DECLARE @D30 DATETIME(8)

DECLARE cTrans CURSOR FAST_FORWARD
FOR
SELECT Table_Name, Identity1, Identity2, Identity3, Transaction_name, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, V14, V15, V16, V17, V18, V19, V20, V21, V22, V23, V24, V25, V26, V27, V28, V29, V30
FROM isoft_transactions

OPEN cTrans
FETCH NEXT FROM cTrans INTO @Table_Name, @Identity, @Transaction_Identity, @V1, @V2, @V3, @V4, @V5, @V6, @V7, @V8, @V9, @V10, @V11, @V12, @V13, @V14, @V15, @V16, @V17, @V18, @V19, @V20, @V21, @V22, @V23, @V24, @V25, @V26, @V27, @V28, @V29, @V30
WHILE @@FETCH_STATUS = 0
BEGIN
SELECT TOP 1 @Transaction_Name = Transaction_Name,
@D1 = D1
@D2 = D2
FROM transactions_dictionary
WHERE Transaction_Name = @Transaction_Identity
SET @sSQL = 'UPDATE' + @Table_Name
SET @sSQL = @sSQL + 'SET' + @D1 + '=' + CAST(@V1 AS VARCHAR(10)) + ','
SET @sSQL = @sSQL + 'SET' + D2 + '=' + @V2 + ','
SET @sSQL = @sSQL + 'SET' + D3 + '=' + @V3 + ','
SET @sSQL = @sSQL + 'SET' + D4 + '=' + @V4 + ','
SET @sSQL = @sSQL + 'SET' + D5 + '=' + @V5 + ','
SET @sSQL = @sSQL + 'SET' + D6 + '=' + @V6 + ','
SET @sSQL = @sSQL + 'SET' + D7 + '=' + @V7 + ','
SET @sSQL = @sSQL + 'SET' + D8 + '=' + @V8 + ','
SET @sSQL = @sSQL + 'SET' + D9 + '=' + @V9 + ','
SET @sSQL = @sSQL + 'SET' + D10 + '=' + @V10 + ','
SET @sSQL = @sSQL + 'SET' + D11 + '=' + @V11 + ','
SET @sSQL = @sSQL + 'SET' + D12 + '=' + @V12 + ','
SET @sSQL = @sSQL + 'SET' + D13 + '=' + @V13 + ','
SET @sSQL = @sSQL + 'SET' + D14 + '=' + @V14 + ','
SET @sSQL = @sSQL + 'SET' + D15 + '=' + @V15 + ','
SET @sSQL = @sSQL + 'SET' + D16 + '=' + @V16 + ','
SET @sSQL = @sSQL + 'SET' + D17 + '=' + @V17 + ','
SET @sSQL = @sSQL + 'SET' + D18 + '=' + @V18 + ','
SET @sSQL = @sSQL + 'SET' + D19 + '=' + @V19 + ','
SET @sSQL = @sSQL + 'SET' + D20 + '=' + @V20 + ','
SET @sSQL = @sSQL + 'SET' + D21 + '=' + @V21 + ','
SET @sSQL = @sSQL + 'SET' + D22 + '=' + @V22 + ','
SET @sSQL = @sSQL + 'SET' + D22 + '=' + @V22 + ','
SET @sSQL = @sSQL + 'SET' + D23 + '=' + @V23 + ','
SET @sSQL = @sSQL + 'SET' + D24 + '=' + @V24 + ','
SET @sSQL = @sSQL + 'SET' + D25 + '=' + @V25 + ','
SET @sSQL = @sSQL + 'SET' + D26 + '=' + @V26 + ','
SET @sSQL = @sSQL + 'SET' + D27 + '=' + @V27 + ','
SET @sSQL = @sSQL + 'SET' + D28 + '=' + @V28 + ','
SET @sSQL = @sSQL + 'SET' + D29 + '=' + @V29 + ','
SET @sSQL = @sSQL + 'SET' + D30 + '=' + @V30 + ','

SET @sSQL = @sSQL + 'WHERE Identity = ' + CAST(@Identity AS VARCHAR(10))
PRINT (@sSQL)

SET @sSQL = 'DELETE FROM isoft_transactions WHERE Table_Name = ' + @Table_Name +'Identity = ' + @Identity + ' AND Transaction_name = ' + @Transaction_Identity
PRINT (@sSQL)
FETCH NEXT FROM cTrans INTO @Table_Name, @Identity, @Transaction_Identity, @V1, @V2, @V3, @V4, @V5, @V6, @V7, @V8, @V9, @V10, @V11, @V12, @V13, @V14, @V15, @V16, @V17, @V18, @V19, @V20, @V21, @V22, @V23, @V24, @V25, @V26, @V27, @V28, @V29, @V30
END
CLOSE cTrans
DEALLOCATE cTrans


And it doenst quite work properly

Oh, and fixed a few wee faults as well

__________________
What was i doing before i came here again?


A.K.A. Damo_Daly
I have a cool name...


Status: Offline
Posts: 559
Date: Jun 23, 2004

Not bad Joe, I did this:

If strResponse = vbYes Then


__________________


Proud House-Owner




Status: Offline
Posts: 1139
Date: Jun 23, 2004

I'm almost jealous...


 


 


almost...



__________________


Proud House-Owner




Status: Offline
Posts: 1139
Date: Jun 23, 2004

Ok I'll share too..


I did this:


Private Sub cboState_Change()
Forms!frmAddNewAbs!sbfrmAbsCounty!CountyID.Requery
End Sub



__________________


I ain't a Pirate and I ain't called Anne, but I sure am Bonnie!

(Mrs)





Status: Offline
Posts: 3266
Date: Jun 23, 2004

er.. i didn't really do anything


WAIT! i got acupuncture



__________________
current location: Antrim. I like it.


I am the Jammie King!




Status: Offline
Posts: 12736
Date: Jun 23, 2004

Let me tell you about my day.


Got to work - my boss took some work off me saying that I needed to concentrate on some other work, so while he got on and did the work that he'd taken off me in order for me to concenrate on some mother work, I posted on the Jammie Dodger Bored Board.


Then I got the drinks in.


Then I looked at my boss doing the stuff that he'd taken off me so that I could concentrate on some other stuff and then I posted on the Jammie Doder Bored Board.


Then my boss came over and told me how difficult the stuff he'd taken off me so that I could concentrate on other stuff was (did that make sense?).  I agreed with him and he wnet off and carried on with the stuff he'd taken of me so that I could concentrate on the other stuff and I posted on the Jammie Dodger Bored Board.


Then I posted some more.


Then I went to the loo.


Then I posted and asked Sooty to phone one of my workmates to get her to get the drinks in.


Actually, I reall did tons of stuff - I drew a system map on some inadequate flowcharting software and got some spreadsheets together and some other stuff...



__________________
The King has spoken... But nobody listened.


Vice JDK
and Man of the People





Status: Offline
Posts: 5453
Date: Jun 23, 2004

Spreadsheet time eh D?

Here's what I have so far:

Private Sub Workbook_Open()
Dim myQry As QueryTable
For Each myQry In Sheets("CMS Query").QueryTables
myQry.Connection = _
"ODBC;DSN=SQLSERVER;Description= SQLSERVER;UID=myself;PWD=myself;APP=Microsoft® Query;WSID=Revenue Template: " & GrabUser & ";Network=DBMSSOCN;Address=xxx.xxx.xxx.xxx,1433"
Next
End Sub

'============================================================================================================

In modRefresh, overwrite all of the existing code with:

'============================================================================================================

Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long

Sub Refresh_Data()
Dim qryTable As QueryTable
For Each qryTable In Worksheets("Yadda").QueryTables
qryTable.Refresh BackgroundQuery:=False
Next
End Sub

Public Function GrabUser() As String
Dim User As String
h = FindWindow("Notes", vbNullString)
If CBool(h) Then
On Error GoTo 1
GrabUser = NotesID
Else: GrabUser = Application.UserName
End If
Exit Function
1: GrabUser = Application.UserName
End Function

Private Function NotesID() As String
Dim Session As Object, MailDB As Object
Dim UserName As String, MailDBName As String
Set Session = CreateObject("Notes.NotesSession")
UserName = Session.UserName
MailDBName = Left$(UserName, 1) & Right$(UserName, _
(Len(UserName) - InStr(1, UserName, " "))) & ".nsf"
Set MailDB = Session.GetDataBase(vbNullString, MailDBName)
If Not MailDB.IsOpen Then MailDB.OpenMail
NotesID = Mid$(UserName, 4, InStr(1, UserName, "/") - 4)
Set Session = Nothing: Set MailDB = Nothing
End Function
Next, sub queries...

__________________
You can't polish a turd


Vice JDK
and Man of the People





Status: Offline
Posts: 5453
Date: Jun 23, 2004

So much for the pre tags I guess...

__________________
You can't polish a turd


I am the Jammie King!




Status: Offline
Posts: 12736
Date: Jun 23, 2004

Nate - did you notice that you can sing your code to the tune of Bohemian Raphsody, backwards?

__________________
The King has spoken... But nobody listened.


Vice JDK
and Man of the People





Status: Offline
Posts: 5453
Date: Jun 23, 2004

Thunderbolt and lightning - very very frightening




__________________
You can't polish a turd


Baaaaa.
No, really - Just Baaaaa.


Status: Offline
Posts: 1561
Date: Jun 23, 2004

I'll tell you what I do tomorrow (seeing as I'm relaxing at home now with Ebay and my ponys).

__________________
Argh Snake.


I ain't a Pirate and I ain't called Anne, but I sure am Bonnie!

(Mrs)





Status: Offline
Posts: 3266
Date: Jun 24, 2004

what exactly are you going to do with these ponies?

__________________
current location: Antrim. I like it.


I am the Jammie King!




Status: Offline
Posts: 12736
Date: Jun 24, 2004

At the moment, the game plan seems to be to put them in front of the clock on the mantelpiece. (grr)

__________________
The King has spoken... But nobody listened.


I ain't a Pirate and I ain't called Anne, but I sure am Bonnie!

(Mrs)





Status: Offline
Posts: 3266
Date: Jun 24, 2004

er.. do they not look a bit naff? (sorry vic )

__________________
current location: Antrim. I like it.


I am the Jammie King!




Status: Offline
Posts: 12736
Date: Jun 24, 2004

They look like My Little Ponies.  Naff is as Naff does.

__________________
The King has spoken... But nobody listened.


Baaaaa.
No, really - Just Baaaaa.


Status: Offline
Posts: 1561
Date: Jun 24, 2004

This is some of what I did today - As promised!!


 

#1


proc sql;

connect to oracle as ***** (user='Victoria Morrissey'
   password=****** path='crmdup_prod.xxx-xxxxxxx.co.uk' schema=siebel);

%put &sqlxmsg;


create table policy as select *
     from connection to craig
(select policy_no, prod_name, prod_grp_desc, cls_desc, vclass, curr_agnt,
orig_agnt, end_dt,
        eff_dt, salechnl_omega, fund_val_cur, birth_dt, fst_name, last_name,
zip_post_code,
          bvu, fund_name, fund_code, date_first_invested, date_last_exited,
inv_status


>From w_asset_dm a,
      w_asset_fact b,
      w_contact_dm c,
      w_geo_dm d,
      w_fund_dm_x@crmscore_prod e,
      w_fund_fact_x@crmscore_prod f



where  a.row_id = b.asset_wid and
        b.contact_geo_wid = d.row_id and
        b.contact_wid = c.row_id and
        a.row_id = f.contrib_wid and
        f.fund_wid = e.row_id and
       upper (status_cd) = 'LIVE' and
        (trim(salechnl_omega) = 'IFA' or trim(salechnl_omega) = 'SLBS')


);


%put &sqlxmsg;

disconnect from craig;
quit;


data policy1 (index = (curr_agnt));
set policy (where = (inv_status = 'Live'));

if ((curr_agnt = 'Unspecified') or (curr_agnt = '')) then curr_agnt = orig_agnt;

run;



data barclays;
set prod.w_crm_agency_dm_x (keep = agent_num ext_last_name1 ext_last_name2
                                   ext_last_name3 ext_last_name4 ext_zipcode1
                                   x_sib_num);

where ((upcase (ext_last_name1) contains 'BARCLAYS') or
      (upcase (ext_last_name1) contains 'WOOLWICH') or
      (upcase (ext_last_name1) contains 'SEDGWICKS') or
      (upcase (ext_last_name2) contains 'BARCLAYS') or
      (upcase (ext_last_name2) contains 'WOOLWICH') or
      (upcase (ext_last_name2) contains 'SEDGWICKS') or
      (upcase (ext_last_name3) contains 'BARCLAYS') or
      (upcase (ext_last_name3) contains 'WOOLWICH') or
      (upcase (ext_last_name3) contains 'SEDGWICKS') or
      (upcase (ext_last_name4) contains 'BARCLAYS') or
      (upcase (ext_last_name4) contains 'WOOLWICH') or
      (upcase (ext_last_name4) contains 'SEDGWICKS'));


run;


data barclays1 (index = (curr_agnt));
set barclays (rename = (agent_num = curr_agnt));

where x_sib_num ^in ('209569' '121864');

run;


data barclayspols notbarclays nopols;
merge policy1 (in = a)
      barclays1 (in = b);

by curr_agnt;

if a and b then output barclayspols;
if a and not b then output notbarclays;
if b and not a then output nopols;

run;


proc sort data = barclayspols force;
by vclass policy_no fund_name eff_dt birth_dt last_name fst_name zip_post_code;

run;


proc summary data = barclayspols;
by vclass policy_no fund_name eff_dt birth_dt last_name fst_name zip_post_code;
var bvu;
output out = sumbarclayspols sum=;
run;


data barclayspolicies;
set sumbarclayspols;

bid_val = bvu/100;

run;


data policynolist;
set barclayspolicies (keep = policy_no);

run;


proc sort data = policynolist force nodupkey;
by policy_no;

run;


#2



%macro m ;
filename thefiles ('J:Knowledge-MgtInsight TeamVickyDD Mailing*.csv') ;
data temp ;
length filename filenam lfilename $200 ;
infile thefiles filename=filenam  missover pad end=eof ;
retain filecount 0 ;
input x $3200. ;
filename = filenam ;
lfilename = lag(filename) ;
if filename ne lfilename then do ;
   filecount+1 ;
   call symput("file"!!left(put(filecount,best.)),filename) ;
   output ;
end ;
if eof then call symput("filecount",put(filecount,best.)) ;
run ;
%put &filecount &file1 ;
%*do i = 1 %to %filecount ;
%do i = 1 %to 85 ;
     proc import datafile = "&&file&i "
     out = l_vicky.drawdown&i
     replace;
     datarow = 2;
     getnames = yes;
     delimiter = ',';
     run;
%end ;
%mend m ;
%m ;



#3

Data agentlist;
set prod.w_crm_agency_dm_x (where = (ext_x_int_sales_channel1 = 'IFA')
                            keep = x_sib_num ext_last_name1 ext_last_name2
                                   ext_last_name3 ext_last_name4 ext_zipcode1
                                   ext_x_int_sales_channel1 ext_job_title1);

run;


proc sort data = agentlist noduprec;
by x_sib_num ext_last_name4;

run;

data agentlist1 notifa (drop = ext_job_title1);
set agentlist;

if ext_job_title1 in ('AR - Principal' 'CR - AR' 'CR - AR Principal'
                      'CR - AR Principal/Guarantor' 'CR - FC'
'IR/Principal/Guarantor'
                      'Introducer (FC)' 'AXA Company' 'AXA IFA Consultant - F2F'

                      'AXA IFA Consultant - Telesales' 'IAR - Introducer/Sole
Trader'
                      'IFA RI' 'IFA RI - A' 'IFA RI - O' 'IFA RI - OA' 'Location
- IFA'
                      'Sales Office - IFA' 'Senior Manager') then output notifa;

else output agentlist1;

run;


proc sort data = agentlist1 force;
by x_sib_num ext_last_name4 ext_last_name1;
run;


proc summary data = agentlist1;
by x_sib_num ext_last_name4 ext_last_name1;
output out = sumagentlist;
run;



__________________
Argh Snake.


Baaaaa.
No, really - Just Baaaaa.


Status: Offline
Posts: 1561
Date: Jun 24, 2004

The ponies are coo-ell - not naff (I promise they won't stay on the mantelpiece for ever!!).

__________________
Argh Snake.


Vice JDK
and Man of the People





Status: Offline
Posts: 5453
Date: Jun 24, 2004

Smokin' Vic (the work)!

I see a little sequential access in there, I think... What language is that, if you don't mind my asking?

__________________
You can't polish a turd


Vice JDK
and Man of the People





Status: Offline
Posts: 5453
Date: Jun 24, 2004


At the moment, the game plan seems to be to put them in front of the clock on the mantelpiece. (grr)






Hmmm, I should probably take my Christmas cards and decorations of my mantle...

__________________
You can't polish a turd


Baaaaa.
No, really - Just Baaaaa.


Status: Offline
Posts: 1561
Date: Jun 24, 2004

quote:

Originally posted by: NateO

"Smokin' Vic (the work)! I see a little sequential access in there, I think... What language is that, if you don't mind my asking? "

SAS mixed with a little SQL.  I can never make my mind up which to use so I mix them - much to my boss' confusion!!

__________________
Argh Snake.


I ain't a Pirate and I ain't called Anne, but I sure am Bonnie!

(Mrs)





Status: Offline
Posts: 3266
Date: Jun 25, 2004

vic, i conceed, the little ponies are indeed cool


that code on the other hand.. you guys are way too smart for me.. i did manage a javascript online quote calculator for a website i'm building.. but i mostly stole the code



__________________
current location: Antrim. I like it.


Baaaaa.
No, really - Just Baaaaa.


Status: Offline
Posts: 1561
Date: Jun 25, 2004

I don't know how to make a Java calculator KT - you're WAY cleverer than me!!!


Today I looked at some code, got the teas in 3 times, ate a cookie, joined the pants exchage and went home at lunchtime to practise for tomorrow's concert Argh!!


     



__________________
Argh Snake.
Joe


Ah Pity Da Foo!

Status: Offline
Posts: 602
Date: Jun 25, 2004

Pants exchange?

__________________
What was i doing before i came here again?


Baaaaa.
No, really - Just Baaaaa.


Status: Offline
Posts: 1561
Date: Jun 25, 2004

Well,


You know those pyramid things where everyone sends someone £300? 


It's the same but with pants & only 2 names.  I have a letter with 2 names & addresses on it 1 is Emily 2 is Leah.  I send Emily a pair of pants (she has put her size) with the tag on.  I then give the letter to 6 people putting Leah's name as 1 and myself as 2.  Those 6 people all have to buy Leah pants and pass the letter on to six people each with me as 1 and themselves as 2.  Potentially you could get 36 pairs of pants for the price of 1!!


It's just a bit of fun - will be funny to see what sort of pants come through the post!!



__________________
Argh Snake.


I ain't a Pirate and I ain't called Anne, but I sure am Bonnie!

(Mrs)





Status: Offline
Posts: 3266
Date: Jun 25, 2004

watch out leah doesn't steal some of your pants.. this is what stalkers do you know

__________________
current location: Antrim. I like it.


Vice JDK
and Man of the People





Status: Offline
Posts: 5453
Date: Jun 25, 2004

Who's Leah?

__________________
You can't polish a turd


I am the Jammie King!




Status: Offline
Posts: 12736
Date: Jun 25, 2004

Dunno.  Can't remember.

__________________
The King has spoken... But nobody listened.
1 2  >  Last»  | Page of 2  sorted by
 
Quick Reply

Please log in to post quick replies.

Post to Digg Post to Del.icio.us


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard