Link to home
Start Free TrialLog in
Avatar of Panos
PanosFlag for Germany

asked on

sql error.

Hello experts.
i'm trying to run the script below in sql server and have the error:
Server: Msg 170, Level 15, State 1, Line 8
Line 8: Incorrect syntax near ';'.
Server: Msg 170, Level 15, State 1, Line 12
Line 12: Incorrect syntax near '`'.

Any help?
specie.sql
Avatar of tigin44
tigin44
Flag of Türkiye image

try this
/*
SQLyog Community Edition- MySQL GUI v5.22a
Host - 5.0.24-community-nt : Database - test
*********************************************************************
Server version : 5.0.24-community-nt
*/


/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

create database if not exists test;

USE test;

/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

/*Table structure for table `specietype` */

DROP TABLE IF EXISTS specietype;

CREATE TABLE specietype (
  `TypeID` int(11) NOT NULL auto_increment,
  `Type` varchar(20) NOT NULL,
  PRIMARY KEY  (`TypeID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `specietype` */

insert  into specietype(`TypeID`,`Type`) values (1,'Mammals'),(2,'Birds'),(3,'Reptiles'),(4,'Fishes'),(5,'Corals'),(6,'Plants'),(7,'Seaweeds');


/*Table structure for table `specie` */

DROP TABLE IF EXISTS specie;

CREATE TABLE specie (
  `SpecieID` int(11) NOT NULL auto_increment,
  `TypeID` int(11) NOT NULL,
  `Specie` varchar(40) NOT NULL,
  PRIMARY KEY  (`SpecieID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table `specie` */

insert  into specie(`SpecieID`,`TypeID`,`Specie`) values (1,1,'Baiji'),(2,1,'Western Gorilla'),(3,1,'Sumatran Orangutan'),(4,1,'Speke\'s Gazelle'),(5,2,'White-headed Vulture'),(6,2,'Egyptian Vulture'),(7,2,'Mauritius Parakeet'),(8,3,'Gharial'),(9,3,'Blunt-nosed Leopard Lizard'),(10,3,'Santa Catalina Island Rattlesnake'),(11,3,'Phelsuma Antanosy'),(12,3,'Coachella Valley Fringe-toed Lizard'),(13,3,'Giant Gartersnake'),(14,3,'Panamint Alligator Lizard'),(15,4,'Banggai Cardinalfish'),(16,4,'Humphead Parrotfish'),(17,5,'Floreana Coral'),(18,5,'Wellington\'s Solitary Coral'),(19,6,'Wild Apricot'),(20,7,'Galapagos Kelp');


/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;

Open in new window

Avatar of Panos

ASKER

Hi.
Now i have this error:
Server: Msg 170, Level 15, State 1, Line 9
Line 9: Incorrect syntax near ';'.
Server: Msg 170, Level 15, State 1, Line 13
Line 13: Incorrect syntax near 'test'.
Server: Msg 170, Level 15, State 1, Line 17
Line 17: Incorrect syntax near ';'.
Server: Msg 170, Level 15, State 1, Line 25
Line 25: Incorrect syntax near '`'.
Server: Msg 170, Level 15, State 1, Line 32
Line 32: Incorrect syntax near '`'.
Server: Msg 170, Level 15, State 1, Line 40
Line 40: Incorrect syntax near '`'.
Server: Msg 170, Level 15, State 1, Line 48
Line 48: Incorrect syntax near '`'.
That script is for MySQL, not SQL Server

Avatar of Panos

ASKER

I have downloaded this from here:http://blog.webexterminator.com/index.cfm/2008/4/22/JQuery-Multiple-Selects-Example--SelectChainJS-and-ColdFusion
from the download link in the bottom.I don't know.
ASKER CERTIFIED SOLUTION
Avatar of lammy82
lammy82
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Panos

ASKER

Ohh!
Wrong answer.
So it is mysql.How can i change it to sql Server?
Avatar of Panos

ASKER

I did not see your last post.
I will try to follow your suggention.
Avatar of Panos

ASKER

Thank you
regards
panos