Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Given something like this:
- SELECT a, b, c, d, e, f, g, MOD(a,c) md, SUBSTR(c,1,8) FROM mytable WHERE a = b AND b = c AND e NOT IN (f,g) AND (d IS NULL OR e IS NOT NULL);
- --I want to get this:
- SELECT a,
- b,
- c,
- d,
- e,
- f,
- g,
- MOD(a, c) md,
- SUBSTR(c, 1, 8)
- FROM mytable
- WHERE a = b
- AND b = c
- AND e NOT IN(f, g)
- AND (d IS NULL
- OR e IS NOT NULL);
- --The closest I could get is:
- SELECT a,
- b,
- c,
- d,
- e,
- f,
- g,
- MOD(a, c) md,
- SUBSTR(c, 1, 8)
- FROM mytable
- WHERE a = b
- AND b = c
- AND e NOT IN(f, g)
- AND(d IS NULL
- OR e IS NOT NULL) ;
- --...Which looks "somewhat" different.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement