Field With No Data Insert 0's

Mar 27, 2006

When the IVA_MEMBER_ID field has no data I would like this query to return : 000000000,
is this possible and if so could you show me how? Thanks

SELECT DISTINCT
NOLDBA_INT_MEMBER_DEMOGRAPHIC.IVA_MEMBER_ID,
NOLDBA_INT_MEMBER_DEMOGRAPHIC.MEM_SSN,
NOLDBA_LOG_DISBURSEMENT_DETAIL.AMT_DISBURSE,
NOLDBA_LOG_DISBURSEMENT_DETAIL.CD_TYPE_DISBURSE,
NOLDBA_LOG_DISBURSEMENT_DETAIL.SEQ_ORDER,
NOLDBA_LOG_DISBURSEMENT_DETAIL.SEQ_OBLIGATION,
NOLDBA_LOG_DISBURSEMENT_DETAIL.ID_CASE INTO [A TBL]

FROM NOLDBA_LOG_DISBURSEMENT_DETAIL INNER JOIN
(NOLDBA_INT_CASE_MEMBER INNER JOIN
NOLDBA_INT_MEMBER_DEMOGRAPHIC ON
NOLDBA_INT_CASE_MEMBER.MEMBER_ID = NOLDBA_INT_MEMBER_DEMOGRAPHIC.MEMBER_ID) ON NOLDBA_LOG_DISBURSEMENT_DETAIL.ID_CHECK_RECIPIENT = NOLDBA_INT_CASE_MEMBER.MEMBER_ID

WHERE (((NOLDBA_INT_MEMBER_DEMOGRAPHIC.MEM_SSN)>"0") AND ((NOLDBA_INT_CASE_MEMBER.RELATION_CODE)="C") AND ((NOLDBA_LOG_DISBURSEMENT_DETAIL.CD_CHECK_RECIPIEN T)="1") AND ((NOLDBA_LOG_DISBURSEMENT_DETAIL.DT_DISBURSE) Between [START DATE] And [ENTER END DATE]))

ORDER BY NOLDBA_INT_MEMBER_DEMOGRAPHIC.IVA_MEMBER_ID;

View Replies


ADVERTISEMENT

Queries :: How To Insert Data In Text Field At The Beginning

Sep 21, 2013

I created an update query to a text field in a table. However, it inserts the data at the end of the string and I need to insert it at the beginning of the string that already exists. How do I move it to the front instead of the end?

This works but puts it at the end:

[Field Name] & "BlahBlah"

View 4 Replies View Related

Insert New Field With Specific Data Type In The Table?

Apr 24, 2014

i wanna to insert a new field in the table ... which fill automatically with the date in which i modified the data in this record ...and then i'll insert this field in a report

View 1 Replies View Related

INSERT Query - Insert New Data Only

Jul 2, 2010

Table TBL_NEWDATA is used to append new data to table TBL_PERSON_ALLOCATIONS.

TBL_NEWDATA { Person_ID, Department_ID }
TBL_PERSON_ALLOCATIONS { Person_ID, Department_ID, ... }

I need to devise a query to append data for a particular Department_ID from TBL_NEWDATA to TBL_PERSON_ALLOCATIONS where that data does not already exist there. i.e. for Department_ID 'Research', I would want to append 'Person_ID', 'Department_ID' (in this case: 'Research') to TBL_PERSON_ALLOCATIONS for any tuples not already held.

INSERT INTO TBL_PERSON_ALLOCATIONS (Person_ID, Department_ID)
SELECT Person_ID, Department_ID
FROM TBL_NEWDATA
WHERE TBL_NEWDATA.Department_ID='Form...'

[code]...

This Query takes a single argument from a control (Forms!Main!IN_Department), and this is the Department_ID to be updated.Is there any way to do this using a single query or will I have to use sub queries? I'd hoped not to as to keep the database as concise as possible.

View 2 Replies View Related

