Forum Topic

The SQL Thread

  • may alam ba kayong training center for postgre sql?
  • Post deleted #11693683
  • try mo dito sir kung meron sila

    may alam ba kayong training center for postgre sql?


    http://www.wizardsgroup.com/

    <click here for link>
  • maganda jan sa dbwizards. nagtraining na ako dati jan.
  • mga bossing paano po ma restore sa diffent machine yung sql back up ko or even yung mdf nasira kasi yung drive ng machine ko buti nalang separate drive yung sql back up and mdf ko tia
  • Restore mo lang ung backup database dun sa bagong machine na may SQL. Kung may MDF ka iattach mo na lang siya sa bago mong instance then ok na yan. Make sure to double check your users and permissions after the restore kung nakakaccess pa ung mga nakakaccess dati.
  • Post deleted #11899039
  • please help me check my post about sql...please
  • hi active pa po yung thread na to ? may itatanong sana kasi ako regarding sa database
  • @jetr0019
    ano ba ang iyong tanong?
  • Hi mga idol SQL developer. I am currently looking for a freelancer who can guide me on some basics of SQL Client/Server database, willing to pay. Who has vacant time and interested please contact me so we can discuss the scope, rate...etc.

    I live in Project 7, QC.

    Pls. Call or Text me @09171309283 (James)
  • Post deleted #12082196
  • Good pm. Question lang regarding sql query specifically on join/grouping

    Ex. Data:

    Company - Status
    A - approve
    A - review
    B - approve
    C - review

    Preferred output:

    Company - approve - review
    A - 1 - 1
    B - 1 - 0
    C - 0 - 1
  • @se17enteen

    try mo to:

    INSERT INTO TESTTABLE2(COMPANY,APPROVE,REVIEW)
    SELECT COMPANY,1 AS APPROVE, 0 AS REVIEW
    FROM TESTTABLE
    WHERE STAT='APPROVE'
    UNION ALL
    SELECT COMPANY, 0 AS APPROVE,1 AS REVIEW
    FROM TESTTABLE
    WHERE STAT='REVIEW';

    --This will do the trick
    SELECT COMPANY, MAX(APPROVE) AS APPROVE, MAX(REVIEW) AS REVIEW FROM TESTTABLE2
    GROUP BY COMPANY;

    hintay tayo baka may mas maayos na query sila master. :)

    -- edited by caecus18 on Mar 09 2018, 12:47 PM
  • Good pm. Question lang regarding sql query specifically on join/grouping

    Ex. Data:

    Company - Status
    A - approve
    A - review
    B - approve
    C - review

    Preferred output:

    Company - approve - review
    A - 1 - 1
    B - 1 - 0
    C - 0 - 1


    if you are using MS SQL you can use the PIVOT keyword to turn rows to columns

    <click here for link>