Mistři v programování na #hovnokod

celé zle (PP)

SELECT      (
                SELECT      TO_CHAR(HeadersID) HeadersID 
                FROM        datapt_eng_vw a
                WHERE       a.datapoint_id = b.COLUMN_VALUE
            ) headerId,
            (
                SELECT      TO_CHAR(DATAPT_TIMESTAMP, 'MM/DD/YY HH:MI:SS.ff3 AM') 
                FROM        datapt_eng_vw a
                WHERE       a.datapoint_id = b.column_value
            ) tdateForOrder, 
            (
                SELECT      DATAPT_TIMESTAMP
                FROM        datapt_eng_vw a
                WHERE       a.datapoint_id = b.column_value
            ) DATAPT_TIMESTAMP
FROM        TABLE(CAST (PKG_TDS_ENG.GET_SESSION_DATAPOINTS() AS TBL_DATAPOINT_SKEY)) b 
ORDER BY    DATAPT_TIMESTAMP desc;

Anonymous,

Kdyz uz mi posilate SELECT dotaz, tak pokud mozno funkcni... Pro Ty, co nenasli hned chybu, tak si zvetste pismo nebo pouzijte lupu.

select * from objednavky
where cislo_objednavky = '12345678’;

Anonymous,


Sme Ki,

Aneb jak se dela JOIN v praxi.

SELECT *
FROM table1 a, table2 b, table3 c 
WHERE a.sha256 = b.sha256 AND status = 3 or 2
GROUP BY a.sha256
LIMIT 0, 100

Anonymous,

Ještěže existují subselecty a lze s nimi získávat data dříve nevídaným způsobem.

SELECT count(*) WHERE    (select top 1 mo_osoba.ind_gastro FROM mo_osoba WITH (NOLOCK) WHERE mo_osoba.id_mo_osoba = 2606) = '1'

Anonymous,