Jump to content

SQL help


light

Recommended Posts

It might have a different operator that does it, you might want to check the documentation for it. The operator is the "exclusive or" operator. If you don't use XOR it would be like this:SELECT * FROM table WHERE (cost=null AND year_acquired!=null) OR (year_acquired=null AND cost!=null)

Link to comment
Share on other sites

i m confusing with getting date using below query select colum1,colum2,column3 from table where date_last_out BETWEEN ( '01-NOV-99' AND '30-NOV-99 + 1')actually i m not getting the answerforis there any specific format for date?????plz help me on thatThanks in advance

Link to comment
Share on other sites

The first one is close. The soundex function returns a string of arbitrary length, but I think you're only interested in the first part. So you can use instr to figure out if the soundex string from the column contains the soundex string for "smith".SELECT P.NAME FROM CS260.PATRON PWHERE INSTR(SOUNDEX(P.NAME), SOUNDEX('SMITH')) = 1That says to select rows where the soundex string for smith shows up starting on character 1 in the soundex string for the name column. So there could be other characters after that, but you just want to be sure that it starts the same.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...