Forum Replies Created

Viewing 15 posts - 781 through 795 (of 2,452 total)

  • RE: Need to find new vehicle service records for last six months

    ok...so we have some test data that we can now all work on....

    USE Tempdb

    GO

    IF OBJECT_ID('tempdb..VehicleMaintenance', 'U') IS NOT NULL

    DROP TABLE tempdb..VehicleMaintenance ;

    IF OBJECT_ID('tempdb..VehicleTable', 'U') IS NOT NULL

    DROP TABLE...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Need to find new vehicle service records for last six months

    randyetheridge (4/20/2016)


    Ok Yes, your table create and insert statements are exactly correct.

    sorry missed the comment about the vehicle table.

    CREATE TABLE VehicleTable( unitid INTEGER NOT NULL ,vehiclename VARCHAR(13) NOT...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Need to find new vehicle service records for last six months

    randyetheridge (4/20/2016)


    Is that better information?

    see my previous post

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Need to find new vehicle service records for last six months

    In an effort to help you help us and also so that hopefully you will learn with any future posts that you make....here is my "guess" at what your sample...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Need to find new vehicle service records for last six months

    randyetheridge (4/20/2016)


    I attached a word document with my SQL code and an excel file with table data and expected results? When I say the pieces run, I mean if...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How toGet column name with changing value in SQL-server

    are you looking to write changes made in a table to an "audit" table.....

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Can someone help me with creating queries for the below information at the Earliest ??? Thanks in advance

    I see you have also posted this question here:

    http://www.dbforums.com/showthread.php?1708865-Can-someone-help-me-with-creating-queries-for-the-below-information-at-the-Earliest

    but on that site you have posted in the MySQL forum.....are you using MS SQL or MySQL?

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Data Conversion problem.

    Phil Parkin (4/19/2016)


    pvong (4/19/2016)


    Phil, thanks for your help.

    Jacob, I marked you as the answer because I learned how to do an error output file thanks to you suggesting it. ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Trigger for incrementing

    here is one way to get the results

    CREATE TABLE #yourtable(

    OrderId INTEGER NOT NULL

    ,SalesUnitPrice NUMERIC(13,2) NOT NULL

    );

    INSERT...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Trigger for incrementing

    fareedhmohamed (4/18/2016)


    No, I dont get that result that you are getting. How did you get the discount column price?

    Can I please say that thank you so much for trying to...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Trigger for incrementing

    fareedhmohamed (4/17/2016)


    Hi,

    Well, I would like to know how to create a trigger?

    Thanks,

    ok...but lets walk before we run (with triggers)

    given the following and according to your rules that an orderiD...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Trigger for incrementing

    fareedhmohamed (4/17/2016)


    Hi,

    Well thanks for the effort.

    Your suggestion works too. The only reason I added the product Name was for some clarification. To make sure it was pulling the right data.

    Thanks,

    ok...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Trigger for incrementing

    in an effort to help you move on and hopefully to use as a basis for any future questions that you post

    and we are nowhere near using triggers yet

    CREATE TABLE...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Trigger for incrementing

    fareedhmohamed (4/17/2016)


    Hi,

    I have attached the sample data from the query ad the order table.

    Thanks,

    ok...you have given yet another scree shot....please re read http://www.sqlservercentral.com/Forums/FindPost1778496.aspx

    now....what are you expecting?

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Trigger for incrementing

    fareedhmohamed (4/17/2016)


    Hi,

    Is this correct?

    SELECT COUNT(CustomerID), TotalQuantity, CustomerID, ProductName

    FROM [Order]

    GROUP BY TotalQuantity, CustomerID, ProductName;

    "is this correct".....maybe maybe not........

    in the absence of any sample data and expected results then I will guess...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

Viewing 15 posts - 781 through 795 (of 2,452 total)