Update one field with another (which contains a timestamp)

Hello

I try to do what I thought, it was a simple task to update my db using the content of another, a field

in my tbl_profiles I have:

key | penSignedIn | lastSignedIn
73. 2006-05-19 21:14:56.0

I'm trying to update my table for the tbl_profiles.penSignedIn field is populated with the contents of tbl_profiles.lastSignedIn

< cfquery datasource = "nya" >
UPDATE tbl_profiles
SET PenSignedIn = #rs_user.lastSignedIn #.
WHERE profileID = 73
< / cfquery >

I get this error SEE "syntax error (missing operator) in query expression ' 2006-05-19 21:14:56.0'.»»

and says CF "" SQL: UPDATE tbl_profiles SET PenSignedIn = 2006-05-19 21:14:56.0 WHERE profileID = 73 ".

that looks ok to me! I have attached different formats such as
SET PenSignedIn = {ts ' #MM_rsUser.lastSignedIn # '}
SET PenSignedIn = #MM_rsUser.lastSignedIn #.
SET PenSignedIn = ' #MM_rsUser.lastSignedIn # '.

but none seem to not work that leads me into the wall! -can someone please point me in the right direction please

Thank you so much.
I have CF7 and database access

If you try just to update the content of the column penSignedIn with the contents of the lastSignedIn column in the same table, follow these steps:


UPDATE tbl_profiles
SET PenSignedIn = lastSignedIn
WHERE profileID = 73

Otherwise, if you try to use the value of a variable, maybe you create a date/time object:


UPDATE tbl_profiles
SET PenSignedIn = #createodbcdatetime (rs_user.lastSignedIn) #.
WHERE profileID = 73

Phil

Tags: ColdFusion

