473,322 Members | 1,425 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.

Flag in SQL

92
Hi,

Is there any Flag function in SQL Server. I want to set Flag=1 at 1st time entry. if i change that value or edit its value same record values, it's value should become 2.
I dont Know whether itz front end work or SQL holds any Flag function. So, can any one suggest me.

Thanks in Advance.
May 24 '08 #1
4 5502
debasisdas
8,127 Expert 4TB
You need to add an additional field to database and keep that updating as per your requirment.
May 24 '08 #2
Limno
92
You need to add an additional field to database and keep that updating as per your requirment.

Thanks for replying me,

Can u give me more explanation to this. yes i m hving one field has Flag. But i dont know hw to do this.

Can u explain me with Query Example. Please.

Limno
May 24 '08 #3
debasisdas
8,127 Expert 4TB
You need to write a trigger for the purpose.
May 24 '08 #4
ck9663
2,878 Expert 2GB
1. Create a field on your table for this flag.

2. Set the default value of this field to 1.

3. Create a trigger that will handle the replace of the value for this field for every update or delete.

-- CK
May 25 '08 #5

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

Similar topics

42
by: Shayan | last post by:
Is there a boolean flag that can be set atomically without needing to wrap it in a mutex? This flag will be checked constantly by multiple threads so I don't really want to deal with the overhead...
3
by: mrhicks | last post by:
Hello all, I have a question regarding efficeny and how to find the best approach when trying to find flag with in a structure of bit fields. I have several structures which look similar to ...
2
by: Blue Man | last post by:
Hello I want to create a link that open and close a panel. but i can't save a variable as a flag to test each time if the panel is open or not, this is my code : int flag=0; private void...
1
by: Uri Dimant | last post by:
Hi,friends I meant Flag on text editor. It allows you to move from flag to flag only within one class/module. If you put another flag within different module/class in the same project then it...
3
by: Jim Archer | last post by:
Hi All... I'm been fighting this problem for a few days now, and it seems like it should be simple. But the solution has eluded me so far... I need to flag a record when it is updated or when...
2
by: Bernd Hohmann | last post by:
I need a control break flag in my result when a certain value is different to the previous. A table/result like this: PRODUCER ARTICLE 80000 1 <- flag = 1 80000 2 <- flag = 0 80000 ...
1
by: dotnetnoob | last post by:
let's say i have a arraylist that contain 1 1 0 1 this arraylist serve as a flag if the value inside the arraylist is 1 then that mean it's on and if it's 0 then it's off so i got this code ...
1
by: rpapaiof | last post by:
is it possible to write the same program wit same commands without flag and also please describe flag #include <stdio.h> int main(void){ int j,n,i,flag; printf("Please enter a number :...
2
by: Efi Merdler | last post by:
Hello, As I understand it is impossible in xslt to change the value of a variable after you assigned a value to it. I would like to simulate a flag. For example if something happens in template...
0
by: spima05 | last post by:
Hello I am working on a database to track sales reps involved on a sale. I would like to flag the sales rep that initiated the sale but read that creating fields used to flag are not...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: 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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.