New Colum

Jan 9, 2007

I have a large table t1 contain record like that

Id purchase advance date
------
2345 $22333 $3455 12/25/2006
-----


I want to create a new column to label week information
if dec 11 2006 =<date <=dec 15, 2006 week=week4
if dec 18 2006 =<date <=dec 22, 2006 week=week3
if dec 25 2006 =<date <=dec 29, 2006 week=week2
if Jan,1 2007 =<date <=Jan 5, 2007 week=week1
if Jan, 8 2007=<date <=today, 2007 week=week0

How can i do that using sql?
Thanks in advance

View Replies


ADVERTISEMENT

Add New Extension In The Records Of A Colum

Feb 12, 2008

I am new here and dont know much about access but I have to do some things.

I have a table filled in access. This table (dlb_tbl) contains serveral colums. One colum named "type". The records of this colum has to be changed like this:

one record: 0RD00S101
this has to be changed into: EDH01-RD00S101

So there has to come a new extension EDH01- and the 0 has to be deleted. This has to be done to the whole colum. How can I make a query to do this?:o

View 4 Replies View Related

Queries :: How To Split Colum Value (with Comma) To Multiple Columns

Mar 8, 2015

how to split this , I am new Access DB, I worked in Sql Server but access new to me

I have the below data

Appid Names
100 John,Bob,Kondya, Lima
200 Shor,James,Kim
300 Cinem

I want to convert to

Appid Names Name1 Name2 Name3 Name4
100 John Bob Kondya Lima NULL
200 Shor James Kim NULL NULL
300 Cinem NULL NULL NULL Null

View 2 Replies View Related

How To Move Data From One Colum By Data Position To Other Fields

Dec 19, 2006

Hello Tech gurus,

I have a database with existing data, that is not normalized, and all the data is in one field...:eek: This what I am dealing with:

As you notice the first row of data in field1 C10A CHOLEST&TRIGLY has 3 spaces to the right the next row ALTORVASTIN has five spaces to the right, the next line LIPITOR has 7 spaces to the right, and so forth, hopefully you get at what I am trying to do, I just looked at the data and it is not showing up in view of the leading spaces, but I am trying to move the data based ONLY one the position of leading spaces, example all data that has 3 leading spaces would go into its own separate column, and all data that has 7 leading spaces would go into a separate column, I have tried to use the left, mid, len functions but I cannot figure out how to move the text and keep it whole only by data position of spaces.

Field1:
C10A CHOLEST&TRIGLY
ATORVASTATIN
LIPITOR
PFIZER
SIMVASTATIN
SIMVASTATIN TEVA
TEVA
M1A ANTIRHEUMATIC N-STEROID
ETODOLAC
ETOPAN
TARO PHARMA
Thanks so much for your help... :confused:

Nana :D

View 12 Replies View Related

Form Laout - Matrix (row Heading, Colum Heading)

Oct 23, 2006

Hi all, this is my first post.


i have created a simple access database for keeping student and attendance record.

student table fileds are:

studentId - primary key
forname
surename
dob
gender
accademic year

attendance table fields:

studentid - primary key
date - primary key
attendance (yes/no boolean field)
paid (yes/no boolean filed)

this database is just ment to keep records of students attending at particualr dates.

for example if attendance table cotain records like:

http://www.crazyanime.pwp.blueyonder.co.uk/table.JPG

for the form layout, what i want to do is

http://www.crazyanime.pwp.blueyonder.co.uk/form.JPG

i want this to be editable. how would i do this using access form, or do i have to wrtite VBA code

PLUS i want the form to automatially have new records when i add for example a student, with ID 10011 OR if i add new records for a different date say 11/11/2006, then i want that to be viewd on the form just like the 21/09/2006 and the 04/11/2006.

please help :) been looking for a solution for long time.

thanks

View 4 Replies View Related

Combo Box Multiple Colums As One Colum In Combo

Mar 28, 2006

Hello

I have had a look through the forum and I am not sure if this can be done. I have a table. i.e. with columns Decsription 1, Cost 1, Description 2, Cost 2 Description 3, Cost 3 description 4, cost 4 etc.

I am looking to try and gave a combo box show this information as follows. I.e

Colum 1 on Combo; Column 2 on Combo

Description 1 Cost 1
Description 2 Cost 2
Description 3 Cost 3
Description 4 Cost 4

I want to be able to auto fill some fields on a form based on the combo box selection.
Has anyone done this before and can it be done.

Thanks

View 1 Replies View Related







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