Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft Excel 1

Status
Not open for further replies.

cfcProgrammer

Programmer
Mar 1, 2006
88
CA
Hi I am trying to create a statement using data from excel cells...

Here is the statement I am trying to create... all of it is text except for the info I am requesting be replaced by the data in the cells.

I have 1000 of these to run so once I get this statement created I will then copy down the column for all 1000 records


"Insert into nms_mobile_id_event (SERIAL_NUM, IMSI, BILLABLE_MOBILE_ID, EVENT_TYPE_CODE, SDATE, EDATE, USER_ID, EVENT_DT)
Values(=""'""&B2&""'"", ""'""&A2&""'"",""'""&C2&""'"", 'TS', TO_DATE('12/14/2009 11:13:46', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/3000 23:59:59', 'MM/DD/YYYY HH24:MI:SS'),'COLLEENC', sysdate);"

Please Help, I am not a proficient excel user! :)

Colleen


cfcProgrammer
 
Hi,

What's not working?

You stated that you are trying to create a statement. I think you mean an SQL statement. So what kind of DB are you updating?

Please answer both questions.
 
Yes you are correct I am trying to create a sql statement but all I am trying to do in this situation is take the data in A2, B2 and C2 cells and put them in the statement I have. I don't have an issue with SQL just trying to get the data from these cells into this statement at this point.

cfcProgrammer
 
The data from the cells is not being populated into the statement


"Insert into nms_mobile_id_event (SERIAL_NUM, IMSI, BILLABLE_MOBILE_ID, EVENT_TYPE_CODE, SDATE, EDATE, USER_ID, EVENT_DT)
Values(=""'""&B2&""'"", ""'""&A2&""'"",""'""&C2&""'"", 'TS', TO_DATE('12/14/2009 11:13:46', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/3000 23:59:59', 'MM/DD/YYYY HH24:MI:SS'),'COLLEENC', sysdate);"

I thought the highlighted area would populate the data from the cells but it's not... I'm just wondering what I have done wrong in the excel formula syntax

cfcProgrammer
 
[tt]
="Insert into nms_mobile_id_event (SERIAL_NUM, IMSI, BILLABLE_MOBILE_ID, EVENT_TYPE_CODE, SDATE, EDATE, USER_ID, EVENT_DT)
Values(='"&B2&"', '"&A2&"','"&C2&"', 'TS', TO_DATE('12/14/2009 11:13:46', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/3000 23:59:59', 'MM/DD/YYYY HH24:MI:SS'),'COLLEENC', sysdate);"
[/tt]
 
Thank you thank you thank you!!!!!!!!!

works perfectly... lol :)

cfcProgrammer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top