Re: Tricky Delete Problem

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



So, if you have two rows with values
1;2;_;4;_
2;_;_;_;_

Do you want to delete just column 5 (based on the first row) or do you want
to delete columns 2 through 5 (based on the second row).
In a table (or query), you can only "delete" entire columns.


"Ida" <idta@xxxxxxxxxxx> wrote in message
news:1132118980.010810.48750@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi there, I've got another tricky problem.
>
> I have a table with 5 columns. Columns are called 1, 2, 3, 4, 5.
>
> One case:
>
> Columns 1 and 3 have numbers in them. Columns 2, 4 and 5 do not any
> data at all.
>
> I want to be able to delete columns 4 and 5 because those are the last
> two columns without data. Although column 2 does not have data, I want
> to keep it because it's before a column that does have data.
>
> Another case might be that only column 2 has data. I then would want to
> delete columns 3, 4 and 5. I want to keep column 1.
>
> Any ideas on doing this with CODE?
>
> I probably want to sum the columns and find the ones that equal 0. Then
> have a variable that keeps track of the column name that last had no
> data. Then I would delete the columns from that point on to the end of
> the table.
>


.



Relevant Pages

  • Re: wrong output from Join
    ... > I need to calculate the sum of tablespace's size and its free size. ... >This query is givien wrong output. ... Sybrand Bakker, Senior Oracle DBA ... Prev by Date: ...
    (comp.databases.oracle.server)
  • Display Only First Record of Repeating Records?
    ... I'd like to create a query that only displays the first row of the repeated ... never have the same service twice). ... Prev by Date: ...
    (microsoft.public.access.queries)
  • Please help total working hours/min??
    ... using Access how would i go about creating a query that will sum up the ... I would be realy greatful if someone could help me with this problem. ... Prev by Date: ...
    (microsoft.public.access.reports)
  • Using Format on summarizing
    ... FROM table1; ... But if i want to calculate the sum of this field with the specific format.... ... this means...the query becomes: ... Prev by Date: ...
    (microsoft.public.access.queries)
  • Re: Count on a yes/no field
    ... >I am using Access 2002 and I have a query that I would like to count a ... that will give you -103 as a sum. ... The minus sign will ... Prev by Date: ...
    (microsoft.public.access.queries)