ARRAY - simple (but tricky?)

Hi, I have a simple querstion regarding Array intialization.
I know that JAVA has the functionality to declare and initialize array in one line:
String stringarray[] = { "string1","string2","string3"};
Now my question is, why separating this kind of initialization from its declaration is not allowed?
String stringarray[];
stringarray = { "string1","string2","string3"};
Thanks

Okay, let me try again.
In order to create an array, the compiler needs to know what type of array to create. If I have code like this:
Object[] o;
o = { new Long(1), new Long(2) };The compiler could create either an Object array, a Number array, or a Long array, and the code would run fine. Except that somewhere along the line your code might have expected something different and a class-cast exception would get thrown.
So, to keep it simple, the rule seems to be that arrays can only be created when it is explicit what type is going to be created - in other words when there is no chance for ambiguity. The following lines don't have any ambiguity:
// a variable declaration gives the explicit type to use
Object[] o = { new Long(1), new Long(2) };
Number[] n;
// the "new" operator explicitly tells what type to use
n = new Number[] { new Long(1), new Long(2) };SO, although the following seems pretty obvious to a human viewer:
Object[] o = { new Long(1), new Long(2) };
// versus
Object[] o;
   // some code here ..
o = { new Long(1), new Long(2) };The second part introduces the possibilty of ambiguity, because the array creation isn't part of a statement that explicitly tells the compiler what type of array to create. Take for example:
Number[] n = { new Long(0), new Long(1)};
Object[] o;
o = n;Which shows how an array of one type can be assigned to another that is part of the heirarchy.
As I mentioned above, I agree that this should be allowed, but I believe it was left out of the language because of the issues I've mentioned.

Similar Messages

  • BPS Layout formatting looks simple but tricky - Help

    Hi ,
    Created a layout with the below charaterstics and Month1 give the qty for that month. It works great but
    1)  When there is no data i.e no qty for that month , it suppose to be blank but it gives the below out put
    Currenlty :
    Material     mplant  DType month(qty)
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    Desired :
    Material     mplant  DType month(qty)
    2) When there is data i.e qty for that month , it suppose to give two records but it gives the below out put
         i.e values and some more lines with material but no qty . Actually there is data for only 2 rows.
    Currently :
    Material     mplant  DType month(qty)
    552477     552477  A           10
    552477     552477  B           20
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    Desired :
    Material     mplant  DType month(qty)
    552477     552477  A           10
    552477     552477  B           20
    I created a macro to delete the duplicate when the number repeats but that doesnot solve because when ever I want to read the total number of rows in another macro it shows wrong total number of line because of these repeating material numbers .
    How can I get the desired output ? is there any simple setting in the layout or XL with out using a complicated macros etc.........
    Using sem bw 320
    Please help . Thank you inadvance.
    Raju
    Edited by: venkat bhuaptiraju on Jan 8, 2008 6:01 PM
    Edited by: venkat bhuaptiraju on Jan 8, 2008 6:04 PM
    Edited by: venkat bhuaptiraju on Jan 8, 2008 6:07 PM

    Thank you all for your reply very very useful tips. This is getting some how very interesting and frustating at the same time.
    Bindu : I used the similar code that you gave me that works perfect it removes the rows data that I do not need but retains the format for exmple the STYLES that I applied for the data and header data
    Arya : The cube has the 2 records and my below msg will clarify that the issue is not with this
    Aby : Yes even, I do not understand why the those 2 columns data with no key figure values
    Jeoffrey :
    - I checked 3- : Layout set to From Transaction data
    - I checked 4- restrictions (variables?)  may not be because ...see... my below observations........
    - I checked 5- ...may not be because ...see... my below observations........ BUT I am going through they
      are very interesting.
    Sappie :
    ...may not be because even for one material ...see... my below observations........
    More Facts :  Sorry I would have given this in the beginning.
    - I am running an adhoc package that contains an existing layout  which works perfect
    - When I copy layout and remove all the styles and macros still it works great
    - BUT when I create a new layout with exactly same setting NO CHANGE and run the SAME adhoc   package I get those material numbers repeating .........
    I have both the layouts in my PC and compared but did not see any difference , Can you please look at it if you think there could be something there ? Please send me you email I can email you.
    Again thank you for looking in to it, your replies are very logical.
    Regards,
    Raju

  • FB03 problem, looks simple but tricky

    Hi all,
    Go to FB03, click document list, give company code, fiscal year, execute.
    It shows a list of docs.
    Go to change layout and select “reference” from column set and add to displayed columns. Go to “display” tab and select “print out with date, title and page number”.
    Select “user specific” and “default setting” check boxes and save the layout.
    Come out the screen and execute FB03 again and select the lay out which you saved and go to change layout and then to the display tab. There you will find the “print out with date, title and page number” <b>unchecked</b>. (But it was actually checked and saved).
    Please explain why this is happening and suggest me solution.
    Thanks in advance.

    Hi Eric,
    The user says:
    This issue first came up after the upgrade when the date printed stopped appearing on his FB03 reports.  We found the check box on the display tab of the change layout screen and it properly caused the data to appear at the top of the report.  However, when we tried to save that setting with the layout, we were not successful.
    he says when he could do it befor, why not now?
    Please help.

  • Concatenate " Simple but tricky question "

    Hey guys
    How are u, this looked like easy problem. However, I tried so many things. I want to add a space in front of character. This is 2-character lengths field.
    When I was executing this command, it is not adding up space.
    If I am something wrong correct me
    Here is the code
    DATA:  i type i ,ONE(1) VALUE ' ',FINAL(2) ,TWO(1).
    i = sTRLEN( t_record-trfgr ). “ first it shows 1 for H
    if i LE '1'.
    concatenate  TWO ONE  '.' into final.
    CLEAR:I.
    i = sTRLEN( final ). “ its still say 1
    Thanks

    Saquib,
      <b>Concatenate   '    '
                    t_record-trfgr
             into
             final.</b>
      Following should also work:
    <b> Concatenate  
             space
             t_record-trfgr
             into
             final.</b>
    Thanks
    Kam
    Note: Allot points for all worthful postings

  • Simple But tricky for me

    Hi All
    I have a table like below
    application_id | Page_name | Group_name | Question_name | Data
    123 App1_Fina_1 Lia_Loan1 Type PersonalLoan
    123 App1_Fina_2 Lia_Loan2 Payment 2000
    124 App1_Fina_1 Lia_Loan1 AmmountBorrow 3000
    124 App1_Fina_2 Lia_Loan3 AmmountPaid 1500
    here my each application may have differnet question names and they are aplication based. can I have the extract as below
    appllication_id | Type | Payment | AmmountBorrow | AmmountPaid
    123 PersonalLoan 2000
    124 3000 1500
    can I have this kind of extract in select statement?

    Hi !
    I was typing this .. so i'm posting it ..
    SQL>
    SQL> with tab as (
      2  select 123 application_id, 'App1_Fina_1' Page_name, 'Lia_Loan1' Group_name, 'Type' Question_nam
    e,
      3   'PersonalLoan' Data from dual union all
      4  select 123, 'App1_Fina_2', 'Lia_Loan2', 'Payment', '2000' from dual union all
      5  select 124, 'App1_Fina_1', 'Lia_Loan1', 'AmmountBorrow', '3000' from dual union all
      6  select 124, 'App1_Fina_2', 'Lia_Loan3', 'AmmountPaid', '1500' from dual )
      7  select application_id,
      8         max(decode(question_name,'Type',data)) Type,
      9         max(decode(question_name,'Payment',data)) Payment,
    10         max(decode(question_name,'AmmountBorrow',data)) AmountBorrow,
    11         max(decode(question_name,'AmmountPaid',data)) AmountPaid
    12    from tab
    13   group by application_id
    14  /
    APPLICATION_ID TYPE         PAYMENT      AMOUNTBORROW AMOUNTPAID
               123 PersonalLoan 2000
               124                           3000         1500
    SQL> T

  • Can someone please tell me a simple but effective method for burning a slideshow to DVD? Now that the connection between iPhoto and iDVD no longer exists, I can't figure out a way to get there with an acceptable quality result.

    Can someone please tell me a simple but effective method for burning a slideshow to DVD? Now that the connection between iPhoto and iDVD no longer exists, I can't figure out a way to get there with an acceptable quality result.

    Export the slideshow out of iPhoto as a QT movie file via the Export button in the lower toolbar.  Select Size = Medium or Large.
    Open iDVD, select a theme and drag the exported QT movie file into the open iDVD window being careful to avoid any drop zones.
    Follow this workflow to help assure the best qualty video DVD:
    Once you have the project as you want it save it as a disk image via the File ➙ Save as Disk Image  menu option. This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image, launch DVD Player and play it.  If it plays OK with DVD Player the encoding is good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    If iDVD was not preinstalled on your Mac you'll have to obtain it by purchasing a copy of the iLife 09 disk from a 3rd party retailier like Amazon.com: ilife 09: Software or eBay.com.  Why, because iDVD (and iWeb) was discontinued by Apple over a year ago. 
    Why iLife 09 instead of 11?
    If you have to purchase an iLife disc in order to obtain the iDVD application remember that the iLife 11 disc only provides  themes from iDVD 5-7.  The Software Update no longer installs the earlier themes when starting from the iLIfe 11 disk nor do any of the iDVD 7 updaters available from the Apple Downloads website contain them. 
    Currently the only sure fire way to get all themes is to start with the iLife 09 disc:
    This shows the iDVD contents in the iLife 09 disc via Pacifist:
    You then can upgrade from iDVD 7.0.3 to iDVD 7.1.2 via the updaters at the Apple Downloads webpage.
    OT

  • Simple but reliable small office setup

    Hi group,
    I need some advice on setting up a simple but reliable small office wireless network. Up until now, we had a consumer AP combined with wired connections. However, we're moving to a new office where it's difficult to implement a wired network and we decided to implement a good quality wireless network.
    So, I was looking into business quality wireless AP's and it looks as if the Aironet 1600 is an interesting option. However, I'm not a (wireless) network specialist and have no knowledge of controlled AP's.
    The office is (only) 278 square meters (24 x 11.6), divided in two main areas by a supporting wall with two large doorways. I would like to keep the setup costs to a minimum, ideally using only 1 AP. This might mean placing the AP on the ceiling near the dividing wall (which is roughly in the middle), or on the wall itself.
    We need to support fast wireless connections from 15 laptop computers now, and up to 25 in the near future. Also, we'd like to support 15-25 mobile devices, i.e. tablets or smart phones.
    I've found some info on the differences between the AIR-CAP1602 and AIR-SAP1602 models, as well as the Internal and External antenna versions. It seems to me we could use the Standalone (SAP1602) model. However, I don't have enough knowledge to determine if the Aironet 1600 is actually appropriate for our requirements and if yes, which model.
    I would very much appreciate your advice!

    A 1600 would work or even a 2600. I prefer the 2600/3600 though but cost is your concern. I would also place the AP on the ceiling but belies the ceiling maybe in the middle if possible. Don't place the AP above the ceiling because you will loose coverage. Internal antennas are fine and just to note, rule of thumb is 25 users per AP so just in case you need more throughput, maybe using two separated by 3-5 meters would help also. If the 1600's are the choice for you then look at having one or two APs.
    Sent from Cisco Technical Support iPhone App

  • How do I save to mixdown in mono, 0 db reduction in volume, in 64 bps mp3? Sounds simple, but none of the support staff has been able to do it.

    How do I save to mixdown in mono, 0 db reduction in volume, (Same volume level as in the files-no -3db reduction) in 64 bps mp3? Sounds simple, but none of the support staff has been able to do it.

    Several solutions to this problem.  I believe we may have discussed this over the support e-mail, but I'll share it again here so that it can help others as well.
    First, as I discussed in the e-mail, Audition defaults to support Pan Law which prevents content mixed to the center of a Stereo field from being louder than the same content panned far left or right.  This provides a -3dB drop to center content by default, but you can disable this completely by entering Preferences > Multitrack and setting the Default Panning Mode to Left/Right Cut (Logarithmic)
    Now, when you create a new Multitrack session, there is an option to specify the Master channelization.  Here, you can select Mono, Stereo, or 5.1 and this will be the default channelization mode for a basic mixdown operation regardless of your clip content, though can be overridden when exporting a session mixdown.
    Next, if you just choose the menu item Multitrack > Mixdown Session to New File... it will always default to the Master channelization.  This command does not write to disk, it is a preview or pre-processing step.  If you wish to export your multitrack session mixdown directly to disk, in your desired channelization and file format, please use the command File > Export > Multitrack Mixdown > Entire Session...  You will then have the complete set of output options, including the option to output at any channelization you like and the format you prefer.
    Here, I've disabled the default 5.1 output and selected a Mono mixdown instead.
    I've now changed the file format settings as well to MP3, 64K.
    With most of these configuration details, you should only need to set them once and these will remain the defaults for any subsequent projects, unless modified again.  The Export Multitrack Mixdown dialog will reset the Mixdown options to match the default output, and the MP3 settings may update to reflect the kBps setting nearest your session sample rate.

  • My iPhone's screen black, it does not work and I tied to hold press power and home press but it did not work? By the way for seconds I saw iTunes cabal  simple, but unfortunately, I do not have backup for my iPhone in my mac, so how can I restore my iphon

    My iPhone's screen black, it does not work and I tied to hold press power and home press but it did not work? By the way for seconds I saw iTunes cabal  simple, but unfortunately, I do not have backup for my iPhone in my mac, so how can I restore my iphone without loss my date?
    Thanks

    lbryan1987 wrote:
    I dont want the button problem solved i need to know how to restore the phone without using that button or going into settings
    You don't in the condition it's in. You will either have to get the phone replaced by Apple or pay a 3rd party to repair it.
    there seriously should be more than two ways to solve this other wise apple is useless and we will never buy another apple product.
    Seriously? It's physically broken!

  • After downloading a pdf from a website, how can I view the file in Safari 6.0.4 (just as I can in Safari 5.0.6)?  I bet that it's simple, but I've missed something, somewhere, and a solution will be greatly appreciated.

    After downloading a pdf from a website, how can I view the file in Safari 6.0.4 (just as I can in Safari 5.0.6)?  I bet that it's simple, but I've missed something, somewhere, and a solution will be greatly appreciated.

    Hello Kirk,
    Thank's for your efforts, and I just wish that this was the solution.  Unfortunately, it isn't because, after double-clicking on the pdf in the website, it simply "opens" in another Safari window as a black screen - the pdf is there, somewhere, but not visible (either as an icon, or as a document). 
    When I right-click in the black Safari window, where the file is supposed to be, the only option available to display the file is to "Open file in Internet Explorer" (which is not what I want to do).  Other options include saving or printing the pdf, which I don't want until I've confirmed that it's the form that I want.  The same options are offered if I right-click on the file icon in the website.
    Any other suggestions, please?

  • A small but tricky one -- can u handel it

    hi guys
    i have a very small but tricky problem
    u see i want to get the value of a mathamatical expression (stored in a variable -varchar2) and wants to get the mathamatical value of the expression
    eg
    declare
    a varchar2;
    begin
    a:='12*12';
    etc....
    end ;
    so here i want to get 144 as the output ..
    lets see how u handel it
    thanx
    dg

    Yeap, Execute Immediate is only available on 8.1.?.
    Try following.
    declare
    cursor_no integer;
    a varchar2(20);
    sqlstr varchar2(128);
    rowno integer;
    rs integer;
    ResVal number;
    begin
    a := '12 * 12';
    sqlstr := 'SELECT ' &#0124; &#0124; A &#0124; &#0124; ' FROM DUAL';
    cursor_no := dbms_sql.open_cursor;
    DBMS_SQL.PARSE(cursor_no, sqlstr,dbms_sql.native);
    DBMS_SQL.DEFINE_COLUMN(cursor_no, 1, ResVal);
    rs := DBMS_SQL.EXECUTE(cursor_no);
    rowno := DBMS_SQL.FETCH_ROWs(cursor_no);
    DBMS_SQL.COLUMN_VALUE(cursor_no, 1, ResVal);
    DBMS_SQL.close_cursor(cursor_no);
    DBMS_OUTPUT.PUT_LINE(ResVal);
    END;
    Steve

  • The answer may be simple but

    Since I got Fireworks 8 last week, I've worked through the
    accompanying 'Getting Started' manual and much of 'Training from
    the Source' by Patti Schulze. While I love the program, I'm
    frustrated by a difficulty that may be simple but is exasperating
    for me.
    When I create an image and try to save it as a .gif, jpg or
    png file for use in Dreamweaver,I find that I repeatedly time and
    time and tiime and time without end, simply lose the image.
    How can I resolve this difficulty?

    In FW 8, if you have a new image with multiple objects, you
    can "save"
    as PNG only, but you can "save as" any FW supported format,
    without all
    the html attributes associated with the Export dialog. With
    many
    formats, you will get the option to "save a copy" so you
    don't flatten
    your original artwork.
    And of course, you can "Export" too.
    That directory location issue is a pain. There is some kind
    of logic
    there, but I can never remember what it is. lol
    Jim Babbage - .:Community MX:. & .:Adobe Community
    Expert:.
    Extending Knowledge, Daily
    http://www.communityMX.com/
    CommunityMX - Free Resources:
    http://www.communitymx.com/free.cfm
    .:Adobe Community Expert for Fireworks:.
    news://forums.macromedia.com/macromedia.fireworks
    news://forums.macromedia.com/macromedia.dreamweaver
    Anthony Bollinger wrote:
    > Two ideas.
    >
    > First, exporting an image is not the same as saving an
    image. You save the
    > image to a PNG to preserve fireworks info, but you
    export to a jpg or gif or
    > other format (including "standard" png).
    >
    > Second, the program does not automatically export to the
    directory your png
    > or source file is in. This has tripped me up plenty
    before. Be sure to
    > check your path carefully. Anytime you experience
    problems, drill down the
    > path from the root of the drive.
    >
    > HTH -- Tony
    >
    > "kjpd84" <[email protected]> wrote in
    message
    > news:e961d8$r0s$[email protected]..
    >>
    >> Since I got Fireworks 8 last week, I've worked
    through the accompanying
    >> 'Getting Started' manual and much of 'Training from
    the Source' by Patti
    >> Schulze. While I love the program, I'm frustrated by
    a difficulty that
    >> may be
    >> simple but is exasperating for me.
    >>
    >> When I create an image and try to save it as a .gif,
    jpg or png file for
    >> use
    >> in Dreamweaver,I find that I repeatedly time and
    time and tiime and time
    >> without end, simply lose the image.
    >>
    >> How can I resolve this difficulty?
    >>
    >
    >

  • Extremely simple but baffling to me: Constructors.

    I haven't a clue what they are. I've read about them online and in the Java API, and I still have no idea what they are.
    My current understanding is this: a constructor is code dedicated towards defining how to treat a variable.
    But...I have to write two programs using constructors and I have no idea what to put in them. And in fact everything I've tried gives compiler errors. I'm sure all of you know the quiet desperation and frustration I'm feeling.
    Anyway, the assignments are:
    1) Create a class called Employee that includes three pieces of information as instance variables - a first name (type String), a last name (type String) and a monthly salary (double). Your class should have a constructor that initializes the three instance variables. Provide a set and a get method for each instance variable. If the monthly salary is not positive, set it to 0.0.
    Write a test application named EmployeeTest that demonstrates class Employee's capabilities. Create two Employee objects and display each object's yearly salary. Then give each Employee a 10% raise and display each Employee's yearly salary again.
    2) Create a class called Date that includes three pieces of information as instance variables - a month (type int), a day (type int), and a year (type int). Your class should have a constructor that initializes the three instance variables and assumes that the values provided are correct. Provide a set and a get method for each instance variable. Provide a method displayDate that displays the month, day, and year separated by forward slashes.
    Write a test application named DateTest that demonstrates class Date's capabilities.
    It all seems extremely vague, to me.
    For the first assignment I've got:
    public class Employee
         public String FirstName;
         public String LastName;
         public double Salary;
    Which I think is right. But all attempts to create a constructor that have failed...I don't even know what one does. It seems kind of absurd for my first two labs to be so simple, basically logic exercises, and this to be so mind-destroying.
    There's got to be an if/then to see if the salary inputted is negative, which is simple, no problem.
    But the set and get methods...there's no data inputted into this program, so what the hell is it setting and getting, and how would the syntax work?
    Like:
    public void setFirstName( String FirstName )
    FirstName = FirstName;
    Doesn't work. And I think it's because it refers to itself for its own definition, which is nonsense. But I can't figure out what's right.
    The second assignment is simpler, but it also makes no sense to me. The day, month, and year are not variables. And even if they are variables, the user doesn't input them only to have them displayed, right? So what is the assignment even asking for? This is all taken directly out of the book.
    Any help is appreciated. =/

    FuneralParlor wrote:
    I haven't a clue what they are. I've read about them online and in the Java API, and I still have no idea what they are.That's not a good sign.
    My current understanding is this: a constructor is code dedicated towards defining how to treat a variable.No. They initialize an object.
    When you buy a new XBox, you have to spend some time taking it out of the box, removing the packaging, and plugging the wires together. It's like that.
    But...I have to write two programs using constructors and I have no idea what to put in them. You don't necessarily need to put anything in them. Does your class require initialization on the objects created for it?
    And in fact everything I've tried gives compiler errors. I'm sure all of you know the quiet desperation and frustration I'm feeling.It sounds like you're trying random stuff, hoping something will work. Don't do that.
    Anyway, the assignments are:...
    >
    It all seems extremely vague, to me.It doesn't give you the answers, but it tells you how to do them. It's pretty specific.
    For the first assignment I've got:
    public class Employee
         public String FirstName;
         public String LastName;
         public double Salary;
    Which I think is right.Well, generally fields shouldn't be public; they should be private. Also, you're not following Java naming conventions. Fields should start with a lower-case letter ("firstName" not "FirstName").
    But all attempts to create a constructor that have failed...I don't even know what one does. It seems kind of absurd for my first two labs to be so simple, basically logic exercises, and this to be so mind-destroying.It's simple stuff. I find it hard to believe that you've read your textbook.
    I'll give you a hint. The assignment says:
    Your class should have a constructor that initializes the three instance variables. This means that the constructor will need to take arguments, so you can use the arguments's values to assign to the fields (instance variables).
    But the set and get methods...there's no data inputted into this program, so what the hell is it setting and getting,The assignment tells you exactly what's going to be invoking the setter and getter methods:
    Write a test application named EmployeeTest that demonstrates class Employee's capabilities. [etc]
    and how would the syntax work?
    Like:
    public void setFirstName( String FirstName )
    FirstName = FirstName;
    Doesn't work. And I think it's because it refers to itself for its own definition, which is nonsense. But I can't figure out what's right.Right. In this case, the parameter name is obscuring the field name. This is where the "this" keyword comes in handy:
    this.Firstname = Firstname;Your textbook and teacher should have mentioned this.
    The second assignment is simpler, but it also makes no sense to me. The day, month, and year are not variables. What do you mean they're not variables? The assignment clearly says to make them so.
    And even if they are variables, the user doesn't input them only to have them displayed, right? So what is the assignment even asking for? It's just a super-simplified example. You're right; it's worthless in terms of real-world practicality. It's just something pointless but simple for you to get practice with. Don't worry about it.

  • Making a join seems simple but I can't get it to work

    Hi All,
    I have 2 tables LUGallery and LUSubGallery, the tables are related by the GalleyID field
    LUGallery
    Gallery ID
    ClientID
    GalleryName
    5
    50
    Australia
    8
    50
    Weddings
    12
    33
    Portraits
    4
    33
    Landscapes
    LUSubGallery
    SubGalleryID
    GalleryID
    GalleryName
    67
    5
    NSW
    68
    5
    QLD
    69
    8
    Reception
    70
    8
    Location
    87
    8
    Ceromony
    97
    4
    Rain Forest
    What I am try to do seems simple but I can't get it to work the way I want it.
    I am trying to write a query to display Galleries from the LUGallery tbl that have a Sub Gallery attached to them (ie. It's GalleryID appears in the LUSubGallery tbl)
    So the query for the above example would list Australia, Weddings & Landscapes
    I have tried to write code both with inner joins and nested queries but just can't get it right,
    Any help would be greatly appreciated.
    Thanks in advance
    Kris

    I just want to
    display the GalleryNames from the LUGallery tbl once
    Then you probably do not want include all the extra columns from the LUSubGallery table.
    It returns all of the records from both tables that Have
    the same GalleryID
    That is the way this type of JOIN works. It will return one record for each matched GalleryID. If you only want to display the unique gallery names you can either:
    1) Use an EXISTS clause.  It will return the distinct records from the main gallery table IF a matching record exists in the LUSubGallery table
    --- Not tested ---
    SELECT  LUGallery.GalleryID,
    LUGallery.GalleryName
    FROM    LUGallery
    WHERE   EXISTS (
            SELECT  *
            FROM LUSubGallery
            WHERE LUGallery.GalleryID = LUSubGallery.GalleryID
    http://www.techonthenet.com/sql/exists.php
    ... OR ....
    2) Use the DISTINCT operator to return only the unique combinations of the selected columns. Note: DISTINCT considers all columns in the SELECT list . So if you only want unique galleries, do not include the LUSubGallery columns in the SELECT list.
    http://www.w3schools.com/SQl/sql_distinct.asp
    Message was edited by: -==cfSearching==-

  • Why is "erase junk mail" de-highlighted in the drop down menus.  I'm not able to delete my junk mail box without doing each one individually.  Simple, but please someone help with an answer.  Thanks.

    why is "erase junk mail" de-highlighted in the drop down menus.  I'm not able to delete my junk mail box without doing each one individually.  Simple, but please someone help with an answer.  Thanks.

    My daughter has had her Razr for about 9 months now.  About two weeks ago she picked up her phone in the morning on her way to school when she noticed two cracks, both starting at the camera lens. One goes completely to the bottom and the other goes sharply to the side. She has never dropped it and me and my husband went over it with a fine tooth comb. We looked under a magnifying glass and could no find any reason for the glass to crack. Not one ding, scratch or bang. Our daughter really takes good care of her stuff, but we still wanted to make sure before we sent it in for repairs. Well we did and we got a reply from Motorola with a picture of the cracks saying this was customer abuse and that it is not covered under warranty. Even though they did not find any physical damage to back it up. Well I e-mailed them back and told them I did a little research and found pages of people having the same problems. Well I did not hear from them until I received a notice from Fed Ex that they were sending the phone back. NOT FIXED!!! I went to look up why and guess what there is no case open any more for the phone. It has been wiped clean. I put in the RMA # it comes back not found, I put in the ID #, the SN# and all comes back not found. Yet a day earlier all the info was there. I know there is a lot more people like me and all of you, but they just don't want to be bothered so they pay to have it fix, just to have it do it again. Unless they have found the problem and only fixing it on a customer pay only set up. I am furious and will not be recommending this phone to anyone. And to think I was considering this phone for my next up grade! NOT!!!!

Maybe you are looking for

  • Image with button skin

    Hi,     I have a image control which is embed with button skin from swf. The effect is not getting affected in it. Only the image is getting loaded. Why is it behaving like this. Regards, Jayagopal.

  • View SQL before execution?

    I'm a newbie to CF, so I apologize in advance as I've searched everywhere and cannot find the answer to the following.  I have a .html forms page that submits user-entered data to a .cfc for insertion into a MySQL db (insert code is below.)  The inse

  • Upgrade Oracle Lite 9i to Oracle Lite 10g rel3

    Can you please advise me on the effort and impact in attempting to upgrade Oracle Lite 9i to Oracle Lite 10g rel3 ? Thank you.

  • How to extend the time line for the premiere on mac pro mavericks

    how to extend the time line for the premiere on mac pro mavericks

  • WRT54GS won't connect to the internet

    Why all of a sudden my Linksys Wireless-G Broadband, Won't let me connect to the internet? Had no problems til today and had this router for 2yrs I have 2 computers that are hooked directly to my wireless router and another computer in another room w