Modules & VBA :: Take Data From One Table And Insert Into Another Whilst Doing Calculations On Data

May 2, 2014

I am trying to use SQL to run queries in our access database in order to (hopefully) speed things up. I'm trying to create code that basically takes data from one table and inserts it into another whilst doing calculations on the data.

However I can't get past this:

Code:
Private Sub Test_Click()
Dim strSQL As String

strSQL = "CREATE TABLE [TempRedAmberGreen]" & _
"AS (SELECT " & _
"[ID_CHK] String," & _
"[Red] String," & _
"[Amber] String," & _
"[Green] String)" & _
"FROM [035 - Meter Point HH Data];"
DoCmd.RunSQL strSQL

End Sub

It keeps saying "Run-time error '3292': Syntax error in field definition.

View 4 Replies View Related

Forms :: Insert A Field That Sums Up / Aggregate All Values Of Field

Jul 25, 2014

i want to add a control in that form that sums up and aggregate all the values of field called [amount] based on the value of [Name_Patient] as criteria

View 2 Replies View Related

Insert Data Based On Other Data

Feb 20, 2006

I'd like to create a query that would do something like the following:

If Code="A" then ProdType="Accessory"
If Code="BS" then ProdType="Blank Stock"

etc.

Can this be done without creating a query for each instance?

Thanks.

View 2 Replies View Related

INSERT Data To MS Access Via SQL?

Dec 13, 2004

HI all-

I have a list of INSERT statements (SQL DML) and I wish to insert this data into an MS Access 2000 table

Unfortunately I cannot find a mechanism to accomplish this in Access. Does one exist? How can I import this data into access in a SQL format?

Thanks in advance!

View 6 Replies View Related

How Do I Insert Data From One Table To Another?

Mar 7, 2007

I want to set my insert such that

Insert into tableA (x,y,z) = (SELECT x,y,z FROM tableB)
WHERE NOT EXISTS (select x,y FROM tableA,tableB WHERE tableA.x = tableB.x AND tableA.y = tableB.y)

Basically I want to insert data in tableA from tableB if it does not exist in tableA yet.

Access says I'm not writing an updateable query.

View 1 Replies View Related

How To Insert Data Into External Db

Apr 28, 2005

Hi experts. I want to learn how i can insert data in to external db using vba.
For example , i want insert table names in to the external db.
(A command button in a form )I be happy if some one show me how. Thanks

View 2 Replies View Related

Can't Insert Data Into Textbox?????

Jun 15, 2005

why do i get all the weird problems?
does anyone have any idea why a textbox would act like it was locked, even though it's not?

anyway, the text box works fine, until i click my button which goes to a certain record based on my listbox. the code for the click event is as follows:

Code:Private Sub cmdFindProcess_Click()blnexist = True Dim rst As dao.Recordset Dim strSearchName As String Set rst = Me.RecordsetClone strSearchName = Str(Me!List26.Value) rst.FindFirst "ID = " & strSearchName Me.Bookmark = rst.Bookmark rst.Close If Me.List26.ItemsSelected.Count = 0 Then MsgBox "Please select your process", vbOKOnlyElseMe.formattedtimeelapsed.Visible = True Me.StartTime.Visible = True Me.EndTime.Visible = True Me.btnStartStop.Visible = True Me.btnStartStop.SetFocus Me.StartTimeLabel.Visible = True Me.EndTimeLabel.Visible = True Me.InProcess.Visible = False Me.Current.Visible = True Me.NewProcess.Visible = False Me.hidID.Value = Me.List26.Value Me.formattedtimeelapsed.Value = "00:00:00" Dim Rc As dao.RecordsetDim Db As DatabaseDim SQL As StringSQL = "SELECT * FROM StopwatchRecord Where StopwatchRecord.ID=" & Me.List26.Value & ";"Set Db = CurrentDb()Set Rc = Db.OpenRecordset(SQL)Rc.MoveFirstMe.hidID.Value = Rc.Fields("ID")TotalElapsedMilliSec = Rc.Fields("ElapsedTime")Me.ElapsedTime.Value = Rc.Fields("ElapsedTime")Me.Comments.Value = Rc.Fields("Comments")Me.StartTime.Value = Rc.Fields("StartTime") Me.txtProcessDisplay.Value = Me.List26.Column(3) Me.txtActNumberDisplay.Value = Me.List26.Column(1) Me.Comments.Enabled = False Me.txtAdditionalComments.Visible = True Me.txtAdditionalComments.Enabled = True Me.txtAdditionalComments.Locked = False End If End Sub
my guess is that the "bookmark" code is not allowing it. i'm not sure however, how i could find the record any other way, if that is the problem....any suggestions would be greatly appreciated.
thanks in advance,
*j

