Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. ChrisHunt

    Manager issue in DB

    So what you're saying is that there's a many-to-many relationship between projects (if that's what's in tableA) and managers - a manager might have many projects, and a project could have many managers (over time, at least). In that case, you need to split the relationship out into another...
  2. ChrisHunt

    DB Guidelines

    No argument with this one, though it can occasionally make sense to create a repeating group in a table. It usually makes sense to have a single auto-generated PK column for a table, but there are exceptions. I don't usually bother to add the overhead of such a key with tables used only to...
  3. ChrisHunt

    Table design - virtual column question(?)

    No, you just create a view something like this: SELECT a.*, a.year||'-'||s.state||'-'||a.no1||'('||a.no2||')--'||s.abbrv||'-'||a.ed FROM TableA a INNER JOIN US_States s -- or OUTER JOIN if a.state is nullable ON s.id = a.state And then just use this view wherever you would have used...
  4. ChrisHunt

    Find PK use

    My question stands, what does "using" mean? -- Chris Hunt Webmaster & Tragedian Extra Connections Ltd
  5. ChrisHunt

    Rapid landing page development / templating

    You and I are coders. We're quite happy to pitch in to code editors and produce the leanest meanest code we can. It doesn't matter to us if the pages are full of obscure markup code, because that's what we do - but the same is unlikely to be true of your customers. So you need to be clearer on...
  6. ChrisHunt

    Find PK use

    used" how? If I create a view like this: CREATE OR REPLACE VIEW my_view SELECT some_col FROM your_table WHERE pk_column = 2 Is that "using" the PK? How about this one: CREATE OR REPLACE VIEW my_other_view SELECT some_col FROM your_table t1 INNER JOIN your_other_table t2 WHERE t1.pk_column =...
  7. ChrisHunt

    CSS question: Displaying 2-level unordered lists in a table layout?

    You have two choices: 1) Keep the PHP simple - read through your recordsets and spit them straight out in the order you read them - and use some complex HTML/CSS to make the results look like you want it to look. 2) Write some (relatively) complex PHP to read your data and process it into...
  8. ChrisHunt

    Can I Get an IT Job at a College, Even Though I Never Went to College?

    Well, you're getting as far as an interview, so you're clearly not being discounted purely on your lack of academic qualifications. But academic institutions will clearly place a high value on formal education - it's what they do after all - so if you've followed a different path, you've got a...
  9. ChrisHunt

    "SELECT" question

    That's a question you're going to have to ask those people, not us. -- Chris Hunt Webmaster & Tragedian Extra Connections Ltd
  10. ChrisHunt

    Dynamic charts (graphs) - what's the best approach?

    Where are these "dynamic charts" to be created? Are you, perhaps, building a web page using Perl and/or PHP and want it to include a "dynamic chart"? Where and how are these "different options i.e Bar, Pie, Line..." to be specified? You'll get better and more useful answers if you take the...
  11. ChrisHunt

    A very simple script does not work

    I'm not familiar with tcpdump, but a couple of points... The 2>/dev/null will (I think) redirect any error messages to /dev/null. So if whatever is going wrong is displaying an error message that would help you figure out what's happening, you won't see it. The & at the end causes the command...
  12. ChrisHunt

    Word of the Day, Brought to You by IoT

    Was it swatted by a giant gorilla perched on the roof? -- Chris Hunt Webmaster & Tragedian Extra Connections Ltd
  13. ChrisHunt

    Concatenate Date and Time fields

    Something like this? DECLARE v_date DATE := to_date('09-MAR-2015','DD-MON-YYYY'); v_time VARCHAR2(6) := '050520'; v_full DATE; BEGIN -- Produce a string that is v_date concatenated with v_time, and read the result as a date. v_full := TO_DATE(TO_CHAR(v_date, 'DD-MON-YYYY') ||'...
  14. ChrisHunt

    Query with Multiple Columns based upon same data

    I don't have a MySQL database to hand to test this, but maybe something like this... SELECT user_name, SUM(CASE WHEN timer <= 20 THEN 1 ELSE 0 END CASE) AS timer_up_to_20, SUM(CASE WHEN timer > 20 AND timer <= 60 THEN 1 ELSE 0 END CASE) AS timer_20_to_60, SUM(CASE WHEN...
  15. ChrisHunt

    check column is numeric or not

    A value of NULL is numeric. It's also a valid string and a valid date and a valid interval and whatever other type you like - because it's just an empty value. If you want to exclude NULL values, you'll have to explicitly do so within your function, which incidentally I would write like this...
  16. ChrisHunt

    update query issue

    Maybe try something like this MERGE INTO t_samrat2_trn t USING (select x.samrat2_trn_key h.samrat_mrg_parent_cd from t_samrat2_trn x t_samrat_mbr_merge h where upper(x.samrat2_trn_key) = upper(h.samrat_mrg_key) -- do you really need the upper() here...
  17. ChrisHunt

    Input Number return info for html display

    Your client-side code includes the database address, username and password; and could easily be changed to fire any SQL command anybody liked into the database (quite aside from the SQL injection possibilities). I seriously hope you're not intending to deploy this on the open web. I'd also point...
  18. ChrisHunt

    cursor for loops to insert record into a table

    If you just want to insert a single row into your table, why are you using a loop, and why are you using PL/SQL? You just need a single SQL statement: INSERT INTO EMPLOYEES (emp_id,dept_id,first_name,last_name,inserted,last_update,hire_date,job_id,salary,comm_pct) VALUES(EMPLOYEES_SEQ.NEXTVAL...
  19. ChrisHunt

    What tablespace is used?

    Tables live in tablespaces. If you do something that requires more space, like an insert or an update, the space will be allocated within the table's tablespace. Simply querying a table won't make any demands on tablespaces, other than possibly a temp tablespace as pointed out above. A user's...
  20. ChrisHunt

    My first thought was, ...

    If "common sense" really was common, we'd just call it "sense". -- Chris Hunt Webmaster & Tragedian Extra Connections Ltd

Part and Inventory Search

Back
Top