Similar Questions

  • Is it possible to update a query with another query?

    I'm trying to update a query with another query (see the attachment of the code). Here is my setup: I have a table in an Access database in which I enter a string in a form and an update. This string is a single record in another table in the same data source. The first table has one record to provide the second, which has many and will have more. Basically what I was asking is: is this a valid thing to do in coldfusion? If this isn't the case, please help with a method to alter. I'm still new to coldfusion.

    The overall effect, I'm going to do is to display a folder as a profile of truck recommended on the website: www.truckerstoystore.net. Currently, I get an error when I try to view the page with the current configuration of the query.

    Check out this page to see the error: www.truckerstoystore.net/currentTOW2.cfm

    Assistance in this matter is greatly appreciated.
    ------------------------------------------------------------------------------------------ -----------------------------------------------------------------------

    The owner of the column has a data type of character and thus the value must be in single quotes

    WHERE owner = "#Owner #

    But as your learning, I suggest using cfqueryparam

    WHERE owner =

    Ken

  • How to fill one shape with another shape, but not of models

    Hello

    How to fill one shape with another shape, but not of models. Example of this poster

    Screen Shot 2015-05-18 at 13.41.33.png

    put in a shape of the tree so that it looks like this:

    Heavy_type_tree.jpg

    Select your type with a vector path, which is the subject

    Object > envelope distort > make with top object.

  • Take the time to navigate from one field to another field or record to another record.

    Hi all

    We are facing a problem in our forms, when navigate us from one field to another field or move a recording to below the record in the block of retail then it takes 4 to 5 seconds to navigate.

    It's unusual behavior, sometimes it works very well and long takes the time to browse.

    Here's our environment:

    Server configuration:

    Oracle Fusion Middleware 11g (10.3.6)

    Oracle 11 g Release2 forms and reports services

    Oracle Database 11g Release2

    Client side:

    Browser = Internet Explorer (8.0.6)

    Java 7 update 45 (build 1.7.0_45 - b18)

    Kind regards

    Omer

    Questions about the customer like this are typically Java associate.  Have you tried to clear the Java Cache on the affected workstations?

    Craig...

  • How to replace one table with another?

    I need to replace one table with another. Both tables have the same structure, primary keys, indexes, constraints, but different data (about 50 million records).
    I would like to make this replacement in line, with no passage of database in offline mode.
    There is no clause CREATE or REPLACE TABLE in Oracle unfortunely.
    I could use just DROP and ALTER TABLE RENAME instructions, but it is necessary that a user receive message error "table or view does not exist. It may be possible to block incoming requests at the moment, while old and new droppping table rename are performed?

    Thanks in advance.

    Hi again!

    You can detect normal users with session sessions $ v. A session of a normal user has a username (username of the column). Systemsessions PMON and SMON have no user name. So, you can use the following query to detect sessions, you need to kill:

    SELECT sid, serial#, username
    FROM   v$session
    WHERE type NOT LIKE 'BACKGROUND';
    

    concerning

  • data from one field to another field of text on the next page

    Hi all

    Hi I have a form that contains data from the data binding, the thing is the data maps to a certain text field and if this field is filled in, it should continue on the text field located on the page immediately after this one. the reason for using the text field instead of subform and make repeating is that the customer does not change the position and the structure of other fields as a result of this area, they are OK with the amount spilled in the following text field.

    is there a script for the same disease in Java script or form Calc.

    Thanks in advance.

    de1209

    It is not as simple as it sounds. You won't be able to split the field during bonding time. The entire string must go on the ground and only after that he completed the biinding can change us around. A colleague of mine did for an interactive field and it's a very complicated code. Here is a link to his blog entry that describes what she did:

    http://blogs.Adobe.com/lcdesigner/2008/07/an_example_of_splitting_text_a.html

    But this is only part of the problem... once separate you the information in two areas that you need to recombine into one field that the data submitted can represent correctly again. If you reverse the process in a preparatory stage.

    Make sense?

    Paul

  • How can I update form field with data using "on Blur.


    Perhaps also very easy for all the experts out there that you but I'm trying to update a form field with data in another field in the form when they come out the first form field.

    Basically creating a "billing" and a form "shipping" I want to be updated automatically.

    Any help would be extremely Grateful.

    Thank you

    Steve

    He does!

    shipFirstNameText.value = this.value

    It worked

  • Trying to update a field with the RANK function

    Hello world

    I'm trying to update a field using a PL/SQL function rank. When I'm doing it, I get a "+ ORA-01427: einreihig subquery returns more than one row +", and it's just that sometimes I have the same value more than once.

    All the world is facing this issue before? I mean try to update a field using the RANK function?

    Please don't hesiate to contact me, if any additional information is required.

    Best regards.

    UPDATE spd_f_mkt_DC_2
    SET RANKING_ID =)
    SELECT PLUS RANK()
    (
    KPI_MKT_ID PARTITION
    ORDER BY F_MKT_KPI DESC
    )
    OF SPD_F_MKT_DC_2
    )
    UPDATE  spd_f_mkt_DC_2 a
       SET RANKING_ID = (
                         SELECT  rnk
                           FROM  (
                                  SELECT  ROWID rid,
                                          RANK() OVER(PARTITION BY KPI_MKT_ID ORDER BY F_MKT_KPI DESC) rnk
                                    FROM  SPD_F_MKT_DC_2
                                 )
                           WHERE a.ROWID = rid
                        )
    /
    

    SY.

  • update of column with another column with in the same table

    Hello
    We are using oracle 10g,
    I have a table with two columns i a s number one other data type is varchar2, varchar2 column contains
    numAriques and data type character I want to move only numAriques to the numeric data type field data, please kindly give answer

    Thanks and greetings
    tmadugula

    You are not providing any version of the database, sample data or table desc, but anyway:

    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:3083286970877 #49518312679214

    Something like:

    create or replace function is_num
    (p_str in varchar2)
    return number
    as
    begin
      return to_number(p_str);
    exception
      when others then return null;
    end;
    

    Which translates into:

    MHO%xe> select * from bla;
    
    MY_VA  MY_NUMBER
    ----- ----------
    AAAAA
    BBBBB
    11111
    22222
    CCCCC
    33333
    
    6 rijen zijn geselecteerd.
    
    Verstreken: 00:00:01.32
    MHO%xe> desc bla
     Naam                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     MY_VARCHAR                                         VARCHAR2(5)
     MY_NUMBER                                          NUMBER(5)
    
    MHO%xe> select * from bla where is_num(my_varchar) is not null;
    
    MY_VA  MY_NUMBER
    ----- ----------
    11111
    22222
    33333
    
    Verstreken: 00:00:01.73
    MHO%xe> update bla
      2  set my_number  = is_num(my_varchar)
      3  where is_num(my_varchar) is not null;
    
    3 rijen zijn bijgewerkt.
    
    Verstreken: 00:00:00.51
    MHO%xe> select * from bla;
    
    MY_VA  MY_NUMBER
    ----- ----------
    AAAAA
    BBBBB
    11111      11111
    22222      22222
    CCCCC
    33333      33333
    
    6 rijen zijn geselecteerd.
    
  • Why ps automatically replaces one font with another?

    I have a PSD with text block. any time I opened the file ps (5.5) replaces my police by another. I got this info 'some text layers may need to be updated before they can be used for vector output.  You want to update these layers now? »

    Two possibilities come to mind:

    1. the PSD file is a text layer that refers to a font that is not on your (most likely) system. If you are upgrading day and re - register (I recommend under a new name), the warning must away, but your text layers will have been activated using the substitute font. This could be allowed, or it might not, depending on your objectives and your needs. To dismiss the problem on the original file, you will need to find missing fonts and make sure that it is installed in your system. It's a good idea to restart Photoshop after the installation.

    2. one of the more fonts on your system are corrupt (less likely). There are procedures that you must follow in order to find, remove and replace or repair the corrupt police, depending on your operating system. A google search on "How do to find and fix corrupted fonts" should prove fruitful. I recommend you start by various Youtube videos.

  • How to update one column from another table

    Hello

    We have some sellers who are defined as employees but without employee_id for some reason any.  So I would like to update the correct number of a view of HR records.  Here is what I tried:

    update of po.po_vendors x

    Define employee_id = (select apps.per_people_v7 person_id y)

    where y.first_name |' '|| y.last_name = x.vendor_name)

    Error received: a row subquery returns more than one line.

    If I use this instruction to check, I'm correct employee_id or person_id home:

    Select apps.per_people_v7 person_id y, po.po_vendors x

    where y.first_name |' '|| y.last_name = x.vendor_name

    When I checked/compared with some old posts here, I could not just see where I did mistake.  Please notify.

    Thank you

    Ning

    Because for the same vendor id, you have a (employee id) id of the person twice in the target table. As Boneist said "fix data, difficulty of the request, fix the requirement...". »

    How many sellers are there in your target table?

  • updated two fields with a form

    I'm trying to update two tables mysql to a form.  The page includes the following:

    "A stock" quantity (from table A)

    A text form field (where I entered the used inventory)

    A drop-down list of article for "the inventory B' (from table B)

    I want to be able to enter a quantity in the text field and subtracts it A inventory and added to the inventory B.

    For example:

    Apples. (Table A)

    Quantity: 10

    Applesauce. (Table B)

    Total used: 3

    Used: 2 (from text form field)

    .. .to present, 2 will be subtracted from apples on site and added to... applesauce 8 apples and Apple Sauce 5

    A little more than you probably think Compliated. Here is an example of using mysqli that is much easier to work with and understand that code spewed out by Dreamweaver - more mysql code, it produces should not now be used because it is not supported in newer versions of php.

    connect to the database using mysqli

    <>

    get the id of the link and assign it to a variable - $apple_id

    $apple_id = $_GET ['id'];

    Get information about the dessert apples to apples

    $apple_information = $conn-> query ("SELECT * FROM apples WHERE id ="$apple_id"" ") or die ($conn-> error);

    $apple_information = $apple_information-> fetch_assoc();

    Get the recipe from the recipes table names

    $recipes = $conn-> query ("SELECT * from recipes") or die ($conn-> error);

    number of rows returned no

    $numRows = $recipes-> num_rows;

    Click on the submit form button, process the form information

    If (isset($_POST['USE'])) {}

    Get the amount of apples of form field

    $apples_used = $_POST ['apples_used'];

    If the QTY field blank form to print an error

    If (empty ($apples_used)) {}

    $error ["apples_used"] ="

    Please provide amount of apples required

    ";

    }

    get the recipe of the revenue table selection

    $recipe_choices = $_POST ['Recipe_Choices'];

    If no recipe printing and error

    If ($recipe_choices == 'Select recipe') {}

    $error ["recipe_choices"] ="

    Please select a recipe

    ";

    }

    are no errors of process information

    {if (! isset ($Error))}

    get the number of apples in the field quantity of stock and update

    $apples_in_stock = $conn-> query ("' quantity SELECT FROM apples WHERE id = ' $apple_id '" ") or die ($conn-> error);

    $apples_in_stock = $apples_in_stock-> fetch_assoc();

    $new_apple_total = $apples_in_stock ['quantity'] - $apples_used;

    $conn-> query ("UPDATE Apple SET quantity = ' $new_apple_total ' WHERE id = ' $apple_id '");

    get recipe update and quantity field name

    $apples_recipes = $conn-> query ("" SELECT id, amount OF revenue WHERE Name = ' $recipe_choices ' "") or die ($conn-> error);

    $apples_recipes = $apples_recipes-> fetch_assoc();

    $recipe_id = $apples_recipes ['id'];

    $new_recipes_total = $apples_recipes ['quantity'] + $apples_used;

    $conn-> query ("UPDATE revenue SET quantity = ' $new_recipes_total ' WHERE id = ' $recipe_id '");

    Get information from update on apples

    $apple_information = $conn-> query ("SELECT * FROM apples WHERE id ="$apple_id"" ") or die ($conn-> error);

    $apple_information = $apple_information-> fetch_assoc();

    }

    }

    ?>

    Untitled document

    USE OF APPLES

    echo $error ["apples_used"];

    }

    {if (isset ($Error ['recipe_choices']))}

    echo $error ["recipe_choices"];

    }

    ?>

    Apples:


    Recipe:

  • Synchronization of files, including updates, one catalog to another

    I have LR 4.4 and my primary LR catalog is on my desk at home.  All my photos are in this catalog.  What I like to do when traveling is to import photos from my camera in a LR catalog on my laptop.  The catalog and images are stored on an external USB drive of passport.  Everything on the road, I sometimes work on the new images - post processing, spotting, assessing, etc..  On their return, I would like to import the images from the passport reader in the primary catalog on my desktop - including the changes that I made the images on laptop.  With the help of 4.4 LR, I don't see an easy way to do it.  Am I missing something?  More recent versions allow this kind of thing?  Any help would be appreciated.  John

    You must look in file > import from another catalog. She puts your work in a catalogue that you use.

    There is a file > export as order catalog which creates a small catalog of photos of the week (for example) or a project. You can then take it with you.

    Another thing to look into newer versions of Lr is perceived intelligent. So I can generate smart glimpses of 7000 photos, copy my catalog with them on a portable drive, have a lot of editing ability before a trip and then copy the catalog on my main computer at the end.

    John

  • replace one image with another

    I have two images of the same radial venn diagram, created in Powerpoint. I caught the with Jing and create png: ILM_model and ILM_Mod1 (see images below).

    I want an image to blend into one another, so it seems that I am just pointing out the Center and support node. I tried simply fade on while the other fades in, but I get this weird distortion of red and yellow on the edges in the cross-fading. In addition, the image quality is deteriorated. I took a screenshot to show you.

    http://screencast.com/t/nygksaVXTJ

    ILM_model.pngILM_Mod1.png

    Check the quality setting on the slide/s where you have this diagram and the value of high quality.  Your screencast looks like you could use only the low quality (8 bits) at the present time.

  • How to replace one image with another

    I have a page that displays the results of a search for information about a club. One of the elements is the logo of the club. It is displayed by using the following code

    < img src = "<?" PHP echo $row_clubedit ["club_logo_url"];? ">" alt = "Logo of The Club" class = "logo" title = 'in the Club Logo">

    It works fine, except when no club has been selected, in which case it indicates the default polling point in a blue box.

    It would be nice if I could display the Logo of the Federation, to which all clubs belong, until a club is chosen.

    Y at - it a simple way to define a default image that would be replaced from a set of data.

    $row_clubedit ['club_logo_url'] contains the url in the log format http://www.Club.org/clublogo.PNG

    < img src = "<?" PHP echo ('federation_logo_url');? ">" alt = 'Logo of The Club' class = 'logo' title = ' The Club'c Logo ">

    The logic I guess would be

    If there is no such thing as club_logo_url

    then print the logo of the Federation,

    otherwise print the logo of the club.

    How you code that in php?

    I am only a beginner in PHP.

    "http://www.club.org/clublogo.png": $row_clubedit ['club_logo_url'];? "". ">" alt = "Logo of The Club" class = "logo" title = 'in the Club Logo">

    must be done

Maybe you are looking for