View 2 Replies View Related

Insert Data Into A Subform

Jul 29, 2015

I have a form with a sub form, on the main form I want the user to select a machine number and then when they have selected it I want to populate the required data into the sub form.

In the sub form I have a field called "Seal" and another called "Quantity" what I require is to get the results from either a query or table and list all the seals & quantities for that machine.

I have a table called "Machine" which has all the machine numbers and also fields called "Seal1", "Seal1Qty","Seal2, "Seal2Qty" all the way to Seal 10.

I do not know how the best way to get this data into the sub form...

View 5 Replies View Related

Insert A Line Of Data In A Subform

Jul 11, 2007

Hi,
I have a form which records computer faults reported by users. On this form there is a subform for comment tracking eg. Phoned user, Date/Time. On the next line would be; Informed user to do this, Date/Time and so on. I have a button on my form which I would like to use to automatically put in a line of data. It is an aknowlegde fault button. What it hopefully would do is when you click the button it will automatically put in the date/time in the subform, Then the word "acknowledged" in the comment field, then prompt for the user name ( for the username field).
I am not sure on how to start the command. If i were to do it in the same form then I would just put something like;
me.Date.Value = Date()
me.Comment.value = "Acknowledged"
me.Username.value = "[Prompt]"

As you can see I have two problems though;
1. The data has to be entered in a subform
2. My Prompt I dont think will work.

Does anyone have any ideas?

Kind Regards
Keith

View 1 Replies View Related

Auto-Insert Data On Export?

Dec 1, 2007

when I am exporting in fixed width format (.txt file), is it possible to automatically include in the outputted text file:

a header of the current date and time, and
a footer that will say how many records are in a certain table?

edit: when i say header and footer, I mean the first and last entries in the text file

thanks
Venom

View 1 Replies View Related

Insert Data From Queries To A Table

Apr 29, 2008

Is it possible to select some data in queries in the same db to a table?

Many thanks!

View 3 Replies View Related

Insert Into Mdb From Selected Data From SQL Database

Sep 14, 2004

