|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Problem in joined Select with aliases
hey there!
can anybody tell my what's wrong with the following DB2 query?: SELECT ss.id as screen, sp.id as id, sp."_template" as template, ss."_template" as screen_template, ss.displaysecond FROM slideshow_part as sp LEFT JOIN slideshow_screen as ss ON ss."_slideshow_part" = sp.id WHERE sp."_slideshow" = 95 ORDER BY sp.sortorder ASC, sp.id ASC, ss.displaysecond ASC, ss."_template" ASC db2 complains that SP.ID was invalid. i can say that the table structures match, i even tried to get rid of all those aliases, but no success at all... |
|
#2
|
|||
|
|||
|
Error code?
What error code and/or sqlerror code are you getting?
Type at your promt: db2 ? "errorcode" I know this isnt a solution but you can narrow your search from this. Hope this helps Aj |
|
#3
|
||||
|
||||
|
Quote:
try changing it to Code:
select ss.id as screen
, sp.id as foo
, sp."_template" as template
, ss."_template" as screen_template
, ss.displaysecond
from slideshow_part as sp
left
join slideshow_screen as ss
on sp.id
= ss."_slideshow_part"
where sp."_slideshow" = 95
order
by sp.sortorder asc
, sp.id asc
, ss.displaysecond asc
, ss."_template" asc
|
![]() |
| Viewing: Dev Shed Forums > Databases > DB2 Development > Problem in joined Select with aliases |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|