473,322 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Need help with SQL to build a table with additional fields of a specific data type

I am using the following code within an Access database to retrieve data from Oracle and build a local table within the Access database.

DoCmd.RunSQL "Select Field1, Field2, " _
& "'' as StartDate, '' as Spare, '' as StartSalary" _
& " into tbl_TEST from [ADMIN.EMPLOYEE_INFO] " _
& "IN 'ODBC Database;' 'ODBC;DSN=ITSP;UID=Userid;PWD=pswrd;'"

This code builds the table called tbl_TEST with Oracle fields Field1 and Field2. The fields Startdate, Spare, and StartSalary are additional fields (not from Oracle) added to the table. This works well. With the exception of the data retrieved from Oracle, the three new fields are null. What I can't seem to figure out is how can I force StartDate to be date format and StartSalary to be a currency format.

Thanks in advance.
Nov 10 '06 #1
2 1197
ronverdonk
4,258 Expert 4TB
You are in the wrong forum. This is NOT a MySQL problem, I'll transfer this to Access.

Ronald :cool:
Nov 10 '06 #2
NeoPa
32,556 Expert Mod 16PB
In your SQL you tell the system (explicitly) that StartDate, Spare & StartSalary are set to empty strings (not nulls).
It is not possible to set up a field as adate format which you are assigning a string to.
Nov 11 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: sk | last post by:
I have an applicaton in which I collect data for different parameters for a set of devices. The data are entered into a single table, each set of name, value pairs time-stamped and associated with...
2
by: Wayne Wengert | last post by:
This is my first attempt to re-write an old VB6 application that exported a CSV file to a .NET application that exports an XML file with the equivelent data. I have limited understanding of OO...
8
by: Noesis Strategy | last post by:
I am attempting to build a database that profiles about 50 companies in a single industries. In a standard MS Word format, each profile would be about 20 pages of dense text and tables. In order...
3
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
11
by: my-wings | last post by:
I think I've painted myself into a corner, and I'm hoping someone can help me out. I have a table of books (tblBooks), which includes a field (strPubName) for Publisher Name and another field...
3
by: Miguel Dias Moura | last post by:
Hello, I am working on an Asp.Net 2.0 / SQL 2005 web project where: 1. All users must login. 2. There will be two user types: student and professor. The students and professors are not related....
4
by: Nathan Benefield | last post by:
I currently have a spreadsheet tracking votes on legislation in a matrix type format. It is something like this Name Act1 Veto1 Act1A Jones yes No Yes Johnson Yes ...
0
by: ward | last post by:
Greetings. Ok, I admit it, I bit off a bit more than I can chew. I need to complete this "Generate Report" page for my employer and I'm a little over my head. I could use some additional...
2
by: swethak | last post by:
hi , i write the code in .htm file. It is in cgi-bin/searches/one.htm.In that i write a form submitting and validations.But validations are not worked in that .htm file. I used the same code in my...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.