My application extracts data from a SQL server according to some filters and put it in a local database (MS Access), I actually do it in two steps, data extraction and loop tru the data sending it to MS Access with insert values instruction, is there a better way to do it (the routine is too slow for large databases, the string convertion make it slow I beliebe)?, I was thinking on something like "Select into", but I am not copying a database and I need to add 2 more columns to the database (add fields that you have at the moment to make the select but aren't on the database and were needed to make the selection).

Tanks

View 1 Replies View Related

Insert Data In Excell File

Jan 17, 2005

i would like to create an excell file (and choose the path) in ms access
and fill that excell file with data divided over multiple sheets

or even if possible take an excell template and fill it with data, then rename
and save it

any suggestions?

View 8 Replies View Related

General :: Insert Data Of One Table To Another?

Mar 10, 2014

Inserting data from History Table LIKE "P" Type into Preventive Maintenance Table and LIKE "R" Type into Repair Table.

I don't quiet get it because it says "PM Data Update" but nothing happened. Below is the code:

Code:
Private Sub cmdUpdate_Click()
Dim strSQL
Dim dbMNT As Database

[Code].....

View 6 Replies View Related

Forms :: Insert Data Into Another Form

Oct 3, 2013

I have a combo box Customer_Name on Order Form; and I want it open the Customer Form when an user insert a new customer to input all data. This seems simple at first, but problems are these:

1- whenever an user opens Customer Form on a new customer, the user would have to make the input once again (at least retype the customer's name on the field).

2- since the Customer_Name and other fields are required in the table, the Order_form would not allow the user to close it unless all field are filled properly.

Dilemma is you have to fill in the Customer_Name field before the table refresh all records and display it in the combo box on Order Form

View 13 Replies View Related

Insert Field In Query

Jan 17, 2006

I am executing a query and I want to force a value of ALL into a additional field called BUKT. How would I go about this. I need to do something similar to DATE: Now() but with a set value.

Help!!

View 3 Replies View Related

Insert Value To Empty Field

Nov 24, 2004

Hi, I have a very junior question here but I cannot able to figure it out.

I'm writing a query on Access database, that will basically merge a table and a result from another query. Here's the result of the query

field1--field2--field3--field4
sdf -- 34654-- 234 --sdf
sdf -- empty-- 234 -- sdf
sdf -- empty-- 354 -- sdf
sdf-- 76456 -- 902 -- piof

My question is, is there anyway on the query, I can write something so that I can insert a "0" into those empty field in that partically one field? That field2 is a "Number".

anyway help is highly appreciated.

View 2 Replies View Related

Table Lookup And Auto Insert Data

Nov 24, 2007

Hi All
I am new to this, hope you can help!!

I have 2 tables,
Customers and Routes
I want to auto insert data from Routes when I select the route Number from Customers,

the tables to auto update are
CruiseNumber:
CruiseName:
CruiseDate:

from
RouteNumber:
RouteName:
RouteDate:

I have read HELP in Access but I am a layman when it comes jargon. 'from the many to the few'??
Hope you can help....in 'Plain English'

View 6 Replies View Related

Insert Data In Two Related Tables Simultaneously

Dec 11, 2004

I want to insert a huge number of data (Customer and their adress) into 2 related tables in Access. Each table in access is related by some kind of ID (Autonumber-Primary key). The first table is CUSTOMER , the other one is CUSTOMER_ADRESS . Access relate each Customer to his Adress, so if I import data into one table and then import data into another table how would the database know that all the data pertains to the same person. How to insert the new list of customer and adress without using a form?
Thanks for your help.

View 6 Replies View Related

General :: Insert Data Mismatch Error

Jun 21, 2015

PHP Code:

Dim strSQL As String    'Add Absence Data to tblHour.
strSQL = "INSERT INTO tblHour (WorkDate,EmployeeID,Hours) "
strSQL = strSQL & "VALUES (#" & Me.AbsenceDteTo & "#, '" & Me.EmployeeID & "', '" & Me.txtAbsHrs & "')"
        CurrentDb.Execute strSQL, dbFailOnError

[Code] ......

View 3 Replies View Related

Reports :: How To Insert Data To Table From Report

Jun 9, 2014

I have a report, which is based on query that links various table.

There is also a form, which starts when the report opens, which has dual function: 1.) user selects criteria to filter out only particular customer but 2.) is for user to add some new data that are not available in query/linked tables.

I need to be able to create now a command button that would add all records from the report to for example 'Report Table'. My report has a tabular form but I have also lots of text-boxes in Report Header that would need to be added too.

View 4 Replies View Related

Forms :: How To Insert Data By Clicking Button

Feb 11, 2014

I am new with ms Access. I am using 2013 version and stuck with "pretty" easy task.

When I create the form, the values are inserted/updated constatly as I leave the input components. However I would like to insert/update the record only when I click the button. How to do that?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved