Subdomain Posts
None | 2 days ago
None | 2 days ago
None | 2 days ago
None | 11 days ago
Python | 22 days ago
None | 30 days ago
None | 30 days ago
None | 30 days ago
None | 47 days ago
PL/SQL | 180 days ago
Recent Posts
None | 6 sec ago
None | 11 sec ago
None | 12 sec ago
HTML | 26 sec ago
None | 29 sec ago
C++ | 35 sec ago
XML | 40 sec ago
None | 46 sec ago
C++ | 46 sec ago
PHP | 50 sec ago
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By verblendet on the 25th of Oct 2008 01:58:05 PM Download | Raw | Embed | Report
  1. INSERT INTO
  2.         nl_h
  3.         (
  4.                 adr_id, #adress id
  5.         )
  6. SELECT
  7.         adr.id AS adr_id,
  8. FROM adr
  9.         INNER JOIN adr_grp_ref ON adr.id = adr_grp_ref.adr_id
  10.         INNER JOIN adr_grp ON adr_grp_ref.grp_id = adr_grp.id
  11.         LEFT JOIN nl_h ON adr.id = nl_h.adr_id
  12. WHERE
  13.         adr.aktiv=1
  14.         AND (
  15.                                  adr.status=1
  16.                                 OR adr.status=2
  17.                                 OR adr.status=3
  18.                                 OR adr.status=4
  19.                                 OR adr.status=10
  20.                                 OR adr.status=12
  21.                         )
  22.         AND adr_grp.id='93'
  23.         AND adr_grp.aktiv=1
  24.         #AND nl_h.nl_id='266'
  25.         AND
  26.         (
  27.                 (
  28.                         nl_h.adr_id IS NULL
  29.                 )
  30.                 OR     
  31.                 (
  32.                                 nl_h.adr_id IS NOT NULL
  33.                                 AND nl_h.status!=1
  34.                                 AND nl_h.nl_id='266'
  35.                 )
  36.         )
Submit a correction or amendment below. [ previous version ] | [ difference ] | Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: