|
Here's a pretty general question, I'm extracting data from a system, and there's only a few places where we have a known key to use, and often it's a really, really big number of keys. Along the lines of: SELECT * FROM materials WHERE matnr IN ( set of 50-100000 material numbers). These sorts of queries often fail to execute, as the input parameter files are just too large. When we split them up and run the union of queries, it takes much, much longer. Is there some simple way we can rework things so that the extraction can be done in a reasonable amount of time? Some of the more complicated queries are taking FAR too long to run
|
# ¿ Nov 5, 2007 16:12 |
|
|
# ¿ Apr 28, 2024 17:30 |
|
Cheers guys. I made a table, and it makes all the difference
|
# ¿ Nov 5, 2007 20:30 |
|
I'm extracting data from an oracle database using SQL+. One of the tables I need to get has several columns such as '/AB/CDE' and '/AB/CDF' etc. However, when I attempt to execute: SELECT KONP./AB/CDE, KONP./AB/CDF FROM KONP WHERE.... it doesn't recognise the columns. Nor does: SELECT /AB/CDE, /AB/CDF FROM KONP WHERE.... Is this an escape character thing? I thought the escape character was backslash not slash. What should I do so that SQL+ can get the columns I need?
|
# ¿ Nov 26, 2007 12:32 |
|
m5 posted:Square brackets maybe? I'm guessing because I'm not sure what you're saying - are those slashes supposed to mean something or are they part of the column names and not otherwise interesting? (If so then wtf) Yeah, they are just really stupidly named columns. The columns are in several tables im joining, so do I use: KONP.[/AB/CDE] or [KONP./AB/CDE] ?
|
# ¿ Nov 26, 2007 13:28 |
|
This is probably really easy to fix, but I'm trying select a list of material numbers, and their corresponding text descriptions. However, the table with the text descriptions has several entries for each material number, for different languages. I want to get the german description, unless it doesn't exist, in which case I want the english descriptions. I'm currently using: SELECT material_number, material_text FROM materials INNER JOIN mat_desc ON materials.material_number = mat_desc.material_number GROUP BY material_number, material_text; This only works because language = 'DE' is ordered first by default, and 'EN' is ordered second. This seems pretty dodgy though. Is there a proper way of doing this?
|
# ¿ Dec 12, 2007 16:42 |