Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

Justiin1265

@Justiin1265
About
Posts
12
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How do I join for tables together?
    J Justiin1265

    Hi, I have to join four tables together and am having trouble. My query as it stands is returning data, but it's not the data I need. I do not think I have all four tables joined together correctly. How would I join the tables properly? Thank you. Justin I need to join the CXADMIN.RO_FAILURE_DTL RF, CXADMIN.RO_HIST RH, saadmin.sa_repair_part@elgsad rp, and saadmin.sa_code_group_task_dtl @ELGSAD cg tables together. Here is my query so far:

    SELECT distinct RF.REPAIR_ORD, RH.RECV_UNIT, RH.RECV_SERIAL_NBR, rf.created_date, RP.FAULT_CODE, RP.REPAIR_ACTION_CODE, cg.task_code
    FROM CXADMIN.RO_FAILURE_DTL RF, CXADMIN.RO_HIST RH, saadmin.sa_repair_part@elgsad rp, saadmin.sa_code_group_task_dtl @ELGSAD cg
    WHERE RF.REPAIR_ORD = RH.REPAIR_ORD and Rp.REPAIR_ORD = cg.REPAIR_ORD
    AND RF.FAILURE_CODE ='DISK'AND RH.CURR_FACILITY_ID ='23' AND RF.CREATED_DATE >'1-JUN-2010' AND RF.CREATED_DATE < '1-dec-2010'
    AND (CG.TASK_CODE ='PHMD' OR CG.TASK_CODE ='PHSN' OR CG.TASK_CODE ='CHMD' OR CG.TASK_CODE ='CHSN')

    Database question database

  • How do I to mass update date and time?
    J Justiin1265

    Thank you. It worked!

    Database database help question tutorial announcement

  • How do I to mass update date and time?
    J Justiin1265

    Hi, I have to query an update for date and time. I know how to update the date alone, but I am having trouble with adding the time to the function. Right now, as it stands, it reads 4/20/2011 1:32:07 PM. I need the dock_date field to read 4/21/2011 7:00:00 AM. When I add 07:00:00 AM to the query I receive a DB error of: ORA-01830: date format picture ends before converting entire input string. Can someone please help me? Thank you, Justin I am joining two tables: cxadmin.ro_hist and cxadmin.ord_dtl and use the in function b/c I have to update multiple rows. My query so far is:

    UPDATE cxadmin.ro_hist
    SET DOCK_DATE = '20-APR-2011 7:00:00 AM'
    where repair_ord in (
    select recv_repair_ord from cxadmin.ord_dtl
    where ord_nbr = '602945RR' AND DOCK_DATE > '20-APR-2011' )

    Database database help question tutorial announcement

  • How Do I display current date and time in Toad for Oracle?
    J Justiin1265

    I have a sql statement that counts the units(cable boxes) that were refurbed(had damaged parts replaced) and total units(cable boxes that just went through refurb and had nothing replaced) and its supposed to do this count regularly, (every time a unit is processed the count). Can someone please help me? Thank you. Justin Heres my sequal code so far: SELECT COUNT(*) FROM cxadminn.repair_part WHERE repair_type = 'REFURB' and created_date >?

    Database oracle question database help

  • How do I cast a double to an int?
    J Justiin1265

    It shows the error at Refurb_Rate = Convert.ToInt32( totalRefurb / totalUnits * 100); I'm trying to convert the doulbe back to an integer, so I figured use the conversion syntax to return to an integer.

    C# database help question xml

  • How do I cast a double to an int?
    J Justiin1265

    I know I'm sorry, someone told me about it last time. I poseted this in a rush and forgot. Justin

    C# database help question xml

  • How do I cast a double to an int?
    J Justiin1265

    That's what I am cofused on. I thought I was inserting the formula into the conversion statement. What is the correct way, b/c the way I am trying to do it gives me an error? Justin

    C# database help question xml

  • How do I cast a double to an int?
    J Justiin1265

    Hi, I have a program for work that uses a formula to calculate the refurb on a unit(parts replaced on cableboxes that were damaged) divided by total units(cableboxes that went through refurb, but did not have any parts replaced). I looked up casting online, and the format for it is intvaluetoconvert = Convert.toint32; I'm doing that , but still get the error Cannot implicitly convert type 'double to int. An explicit conversion exists(are you missing a cast?) What am I doing wrong? Can someone please help? Thank you. Justin Here's some of my code to look at? private int GetRefurbRate() { string sql = ""; double Refurb_Rate; int totalRefurb = 0; int totalUnits = 0; string error_msg = ""; sql = "SELECT COUNT(rp.repair_ord) " + "FROM " + schema + ".repair_part rp " + "WHERE rp.repair_ord = '" + repair_ord + "' "; while (true) { if (!myDb.RunSql(sql, true)) { error_msg = "DBError for getting Refurb Rate"; break; } if (myDb.dbRdr.HasRows) { if (myDb.dbRdr.Read()) { try //Try and Catch are here b/c I originally had everything ints, and and they just caught the 0 exception. { Refurb_Rate = Convert.ToInt32( totalRefurb / totalUnits * 100); //This is where I try to perform the cast. } catch (Exception e) { Console.WriteLine(e); } } //int Refurb_Rate = Convert.ToInt32(Refurb_Rate); } break; } myDb.dbRdr.Close(); if (error_msg != String.Empty) { MessageBox.Show(error_msg, "Get Refurb Rate", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } return Refurb_Rate; }

    C# database help question xml

  • How to get a value to return in a textbox
    J Justiin1265

    I'm confused about how to make total units and total refurb values change constantly. That seems to be on the right track I was thinking about putting the formula in a for loop to see if that would work.

    C# database help question xml tutorial

  • How to get a value to return in a textbox
    J Justiin1265

    Yes, a barcode reader is involved, but does not need to be in the db. It is just a tool for users to process units faster. A user would scan in a unit(cable box) and if a part is damaged then it would be refurbed(replaced) and if not a user would enter None(no parts replaced). My formula calculates the toal units refurbed / total units that had a value of none* 100 to get a percentage. My problem is idk how to make the formula constantly change values as the total refurb and total units changes constantly.

    C# database help question xml tutorial

  • How to get a value to return in a textbox
    J Justiin1265

    Anytime I try to make the variables double,, its giving me an error of can't convert int to dbl which I know, but I did not put a stipulation of only int on it; so I do not know why it is telling me that. I'm assuming another programmer put that stipulation somewhere else in the program, but Idk where, and I also do not want to mess up any coding they did.

    C# database help question xml tutorial

  • How to get a value to return in a textbox
    J Justiin1265

    Hi, I am having issues for a project for work and was wondering if anybody can help me. I am trying to calculate The percentage for refurb for the day. The formula is Refurb_Rate = (totalRefurb / totalUnits * 100) The program is supposed to supposed count the refurb in the db and return a value in a textbox. I initialized my values to 0, but my problem is how do I get it to calculate each time a user scans in a unit to be refurbed. Anything I try to do gives me an error in my program. Right now it's returning a value of of 1 because I added RefurbRate++. Can anyone help me? Thanks. Justin Here is what I've done with my code: private int GetRefurbRate() { string sql = ""; int Refurb_Rate = 0; int totalRefurb = 0; int totalUnits = 0; string error_msg = ""; sql = "SELECT COUNT(*) " + "FROM " + schema + ".repair_part rp " + "WHERE rp.repair_ord = '" + txtRO.Text + "' "; while (true) { if (!myDb.RunSql(sql, true)) { error_msg = "DBError for getting Refurb Rate"; break; } if (myDb.dbRdr.HasRows) { if (myDb.dbRdr.Read()) { try { Refurb_Rate = (totalRefurb / totalUnits * 100); } catch (Exception e) { Console.WriteLine(e); } } Refurb_Rate++; } break; } myDb.dbRdr.Close(); if (error_msg != String.Empty) { MessageBox.Show(error_msg, "Get Refurb Rate", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } return Refurb_Rate;

    C# database help question xml tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups