+ Reply to Thread
Page 5 of 5 FirstFirst ... 3 4 5
Results 41 to 50 of 50

Any suggestions ?

  1. Re: Any suggestions ?

    This is not an ORA error, is it ? VB compilation error ?

    Try this one...

    strSQL = "select * from ""Cottages"", ""Pricebands""" & _
    " where ""Location"" = '" & strLocation & "'" & _
    " and ""Price Number"" = '" & strDates & "'" & _
    " and ""Bedrooms Number"" = '" & strRooms & "'" & _
    " and ""Pets"" = '" & strPets & "'"

    To test it, I created a small file x.vbs

    C:\>type x.vbs

    strSQL = "select * from ""Cottages"", ""Pricebands""" & _
    " where ""Location"" = '" & strLocation & "'" & _
    " and ""Price Number"" = '" & strDates & "'" & _
    " and ""Bedrooms Number"" = '" & strRooms & "'" & _
    " and ""Pets"" = '" & strPets & "'"

    wscript.Echo strSQL

    Now I run cscript to see if my sintax is ok

    C:\>cscript x.vbs
    Microsoft (R) Windows Script Host Version 5.1 for Windows
    Copyright (C) Microsoft Corporation 1996-1999. All rights reserved.

    select * from "Cottages", "Pricebands" where "Location" = '' and "Price
    Number"
    = '' and "Bedrooms Number" = '' and "Pets" = ''

    C:\>

    Because the other variables were not declared nor initiliazed, there is
    nothing between the single quotes. But this looks like a valid SQL
    statement...

    "Mike" wrote in message
    news:BJXFd.1274$TT5.127@newsfe6-gui.ntli.net...
    > Luc
    >
    > Many many thanks for your very quick reply.......appreciated. I have
    > tried your statement but now get the following response :
    >
    > Expected end of statement
    >
    >
    > strSQL = "select * from "Cottages", "Pricebands" where "Location" = '&
    > strLocation &' and "Price Number" = '& strDates &' and "Bedrooms
    > Number" = '& strRooms &' and "Pets" = '& strPets &'"
    >
    > Any quick solution ? any chance I could email you the page for you to
    > look at in context ??
    >
    > Many thanks
    >
    > Luc Gyselinck wrote:
    >
    > > If you would take the time to elaborate this expression, it would
    > > look like:
    > >
    > > select * from Cottages, Pricebands where Location = '',
    > > Price Number = '', Bedrooms Number = '', Pets =
    > > ''
    > >
    > > You have several problems here
    > > 1. This is not a valid SQL statement, hence the ORA-00933 error
    > > 2. You do not use bind variables, you will blow up your sql area
    > > 3. There is no join condition between the two tables you select from,
    > > cartesian product, is this the intend ?
    > > 4. Are your table and column names case sensitive? If yes, you'll
    > > have to put the names between double quotes.
    > > 5. What about these columns in two words ? Price Number, etc...
    > >
    > > Give us a describe of the tables...
    > >
    > > SQL> select * from Cottages, Pricebands where Location =
    > > '', 2 Price Number = '', Bedrooms Number =
    > > '', Pets = ''
    > > SQL> /
    > > select * from Cottages, Pricebands where Location = '',
    > > *
    > > ERROR at line 1:
    > > ORA-00933: SQL command not properly ended
    > >
    > > SQL> create table test
    > > 2 ( "Price Number" number,
    > > 3 "Bedrooms Number" number)
    > > 4 /
    > >
    > > Table created.
    > >
    > > SQL> descr test
    > > Name Null? Type
    > > ----------------------------------------- --------
    > > ------------------------ ----
    > > Price Number NUMBER
    > > Bedrooms Number NUMBER
    > >
    > > SQL> insert into test values(1,1);
    > >
    > > 1 row created.
    > >
    > > SQL> commit;
    > >
    > > Commit complete.
    > >
    > > SQL> select Price Number from test
    > > 2 /
    > > select Price Number from test
    > > *
    > > ERROR at line 1:
    > > ORA-00923: FROM keyword not found where expected
    > >
    > > SQL> select "Price Number" from test
    > > 2 /
    > >
    > > Price Number
    > > ------------
    > > 1
    > >
    > > SQL> drop table test
    > > 2 /
    > >
    > > Table dropped.
    > >
    > > SQL>
    > >
    > > Here is something that looks closer to SQL:
    > >
    > > select * from "Cottages", "Pricebands" where "Location" =
    > > '' AND "Price Number" = '' AND "Bedrooms
    > > Number" = '' AND "Pets" = ''
    > >
    > > Good luck.
    > >
    > > "Mike" wrote in message
    > > news:x3XFd.543$N25.236@newsfe3-gui.ntli.net...
    > > > Anybody able to advise please
    > > >
    > > > I get the following message
    > > > ORA-00933: SQL command not properly ended
    > > >
    > > > which relates to the following statement
    > > >
    > > > strSQL = "select * from Cottages, Pricebands where Location = '"&
    > > > strLocation &"', Price Number = '"& strDates &"', Bedrooms Number =
    > > > '"& strRooms &"', Pets = '"& strPets &"' "
    > > >
    > > > What's wrong ??

    >




  2. Re: Any suggestions ?

    This is not an ORA error, is it ? VB compilation error ?

    Try this one...

    strSQL = "select * from ""Cottages"", ""Pricebands""" & _
    " where ""Location"" = '" & strLocation & "'" & _
    " and ""Price Number"" = '" & strDates & "'" & _
    " and ""Bedrooms Number"" = '" & strRooms & "'" & _
    " and ""Pets"" = '" & strPets & "'"

    To test it, I created a small file x.vbs

    C:\>type x.vbs

    strSQL = "select * from ""Cottages"", ""Pricebands""" & _
    " where ""Location"" = '" & strLocation & "'" & _
    " and ""Price Number"" = '" & strDates & "'" & _
    " and ""Bedrooms Number"" = '" & strRooms & "'" & _
    " and ""Pets"" = '" & strPets & "'"

    wscript.Echo strSQL

    Now I run cscript to see if my sintax is ok

    C:\>cscript x.vbs
    Microsoft (R) Windows Script Host Version 5.1 for Windows
    Copyright (C) Microsoft Corporation 1996-1999. All rights reserved.

    select * from "Cottages", "Pricebands" where "Location" = '' and "Price
    Number"
    = '' and "Bedrooms Number" = '' and "Pets" = ''

    C:\>

    Because the other variables were not declared nor initiliazed, there is
    nothing between the single quotes. But this looks like a valid SQL
    statement...

    "Mike" wrote in message
    news:BJXFd.1274$TT5.127@newsfe6-gui.ntli.net...
    > Luc
    >
    > Many many thanks for your very quick reply.......appreciated. I have
    > tried your statement but now get the following response :
    >
    > Expected end of statement
    >
    >
    > strSQL = "select * from "Cottages", "Pricebands" where "Location" = '&
    > strLocation &' and "Price Number" = '& strDates &' and "Bedrooms
    > Number" = '& strRooms &' and "Pets" = '& strPets &'"
    >
    > Any quick solution ? any chance I could email you the page for you to
    > look at in context ??
    >
    > Many thanks
    >
    > Luc Gyselinck wrote:
    >
    > > If you would take the time to elaborate this expression, it would
    > > look like:
    > >
    > > select * from Cottages, Pricebands where Location = '',
    > > Price Number = '', Bedrooms Number = '', Pets =
    > > ''
    > >
    > > You have several problems here
    > > 1. This is not a valid SQL statement, hence the ORA-00933 error
    > > 2. You do not use bind variables, you will blow up your sql area
    > > 3. There is no join condition between the two tables you select from,
    > > cartesian product, is this the intend ?
    > > 4. Are your table and column names case sensitive? If yes, you'll
    > > have to put the names between double quotes.
    > > 5. What about these columns in two words ? Price Number, etc...
    > >
    > > Give us a describe of the tables...
    > >
    > > SQL> select * from Cottages, Pricebands where Location =
    > > '', 2 Price Number = '', Bedrooms Number =
    > > '', Pets = ''
    > > SQL> /
    > > select * from Cottages, Pricebands where Location = '',
    > > *
    > > ERROR at line 1:
    > > ORA-00933: SQL command not properly ended
    > >
    > > SQL> create table test
    > > 2 ( "Price Number" number,
    > > 3 "Bedrooms Number" number)
    > > 4 /
    > >
    > > Table created.
    > >
    > > SQL> descr test
    > > Name Null? Type
    > > ----------------------------------------- --------
    > > ------------------------ ----
    > > Price Number NUMBER
    > > Bedrooms Number NUMBER
    > >
    > > SQL> insert into test values(1,1);
    > >
    > > 1 row created.
    > >
    > > SQL> commit;
    > >
    > > Commit complete.
    > >
    > > SQL> select Price Number from test
    > > 2 /
    > > select Price Number from test
    > > *
    > > ERROR at line 1:
    > > ORA-00923: FROM keyword not found where expected
    > >
    > > SQL> select "Price Number" from test
    > > 2 /
    > >
    > > Price Number
    > > ------------
    > > 1
    > >
    > > SQL> drop table test
    > > 2 /
    > >
    > > Table dropped.
    > >
    > > SQL>
    > >
    > > Here is something that looks closer to SQL:
    > >
    > > select * from "Cottages", "Pricebands" where "Location" =
    > > '' AND "Price Number" = '' AND "Bedrooms
    > > Number" = '' AND "Pets" = ''
    > >
    > > Good luck.
    > >
    > > "Mike" wrote in message
    > > news:x3XFd.543$N25.236@newsfe3-gui.ntli.net...
    > > > Anybody able to advise please
    > > >
    > > > I get the following message
    > > > ORA-00933: SQL command not properly ended
    > > >
    > > > which relates to the following statement
    > > >
    > > > strSQL = "select * from Cottages, Pricebands where Location = '"&
    > > > strLocation &"', Price Number = '"& strDates &"', Bedrooms Number =
    > > > '"& strRooms &"', Pets = '"& strPets &"' "
    > > >
    > > > What's wrong ??

    >




  3. Re: Any suggestions ?

    This is not an ORA error, is it ? VB compilation error ?

    Try this one...

    strSQL = "select * from ""Cottages"", ""Pricebands""" & _
    " where ""Location"" = '" & strLocation & "'" & _
    " and ""Price Number"" = '" & strDates & "'" & _
    " and ""Bedrooms Number"" = '" & strRooms & "'" & _
    " and ""Pets"" = '" & strPets & "'"

    To test it, I created a small file x.vbs

    C:\>type x.vbs

    strSQL = "select * from ""Cottages"", ""Pricebands""" & _
    " where ""Location"" = '" & strLocation & "'" & _
    " and ""Price Number"" = '" & strDates & "'" & _
    " and ""Bedrooms Number"" = '" & strRooms & "'" & _
    " and ""Pets"" = '" & strPets & "'"

    wscript.Echo strSQL

    Now I run cscript to see if my sintax is ok

    C:\>cscript x.vbs
    Microsoft (R) Windows Script Host Version 5.1 for Windows
    Copyright (C) Microsoft Corporation 1996-1999. All rights reserved.

    select * from "Cottages", "Pricebands" where "Location" = '' and "Price
    Number"
    = '' and "Bedrooms Number" = '' and "Pets" = ''

    C:\>

    Because the other variables were not declared nor initiliazed, there is
    nothing between the single quotes. But this looks like a valid SQL
    statement...

    "Mike" wrote in message
    news:BJXFd.1274$TT5.127@newsfe6-gui.ntli.net...
    > Luc
    >
    > Many many thanks for your very quick reply.......appreciated. I have
    > tried your statement but now get the following response :
    >
    > Expected end of statement
    >
    >
    > strSQL = "select * from "Cottages", "Pricebands" where "Location" = '&
    > strLocation &' and "Price Number" = '& strDates &' and "Bedrooms
    > Number" = '& strRooms &' and "Pets" = '& strPets &'"
    >
    > Any quick solution ? any chance I could email you the page for you to
    > look at in context ??
    >
    > Many thanks
    >
    > Luc Gyselinck wrote:
    >
    > > If you would take the time to elaborate this expression, it would
    > > look like:
    > >
    > > select * from Cottages, Pricebands where Location = '',
    > > Price Number = '', Bedrooms Number = '', Pets =
    > > ''
    > >
    > > You have several problems here
    > > 1. This is not a valid SQL statement, hence the ORA-00933 error
    > > 2. You do not use bind variables, you will blow up your sql area
    > > 3. There is no join condition between the two tables you select from,
    > > cartesian product, is this the intend ?
    > > 4. Are your table and column names case sensitive? If yes, you'll
    > > have to put the names between double quotes.
    > > 5. What about these columns in two words ? Price Number, etc...
    > >
    > > Give us a describe of the tables...
    > >
    > > SQL> select * from Cottages, Pricebands where Location =
    > > '', 2 Price Number = '', Bedrooms Number =
    > > '', Pets = ''
    > > SQL> /
    > > select * from Cottages, Pricebands where Location = '',
    > > *
    > > ERROR at line 1:
    > > ORA-00933: SQL command not properly ended
    > >
    > > SQL> create table test
    > > 2 ( "Price Number" number,
    > > 3 "Bedrooms Number" number)
    > > 4 /
    > >
    > > Table created.
    > >
    > > SQL> descr test
    > > Name Null? Type
    > > ----------------------------------------- --------
    > > ------------------------ ----
    > > Price Number NUMBER
    > > Bedrooms Number NUMBER
    > >
    > > SQL> insert into test values(1,1);
    > >
    > > 1 row created.
    > >
    > > SQL> commit;
    > >
    > > Commit complete.
    > >
    > > SQL> select Price Number from test
    > > 2 /
    > > select Price Number from test
    > > *
    > > ERROR at line 1:
    > > ORA-00923: FROM keyword not found where expected
    > >
    > > SQL> select "Price Number" from test
    > > 2 /
    > >
    > > Price Number
    > > ------------
    > > 1
    > >
    > > SQL> drop table test
    > > 2 /
    > >
    > > Table dropped.
    > >
    > > SQL>
    > >
    > > Here is something that looks closer to SQL:
    > >
    > > select * from "Cottages", "Pricebands" where "Location" =
    > > '' AND "Price Number" = '' AND "Bedrooms
    > > Number" = '' AND "Pets" = ''
    > >
    > > Good luck.
    > >
    > > "Mike" wrote in message
    > > news:x3XFd.543$N25.236@newsfe3-gui.ntli.net...
    > > > Anybody able to advise please
    > > >
    > > > I get the following message
    > > > ORA-00933: SQL command not properly ended
    > > >
    > > > which relates to the following statement
    > > >
    > > > strSQL = "select * from Cottages, Pricebands where Location = '"&
    > > > strLocation &"', Price Number = '"& strDates &"', Bedrooms Number =
    > > > '"& strRooms &"', Pets = '"& strPets &"' "
    > > >
    > > > What's wrong ??

    >




  4. Re: Any suggestions ?

    This message has been multiposted.



  5. Re: Any suggestions ?

    This message has been multiposted.



  6. Re: Any suggestions ?

    This message has been multiposted.



  7. Re: Any suggestions ?

    This message has been multiposted.



  8. Re: Any suggestions ?

    This message has been multiposted.



  9. Re: Any suggestions ?

    This message has been multiposted.



  10. Re: Any suggestions ?

    This message has been multiposted.



+ Reply to Thread
Page 5 of 5 FirstFirst ... 3 4 5