Sponsored Content
Full Discussion: SQL: copying data up
Top Forums Programming SQL: copying data up Post 303027267 by figaro on Wednesday 12th of December 2018 04:19:15 PM
Old 12-12-2018
This is what I have come up with in the meantime:
Code:
select * 
from (select events.*, case when in_event then @delta := level else @delta end delta from events, (select @delta := 0) e order by date) delta
order by date desc;

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

copying data to raw devices using 'dd'

Hello all, I'm new here, so this information may exist elsewhere on this forum. If so, please point me in the right direction. Here's the problem. I'm trying to migrate Oracle data from an HP system to a Sun system using a raw device as a 'bridge' between the two systems. Both machines... (4 Replies)
Discussion started by: Neville
4 Replies

2. Shell Programming and Scripting

Compress the contents of a directory while copying data into it

Hi guys I have a need to compress the contents of a directory while I am copying data into it. I was able to do this when it was only one file by doing as below: STEP1: mknod myfile p STEP2: chmod 777 myfile STEP3: compress -v < myfile > myfile.Z & STEP4: cp -p xyz_file myfile... (2 Replies)
Discussion started by: user1602
2 Replies

3. Shell Programming and Scripting

Copying data from excel file

Hii friends, I am a newbie to unix/shell scripting and got stuck in implementing a functionality.Dear experts,kindly spare some time to bring me out of dark pit :confused:.. My requirement is somewhat wierd,let me explain what i have and what i need to do... 1) there are several excel... (1 Reply)
Discussion started by: 5ahen
1 Replies

4. Shell Programming and Scripting

How to use sql data file in unix csv file as input to an sql query from shell

Hi , I used the below script to get the sql data into csv file using unix scripting. I m getting the output into an output file but the output file is not displayed in a separe columns . #!/bin/ksh export FILE_PATH=/maav/home/xyz/abc/ rm $FILE_PATH/sample.csv sqlplus -s... (2 Replies)
Discussion started by: Nareshp
2 Replies

5. Programming

Doubt in C programming (copying data from one file to another)

Hello, i'm new to the forum and so am i to C programming. Recently i've gotten a task to create a program that will read an existing .bin file and copy the data to a non existing (so i have to create it) .txt file (some type of conversion) Now, i now how to put the arguments, opening and... (5 Replies)
Discussion started by: Lyric
5 Replies

6. Programming

SQL: copying data down

I have a series of observations of which one column is sometimes missing (zero): date temp delta 1977 284.54 29.84 1978 149.82 0 1979 320.71 28.45 1980 176.76 0 1981 854.65 0 1984 817.65 0 1985 990.58 27.98 1986 410.21 0 1987 405.93 0 1988 482.9 0 What I would like to achieve is a... (8 Replies)
Discussion started by: figaro
8 Replies

7. Shell Programming and Scripting

Copying data from files to directories

I have the following that I'd like to do: 1. I have split a file into separate files that I placed into the /tmp directory. These files are named F1 F2 F3 F4. 2. In addition, I have several directories which are alphabetized as dira dirb dirc dird. 3. I'd like to be able to copy F1 F2 F3 F4... (2 Replies)
Discussion started by: newbie2010
2 Replies

8. Solaris

Copying data from one file server to another

Hello people, I have a question regarding transferring data from one file server to another. The server is a Solaris 9 box The old file server is connected via Ethernet cable, and the new file server we are switching is a Fiber channel. can I use the dd if=server:/app1 of=server2:/app1 ... (2 Replies)
Discussion started by: br1an
2 Replies

9. UNIX for Dummies Questions & Answers

Copying part of a data file into another

Hi, I have a large number of data files each containing simple integers from 1 to around 25000 in ascending order. However, they are not in a specific progression; some numbers are missing in each file. For ex. datfile1 may have the numbers in order 1 2 4 6 7 8 12 ... 24996 24999 while datfile2... (8 Replies)
Discussion started by: latsyrc
8 Replies

10. Red Hat

Copying data from USB CD Drive.

I need to perform operation as captioned. I found out USB CD Drive is attached, by running 'lsusb' command. I am trying to identify mechanism by which I could mount this USB CD drive to disk. After which I expect to copy the contents. Could anyone indicate how this could be performed ? (3 Replies)
Discussion started by: videsh77
3 Replies
atomic_add(3C)															    atomic_add(3C)

NAME
atomic_add, atomic_add_8, atomic_add_char, atomic_add_16, atomic_add_short, atomic_add_32, atomic_add_int, atomic_add_long, atomic_add_64, atomic_add_ptr, atomic_add_8_nv, atomic_add_char_nv, atomic_add_16_nv, atomic_add_short_nv, atomic_add_32_nv, atomic_add_int_nv, atomic_add_long_nv, atomic_add_64_nv, atomic_add_ptr_nv - atomic add operations SYNOPSIS
#include <atomic.h> void atomic_add_8(volatile uint8_t *target, int8_t delta); void atomic_add_char(volatile uchar_t *target, signed char delta); void atomic_add_16(volatile uint16_t *target, int16_t delta); void atomic_add_short(volatile ushort_t *target, short delta); void atomic_add_32(volatile uint32_t *target, int32_t delta); void atomic_add_int(volatile uint_t *target, int delta); void atomic_add_long(volatile ulong_t *target, long delta); void atomic_add_64(volatile uint64_t *target, int64_t delta); void atomic_add_ptr(volatile void *target, ssize_t delta); uint8_t atomic_add_8_nv(volatile uint8_t *target, int8_t delta); uchar_t atomic_add_char_nv(volatile uchar_t *target, signed char delta); uint16_t atomic_add_16_nv(volatile uint16_t *target, int16_t delta); ushort_t atomic_add_short_nv(volatile ushort_t *target, shortdelta); uint32_t atomic_add_32_nv(volatile uint32_t *target, int32_t delta); uint_t atomic_add_int_nv(volatile uint_t *target, int delta); ulong_t atomic_add_long_nv(volatile ulong_t *target, long delta); uint64_t atomic_add_64_nv(volatile uint64_t *target, int64_t delta); void *atomic_add_ptr_nv(volatile void *target, ssize_t delta); These functions enable the addition of delta to the value stored in target to occur in an atomic manner. The *_nv() variants of these functions return the new value of target. No errors are defined. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ atomic_and(3C), atomic_bits(3C), atomic_cas(3C), atomic_dec(3C), atomic_inc(3C), atomic_or(3C), atomic_swap(3C), membar_ops(3C), attributes(5), atomic_ops(9F) The *_nv() variants are substantially more expensive on some platforms than the versions that do not return values. Do not use them unless you need to know the new value atomically (for example, when decrementing a reference count and checking whether it went to zero). 13 May 2005 atomic_add(3C)
All times are GMT -4. The time now is 10:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy