运行SQL语句报错 [问题点数:20分,结帖人wangleileo]

Bbs1
本版专家分:0
结帖率 100%
delphi中运行sql语句报错
Query1.SQL.Clear;rn //采用了md5加密rn Query1.SQL.Add('select * from CW_USER where USERNAME= ''' + dlyhm + ''' and CW_USER.PASSWORD= ''' + md5.MD5Print(md5.MD5String(RzEdit1.Text)) + '''');rn Query1.Open;rn请问这个代码有问题么,<em>运行</em>到这里会<em>报错</em>rn---------------------------rnDebugger Exception Notificationrn---------------------------rnProject raised exception class EDBEngineError with message 'Invalid use of keyword.rnToken: PASSWORD=rnLine Number: 1'. Process stopped. Use Step or Run to continue.rn---------------------------rnOK Help rn---------------------------rn
MySQL运行语句报错
我今天一个<em>语句</em>,居然报了一个错误,然后没辙了rncustomers表字段如下rn[img=https://img-bbs.csdn.net/upload/201412/14/1418566145_846732.png][/img]rn然后运用了change改变cust_age字段rn[img=https://img-bbs.csdn.net/upload/201412/14/1418566216_386739.png][/img]rn<em>报错</em>如上,求解决方法
mybatis运行sql报错
[b]这是<em>sql</em>,在数据库能查出来:[/b]rnSELECT COUNT(1) num,DATE_FORMAT( ordertime, "%Y-%m-%d" ) ordertime FROM t_order where DATE_SUB(CURDATE(), INTERVAL 30 DAY) ) ORDER BY ordertime ascrn在项目里一启动就<em>报错</em>.rn Cause: org.xml.sax.SAXParseException; lineNumber: 115; columnNumber: 127; 元素内容必须由格式正确的字符数据或标记组成。rn指的就是这条<em>sql</em>错了
kylin运行sql报错
Caused by: org.apache.hadoop.hbase.ipc.RemoteWithExtrasException(org.apache.hadoop.hbase.exceptions.UnknownProtocolException): org.apache.hadoop.hbase.exceptions.Unkno wnProtocolException: No register
sql语句报错
今天犯了一个很是低级的错误!SQL<em>语句</em><em>报错</em>=号附件有错误,在查询分析器里调试了,仔细看了半天才明白是把英文的=号不小心写成了中文的。这样的错误还真不好找。单步调试的时候 都是眼睛看一下,SQL<em>语句</em>没问题就OK了。没想到会这样!汗!
SQL语句报错(一)
SQL<em>语句</em><em>报错</em>(一) 1、具体<em>报错</em>如下: ORA-01861:文字格式字符串不匹配 01861. 00000 - &quot;literal does not match format string&quot; *Cause:Literals in the put must be the same length as literals in the format string ...
执行SQL语句报错
[code=SQL]rnSET QUOTED_IDENTIFIER ON rnGOrnSET ANSI_NULLS ON rnGOrnset quoted_identifier offrnGOrnrnexec('create PROC hisExchangeJour @' + @BeginDate + 'varchar(8),@' + @FinishDate + 'varchar(8), @' + @sfilename + 'varchar(50)rnAS rnrn IF ( EXISTS ( SELECT * FROM tempdb.dbo.sysobjects WHERE name = "##hisExchangeJour" ))rn DROP TABLE ##hisExchangeJourrnrndeclare @' + @filename + ' varchar(30)' + 'rnset @' + @filename + ' = @' + @sfilename + 'rnrnselect oc_date as 交易日期,rn fund_account as 资金帐号, rn ltrim(rtrim(client_name)) as 客户姓名, rn stock_account as 股东代码,rn client_group as 客户组别,rn stock_code as 证券代码, rn stock_name as 证券名称, rn casern when entrust_bs = "1" then "买入"rn when entrust_bs = "2" then "卖出"rn end as 交易方向, rn /* casern when real_type = 0 then "委托"rn when real_type = 1 then "查询"rn when real_type = 2 then "撤单"rn when real_type = 3 then "补单"rn end as 交易类别, */rn deliver_status as 交易类别, rn /* casern when real_status= 0 then "证券买卖"rn when real_status= 1 then "证券配股"rn when real_status= 2 then "配股入帐"rn when real_status= 3 then "红股入帐"rn when real_status= 4 then "新股入帐"rn when real_status= 5 then "权证入帐"rn when real_status= 6 then "股息入帐"rn when real_status= 7 then "证券托管"rn when real_status= 8 then "证券转托"rn when real_status= 9 then "证券冻结"rn when real_status= "A" then "指定交易"rn when real_status= "B" then "余额入账"rn when real_status= "C" then "申购配号"rn when real_status= "D" then "申购返款"rn when real_status= "E" then "申购中签"rn when real_status= "F" then "新股申购"rn when real_status= "G" then "购回业务"rn when real_status= "H" then "回购业务"rn when real_status= "I" then "成交通知"rn when real_status= "J" then "转债转股"rn when real_status= "K" then "转债回售"rn when real_status= "L" then "转债赎回"rn when real_status= "M" then "配售中签"rn when real_status= "N" then "ETF申购"rn when real_status= "O" then "配售确认"rn when real_status= "P" then "配售入账"rn when real_status= "Q" then "前台收费"rn when real_status= "R" then "证券质押"rn when real_status= "S" then "大宗交易"rn when real_status= "T" then "预受要约"rn when real_status= "U" then "收购入帐"rn end as 交易属性, */rn deliver_status as 交易属性,rn sum(abs(occur_amount)) as 成交数量,rn sum(abs(occur_amount) * abs(business_price)) as 成交金额 rn into ##hisExchangeJourrn from @' + @filename +rn ' where (oc_date between @'+ @BeginDate + ' and @' + @FinishDate + ') rngroup by oc_date,rn fund_account, rn client_name, rn client_group,rn stock_account,rn stock_code, rn entrust_bs, rn deliver_status,rn -- real_type,rn -- real_status, rn stock_namern') rnrnrnGOrnSET QUOTED_IDENTIFIER OFF rnGOrnSET ANSI_NULLS ON rnGOrnrnrn提示:Must declare the variable '@BeginDate'. 如何处理,谢谢。rnrn[/code]
SQL 语句报错
select band.*, ac.name, distinct(ac.id)rn from umc_user_banding bandrn left join umc_app_cluster ac on band.app_cluster_id = ac.idrnrn哪里问题啊?
sql语句报错
消息 8120,级别 16,状态 1,第 1 行rn选择列表中的列 'caacce.acce44' 无效,因为该列没有包含在聚合函数或 GROUP BY 子句中。rn消息 8120,级别 16,状态 1,第 1 行rn选择列表中的列 'caacce.acce06' 无效,因为该列没有包含在聚合函数或 GROUP BY 子句中。rn[code=SQL]selectrnrn(select stuff((select '$'+acce44+acce06+'('+(select ltrim(str(count(*))) rnfrom sent left join caacce as b on sent.acce01=b.acce01 rnwhere sent.cata01=catalogue.cata01 rnand b.acce44+b.acce06=caacce.acce44+caacce.acce06)+ '/' + ltrim(str(count(*))) + ')' rnfrom caacce where caacce.cata01=catalogue.cata01 group by '$'+acce44+acce06 for xml path('')),1,1,'')) acce06rnrnfrom catalogue left join caacce on catalogue.cata01=caacce.cata01[/code]
sql语句报错,请教~~~
请教下面这个哪里出错了呢~~~rnrn#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7 rnrnCREATE TRIGGER trg_taskrnAFTER UPDATE ON projectsrnFOR EACH ROWrnBEGINrnCASE NEW.project_statusrnWHEN 'COMPLETED' THENrnUPDATE tasks SET task_percent=100 WHERE project_id = NEW.project_id;rnWHEN 'CANCELLED' THENrnUPDATE tasks SET task_percent=-1 WHERE project_id = NEW.project_id;rnEND CASE;rnENDrnrn
sql 语句报错
SELECT * FROM REFERENCE_TABLE r WHERE r.REFERENCE_TYPE_CODE='42' WHERE r.START_DATE
sql语句执行报错
Dim cnn As New ADODB.Connectionrn cnn.ConnectionString = "Provider=Microsoft.ace.Oledb.12.0;data source=" & strApppath & "\score.accdb;"rn cnn.Open()rn cnn.Execute("alter table 资料 alter 年龄 set check 年龄>=0 and 年龄),词句<em>报错</em>“ALTER TABLE <em>语句</em>中的语法错误。”
SQL语句报错求解
[code=SQL]DECLARE @TId TABLE(RowN int IDENTITY (1, 1) NOT NULL, Id uniqueidentifier) INSERT INTO @TId (Id) SELECT TOP 20 id FROM (SELECT a.KnowledgeItemId AS id , '4095' as RightValue , isnull(cc.IsSign,0) as IsSign, cc.CreatedOn as SignOn ,'' AS EntityIconPath, a.Title , b.Name AS CatalogId , a.CatalogId AS vf_CatalogId , a.Status , a.Status AS vf_Status , a.State , a.State AS vf_State , a.CreatedBy, a.CreatedBy AS vf_CreatedBy , a.CreatedOn , a.Period FROM t_d_KnowledgeItem a LEFT JOIN t_d_KnowledgeCatalog b ON a.CatalogId=b.KnowledgeCatalogId left join (select distinct KnowledgeItemId, CreatedOn, 1 as IsSign from Gax_Platform.dbo.t_d_KnowledgeSignItem where UserId='1') as cc on cc.KnowledgeItemId= a.KnowledgeItemId WHERE a.AmendmentKnowledgeId is null IsSign=1 AND a.State=1 ) TAAA ORDER BY SignOn DESC SELECT COUNT(*) AS RecordCount FROM (SELECT a.KnowledgeItemId AS id , '4095' as RightValue , isnull(cc.IsSign,0) as IsSign, cc.CreatedOn as SignOn ,'' AS EntityIconPath, a.Title , b.Name AS CatalogId , a.CatalogId AS vf_CatalogId , a.Status , a.Status AS vf_Status , a.State , a.State AS vf_State , a.CreatedBy, a.CreatedBy AS vf_CreatedBy , a.CreatedOn , a.Period FROM t_d_KnowledgeItem a LEFT JOIN t_d_KnowledgeCatalog b ON a.CatalogId=b.KnowledgeCatalogId left join (select distinct KnowledgeItemId, CreatedOn, 1 as IsSign from Gax_Platform.dbo.t_d_KnowledgeSignItem where UserId='1') as cc on cc.KnowledgeItemId= a.KnowledgeItemId WHERE a.AmendmentKnowledgeId is null IsSign=1 AND a.State=1 ) TAAA IF EXISTS(SELECT * FROM @TId) SELECT * FROM (SELECT a.KnowledgeItemId AS id , '4095' as RightValue , isnull(cc.IsSign,0) as IsSign, cc.CreatedOn as SignOn ,'' AS EntityIconPath, a.Title , b.Name AS CatalogId , a.CatalogId AS vf_CatalogId , a.Status , a.Status AS vf_Status , a.State , a.State AS vf_State , a.CreatedBy, a.CreatedBy AS vf_CreatedBy , a.CreatedOn , a.Period FROM t_d_KnowledgeItem a LEFT JOIN t_d_KnowledgeCatalog b ON a.CatalogId=b.KnowledgeCatalogId left join (select distinct KnowledgeItemId, CreatedOn, 1 as IsSign from Gax_Platform.dbo.t_d_KnowledgeSignItem where UserId='1') as cc on cc.KnowledgeItemId= a.KnowledgeItemId WHERE a.AmendmentKnowledgeId is null IsSign=1 AND a.State=1 ) TAAA, @TId TId WHERE TId.RowN>=1 AND TId.RowN 附近有语法错误[/code]
SQL语句报错
select dkrq 到款日期,wpdm as 物品代码,count(distinct bh) as 总货物数,sum(wpjg) as 物品价格,sum(yf) as 邮费,sum(bxf) as 保修费,sum(zj) as 总价rnfrom orders rnwhere dkrq between '2005-11-1' and '2005-11-12'group by dkrq,wpdm order by dkrq,wpdmrnunion allrnselect '小计',count(distinct bh),sum(wpjg),sum(yf),sum(bxf),sum(zj) rnfrom orders rnwhere dkrq between '2005-11-1' and '2005-11-12' group by dkrq rnrn 为什么会<em>报错</em>? 请帮我纠正以下,谢谢!
sql语句竟然报错
set rs=server.createobject("Adodb.Recordset")rn<em>sql</em>="Select * from Staff where name='"&name&"' and bid='"&bid&"'(麻烦各位老大帮我看看这个<em>语句</em>有什么错误谢谢)rnrs.open <em>sql</em>,conn,1,2rnif rs.eof thenrn Response.Write " "rn Response.End()rnelsern bid=rs("bid")rn name=rs("name")rn end ifrn%>
sql语句报错问题。。。
declare @StartDate smalldatetimerndeclare @EndDate smalldatetimerndeclare @CurrentPage intrndeclare @PageSize intrndeclare @Sql varchar(3000)rnrnset @CurrentPage = 5rnset @PageSize = 10rnset @StartDate = '2006-3-28 15:41:47'rnset @EndDate = '2006-3-29 15:41:47'rnrnif (@CurrentPage = 1)rnbeginrn select top @PageSize * from (SELECT UserName,sum(ParticipateMoney) as ParticipateMoney,sum(Profit) as Profit FROM VI_Array3_Stat where CreateTime between @StartDate and @EndDate group by UserName order by participatemoney desc)rnendrnrnrnrn报如下错误:rnrn消息 170,级别 15,状态 1,第 14 行rn第 14 行: '@PageSize' 附近有语法错误。rn消息 156,级别 15,状态 1,第 14 行rn在关键字 'order' 附近有语法错误。rnrnrn应该怎么改呢? rn
我的SQL语句报错
/对数据源执行delete激发srn protected void gvOrderInfo_RowDeleting(object sender, GridViewDeleteEventArgs e)rn rn string <em>sql</em>str = "delete from tb_OrderInfo where OrderID='"+gvOrderInfo.DataKeys[e.RowIndex].Value+"'"; - 这儿<em>报错</em>rn <em>sql</em>operate.DataCom(<em>sql</em>str);rn Response.Redirect("OrderManage.aspx");rn rnrn错误为:用户代码未处理ArgumentOutOfRangeExceptionrnrn索引超出范围。必须为非负值并小于集合大小。rn参数名: indexrnrnrnrn在我的用户名为三个汉字的时候点击删除就<em>报错</em>!但是用户名为两个汉字的时候就不<em>报错</em>!请问我该怎么修改呀!
PLSQL下sql语句报错
PLSQL下<em>sql</em><em>语句</em><em>报错</em>rn我在PLSQL下写了如下<em>语句</em>:rnrnCREATE GLOBAL TEMPOPARY TABLE tempprn  (uni_no char(40) Primary key,item_name varchar2(100),price number(7,2)) rn  ON COMMIT PRESERVE ROWSrn报 ora-00901:无效CREATEl命令 为什么啊?
SQL语句怎么会报错???
rnrn参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。 rnrn/manage/xzadmin.asp,行54 rnrn表中除了id 其他都允许空,而且有值!rn
简单的SQL语句报错
select top 10*2 did from dbo.GM_Diary order by did descrn为什么会在 2 这里<em>报错</em>
SQL语句为什么报错
Select Str(Round(Detail_Week1_Weight/(BasicInfo_Height*BasicInfo_Height),2)) as Detail_Week1_BMI from tb_Detail where Detail_No = 'LD-001-001'rnrn<em>报错</em>:至少一个参数没有被指定值。
SQL语句老是报错
我用的<em>sql</em> 2008数据库,其中有一个Weight_CheHao(字符型)字段和一个Weight_EmptyDateTime(datetime型)字段,后一个字段允许Null值,可是用下面的<em>语句</em>老是<em>报错</em>:rnprivate void buttonX1_Click(object sender, EventArgs e)rn rn string chehao = "陕ST9876";rn string <em>sql</em> = "Insert into tb_Weight (Weight_CheHao,Weight_EmptyDateTime) values ('" + chehao + "'," + null + ")";rn tryrn rn dbc.ExecSql(<em>sql</em>);rn rn catch (Exception ex)rn rn MessageBox.Show("出错啦!");rn rn rnrn请各位高手帮看看是何原因?谢谢!
SQL语句报错
"SELECT GID, ORDER_INFO.VID,数量, 购买日期,期望到货日期,OPID,订单ID " +" FROM ORDER_INFO,VIP_INFO WHERE 用户名='" + name+ "' AND VIP_INFO.VID = ORDER_INFO.VID GROUP BY 订单ID ORDER BY 订单ID";rn会<em>报错</em>:rnMicrosoft OLE DB Provider for ODBC Drivers (0x80040E14)rn[Microsoft][ODBC SQL Server Driver][SQL Server]列 'ORDER_INFO.GID' 在选择列表中无效,因为该列既不包含在聚合函数中,也不包含在 GROUP BY 子句中。rn请问为什莫?
sql语句错误报错
错误:Cause: com.my<em>sql</em>.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use ne
一个sql语句报错
[code=SQL]select id, name from rn (select 1 as id, 'new' as name UNION select 2 as id, 'dealing' as name UNION select 3 as id, 'shipped' as name)[/code]
有关sql语句报错
消息 103,级别 15,状态 4,过程 Sp_COPD_SaleProductAnalysis_V,第 105 行rn以 ' Insert Into #tmp_FilterFg(fFgCode,fDevproperty,fVFg) rn Select fFgCode ,fDevproperty,fcorrespondcode rn From t_COPM_F' 开头的 标识符 太长。最大长度为 128。rnrnrnrn请问哪位高手知道,怎样快速查询<em>sql</em><em>报错</em>?谢谢!
sql 语句报错
1、关于MyBatis一些小错误,元素内容必须由格式正确的字符数据或标记组成.(oracle) 今天在Mapper.xml文件写查询<em>语句</em>报了个奇怪的错误 Caused by: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseExce...
hibernate sql语句报错
[code=java]final String hql = "update pain m set m.sprq = to_date(':sprq','yyyy-mm-dd hh24:mi:ss'),m.spr = :spr";rn return hibernateDao.createQuery(hql).setString("sprq", sprq)rn .setString("spr", spr).executeUpdate();[/code]rnrnrn求大神们帮忙看看我这个<em>sql</em>怎么一执行就报下面的错误rnParameter sprq does not exist as a named parameter in [update pain m set m.sprq = to_date(':sprq','yyyy-mm-dd hh24:mi:ss'),m.spr = :spr]
Mybits SQL语句报错
SQL:rnrn rn select count(*) from tb_item where 1=1 LIMIT #start , #pageSizern rnrn<em>报错</em>rnThe error occurred while setting parametersrn### SQL: select count(*) from tb_item LIMIT ? , ?rn### Cause: com.my<em>sql</em>.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:[b] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'null , null' at line 1[/b]rn; bad SQL grammar []; nested exception is com.my<em>sql</em>.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'null , null' at line 1] with root cause
sql语句with报错
我在workbench里面进行<em>sql</em>查询rnrn使用with语法出错rn[img=https://img-bbs.csdn.net/upload/201404/24/1398337193_784276.jpg][/img]rnrn<em>报错</em>信息:rnwith a asrn (SELECT p_idrn FROM oncampus.post, oncampus.userrn where (oncampus.post.u_id = oncampus.user.u_id)rn ) Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a asrn (SELECT p_idrn FROM oncampus.post, oncampus.userrn where (oncampus.post.u_id =' at line 1
执行sql语句报错
后台程序执行<em>语句</em>的时候,日志<em>报错</em>如下:rn INSERT INTO MEDIC_DEFECTSCONFIRMED_2014rn (SNrn ,UHIDrn ,DATE_VALIDATEDrn ,IDSrn ,PATIENT_IDrn ,PATIENTNAMErn ,SEXrn ,DIVISIONrn ,MEDIC_IDrn ,MEDIC_NAMErn ,MEDIC_DATErn ,DELETE_FLAGrn ,HIS_IN_NOrn ,HIS_OUT_NOrn )rn VALUESrn (@SNrn ,@UHIDrn ,@DATE_VALIDATEDrn ,@IDSrn ,@PATIENT_IDrn ,@PATIENTNAMErn ,@SEXrn ,@DIVISIONrn ,@MEDIC_IDrn ,@MEDIC_NAMErn ,@MEDIC_DATErn ,'0'rn ,@HIS_IN_NOrn ,@HIS_OUT_NO)rn rn,系统错误为索引超出范围。必须为非负值并小于集合大小。rn参数名: indexrnrn各位大神帮忙分析下是什么原因?
在Linux命令行,运行sql语句
[oracle@ls ~]$ echo "select count(*) from tab;" | <em>sql</em>plus -s sys/oracle as sysdba COUNT(*) ---------- 4750
批量运行sql语句
DB2: <em>运行</em>db2cmd,切换到x.<em>sql</em>所在目录下,输入“db2”进入“db2 =&gt;”状态,否则每次输入命令前都需要输入“ db2”,呵呵 way1输入“connect to 数据库名 user 用户名 using 密码”,输入“ -tvf xxx.<em>sql</em>” way2 c:\...... db2 -tvf <em>sql</em>表名 &gt; xxx.txt 其中“&gt; xxx.txt”为导入结果...
如何运行SQL语句
首先……我是超级小白,小白的程度肯定要比你想象的要更小白……rnrn我在康盛创想买的一个主机,给了一个MYSQL数据库,给了一个账号和密码。rnrn然后,我安装什么DISCUZ啊,WIKI啊,WORDPRESS什么的,操作都很简单,只要输入数据库名,账号和密码就成。rnrn也就是说我在基本啥都不懂的情况下才安装了DISCUZ这些需要数据库的东西。rnrn可是现在问题出来了,我在安装WIKI插件的时候,其中有一个步骤是:rnrnInitialize the MySQL tables by using database initialization SQL queriesrnrn我知道是要创建一个表,然后我又看见了:rnDatabasernRun the following SQL commands in the wiki database if $wfDBprefix is not set (or if you do not know what $wfDBprefix is)rnrn同时在下方给出了一大堆SQL<em>语句</em>,如:rnrn-- rn-- Table structure for table `ratings_info`rn-- rnrnCREATE TABLE `ratings_info` (rn `poll_id` varchar(32) collate utf8_unicode_ci NOT NULL,rn `poll_txt` text collate utf8_unicode_ci,rn `poll_date` datetime default NULL,rn `poll_title` varchar(255) collate utf8_unicode_ci default NULL,rn `poll_domain` varchar(10) collate utf8_unicode_ci default NULL,rn PRIMARY KEY (`poll_id`)rn) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;rnrn-- --------------------------------------------------------rnrn-- rn-- Table structure for table `ratings_message`rn-- rnrnCREATE TABLE `ratings_message` (rn `poll_id` varchar(32) collate utf8_unicode_ci NOT NULL,rn `poll_user` varchar(255) collate utf8_unicode_ci NOT NULL,rn `poll_ip` varchar(255) collate utf8_unicode_ci default NULL,rn `poll_msg` text collate utf8_unicode_ci,rn `poll_date` datetime NOT NULL default '0000-00-00 00:00:00',rn PRIMARY KEY (`poll_id`,`poll_date`)rn) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;rnrn-- --------------------------------------------------------rnrn-- rn-- Table structure for table `ratings_vote`rn-- rnrnCREATE TABLE `ratings_vote` (rn `poll_id` varchar(32) collate utf8_unicode_ci NOT NULL,rn `poll_user` varchar(255) collate utf8_unicode_ci NOT NULL,rn `poll_ip` varchar(255) collate utf8_unicode_ci NOT NULL,rn `poll_answer` int(3) default NULL,rn `poll_date` datetime default NULL,rn PRIMARY KEY (`poll_id`,`poll_ip`)rn) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;rnrn============rn我知道这些<em>语句</em>的作用都是为了在MYSQL里面创建一个表,可是问题来了:rnrn我该如何在MYSQL里<em>运行</em>这样的SQL<em>语句</em>呢??我现在只有“数据库名”“数据库服务器”“访问范围”“归属主机”,还有账号密码这些信息。我该怎么做……??请想象我是一个啥都不懂的小白……谢谢各位了!!
SQL语句运行提示
select g.FNumber, t_icitem.Fname as '物料名称',t_icitem.Fmodel as '规格',g.期初结存数量,g.单价1,rng.期初余额 ,g.本期收货数量,g.单价2,g.本期收入金额,g.本期发出数量,g.单价3,g.本期发出金额,g.期末结存数量,rng.单价4,g.期末余额 from rn(select FYear as '会计年度',Fperiod as '会计期间',t.FNumber AS '物料代码',rnsum(FBegQty) as '期初结存数量',(case when sum(FBegQty)='0' then 0rn when sum(FBegQty)<>'0' then round((sum(FBegBal)/sum(FBegQty) ),4)rn else null end) as 单价1,sum(FBegBal) as '期初余额',rnsum(FReceive) as '本期收货数量',(case when sum(FReceive)='0' then 0rn when sum(FReceive)<>'0' then round((sum(FDebit)/sum(FReceive)),4)rn else null end)as 单价2 ,sum(FDebit) as'本期收入金额',rnrnsum(FSend)as '本期发出数量',(case when sum(FSend)='0' then 0rn when sum(FSend)<>'0' then round((sum(FCredit)/sum(FSend)),4)rn else null end) as 单价3, sum(FCredit) as '本期发出金额',rnsum(FEndQty) as '期末结存数量',(case when sum(FEndQty)='0' then 0rn when sum(FEndQty)<>'0' then round((sum(FEndBal)/sum(FEndQty)),4)rn else null end) as 单价4,sum(FEndBal) as '期末余额'rnfrom icbal I inner join t_icitem t on I.FITEMID=T.FITEMID left join t_stock ts on ts.FItemID=I.FStockGroupIDrnrnwhere FYear='2014'and Fperiod='3'AND ts.fname like '漆包%'rngroup by FYear ,Fperiod,t.FNumberrn )g , t_icitem where g.FNumber=t_icitem.FNumberrnrn<em>运行</em>时老提示,请看附图rn[img=https://img-bbs.csdn.net/upload/201408/05/1407220073_348882.jpg][/img]
Django运行SQL语句
1、Manager.raw(raw_query,params=None,translations=None) &gt;&gt;&gt; for p in Person.objects.raw('SELECT * FROM myapp_person'): ... print(p) John Smith Jane Jones 这个方法接受一个原始的SQL查询,执行它,并返...
运行SQL语句
procedure RunSQL(<em>sql</em> : string);var  comm : TAdoCommand;begin  comm := TAdoCommand.Create(nil);  comm.Connection := DM_Frm.AdoConn;  comm.CommandText := <em>sql</em>;  comm.Execute;  FreeAndNil(Comm);end;
SQL语句运行不了
<em>语句</em>rnstrCmd="insert into a(aa,bb) select aa,bb from b"rn在oracle里可以<em>运行</em>,但放到C#程序里<em>运行</em>不了,请问是什么原因?
怎样运行sql语句?
我要生成一个存储过程,脚本写好了,怎摸在C#中<em>运行</em>它呢?rncon="server=localhost\<em>sql</em>express;database=Px;integrated security=true"rn<em>sql</em>=aaa//aaa为生成存储过程的脚本rn怎摸样执行呢rn
运行sql语句的错误
ado连接oracle数据库:rnrnm_pRecordset = m_pConnect->Execute("select table_name from all_tables;",&RecordAffected,adModeUnknown);rnrn这样可以正确获得查询结果。rnrnrn但是改成下面这样就会出错:rnrnrnm_pRecordset = m_pConnect->Execute("select table_name from all_tables where owner='SCOTT';",&RecordAffected,adModeUnknown);rnrn 我认为关键在where owner='SCOTT',这里的单引号''怎样传进去呢? 我加了一个 / 也不行。
mysql运行sql脚本报错
从服务器上备份表数据到本地,使用的工具是Navicat,右键表转储<em>sql</em>文件,但是在本地<em>运行</em><em>sql</em>文件时一直报异常 1 2 [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server v
SQL语句报错不知道啥意思
INSERT INTO [test].[dbo].[高考]rn ([姓名]rn ,[准考证]rn ,[语文]rn ,[数学]rn ,[英语]rn ,[+1课程]rn ,[综合]rn ,[加分])rn VALUESrn ( tenyrn , 1000rn , 12rn , 32rn , 32rn , 53rn , 43rn ,) 0rn报的错误是rn消息 128,级别 15,状态 1,第 12 行rn在此上下文中不允许使用名称 "teny"。有效表达式包括常量、常量表达式和变量(在某些上下文中)。不允许使用列名。rnrn
SQL语句报错,请赐教
<em>语句</em>如下:rninsert into db_0003.dbo.MF_IJ select * from db_0002.dbo.MF_IJ rnwhere db_0003.dbo.MF_IJ.ij_no <>db_0002.dbo.MF_IJ.ij_nornand db_0002.dbo.MF_IJ.IJ_NO like '%WO%' rnOR db_0002.dbo.MF_IJ.BIL_TYPE='01' rnOR db_0002.dbo.MF_IJ.BIL_TYPE='02' rnOR db_0002.dbo.MF_IJ.BIL_TYPE='03' rnOR db_0002.dbo.MF_IJ.BIL_TYPE='04' rnOR db_0002.dbo.MF_IJ.BIL_TYPE='05'rnrn在查询分析器里面执行后显示如下错误:rnrn服务器: 消息 107,级别 16,状态 3,行 1rn列前缀 'db_0003.dbo.MF_IJ' 与查询中所用的表名或别名不匹配。rnrn我检查了数据库名和表名都正确的,但还是报这样的错误,请各位高手赐教rnrn
SQL语句使用IIF报错
执得以下<em>语句</em>报编译错误,请指点IIF<em>语句</em>的正确写法,rnSet StuGrid.DataSource = QueryExt("SELECT 基信人员.*, IIf(([可送车])=-1,"[color=#FF0000]是[/color]","否") AS 是否送车 FROM 基信人员;")rn谢谢!!!
分行写SQL语句报错
[code=C/C++]rn1. csSql.Format(_T("\rn Select Number from Cargo where CargoId = '%s'\rn "),csCargoId);rnrn2. csSql.Format(_T("Select Number from Cargo where CargoId = '%s'"),csCargoId);rn rn m_rs.Open(CRecordset::forwardOnly,csSql,CRecordset::readOnly);rn[/code]rnrn我在程序中执行SQL<em>语句</em>,将其写成第一种形式<em>运行</em>中就出错,写成第二种形式就不会出错。rn后来又发现除了select<em>语句</em>,其他的delete、insert、update<em>语句</em>,写成第一种分行的形式都不会出错,请教是什么原因呢?
oracle执行SQL语句报错
conn.BeginTransrnconn.Execute (<em>sql</em>1),程序执行到这一步<em>报错</em>,抛出“[Oracle][ODBC][Ora]ORA-01013”错误,<em>sql</em>1的内容为rnupdate terminmerch set term_id='00008525', standby = '111111111111|22111' where merch_id = '001033333333333' and term_id ='00009525'rn如果这一句在<em>sql</em>/plus中执行没问题,为什么在程序中就<em>报错</em>呢rn还有,如果没有term_id='00008525',则在程序,还是<em>sql</em>/plus中都能正确执行,这是什么原因
SQL语句报错?(union函数)
select dkrq 到款日期,wpdm as 物品代码,count(distinct bh) as 总货物数,sum(wpjg) as 物品价格,sum(yf) as 邮费,sum(bxf) as 保修费,sum(zj) as 总价rnfrom orders rnwhere dkrq between '2005-11-1' and '2005-11-12'group by dkrq,wpdm order by dkrq,wpdmrnunion allrnselect '小计',count(distinct wpdm),count(distinct bh),sum(wpjg),sum(yf),sum(bxf),sum(zj) rnfrom orders rnwhere dkrq between '2005-11-1' and '2005-11-12' group by dkrq rnrnrn估计是dkrq 到款日 和'小计'不符和,怎么处理啊??谢谢!rn
执行SQL语句报错
String^ sOraConnString = "Data Source=L3DB1; User Id=lgmes; Password=lgmes;";rnrnrnString^ sOraCommand = "select * from CHeatID"; rnOracleConnection Conn( sOraConnString );rnrnConn.Open();rnOracleCommand Command( sOraCommand ); rnrnint iRcdCount = 0;rniRcdCount = Command.ExecuteNonQuery;rnrn<em>报错</em>类型的异常出现在System.data.oracleClient.dll中rn其他信息:无效操作,连接被关闭
求助ing,sql语句报错,
select p.part_no as po ,p.in_Client as ref_id,convert(char(10), h.ok_date,20) as date_io,rn datediff(day,h.ok_date,getdate() ) as days ,case when datediff(day,h.ok_date,getdate() ) then p.pn_in_stock else 0 end as Over_days From msh_in_part p,msh_in_head h rn where p.pro_id=h.pro_id and h.in_job_id=p.in_job_id and h.in_ok= 'Y' rn and p.pn_in_stock > 0 and datediff(day,h.ok_date,getdate() )rnrn执行之后报‘消息 156,级别 15,状态 1,第 1 行rn在关键字 'then' 附近有语法错误。’rn各位帮忙看看了,case when .....then<em>语句</em>到底哪里用错 了,谢谢了...
sql语句报错 求帮忙~
rn StringBuffer sb = new StringBuffer("select * from tb_booktype");rn if(StringUtil.isNotEmpty(booktype2.getBookTypeName()))rn sb.append("and bookTypeName like '%"+booktype2.getBookTypeName()+"%'");rn rn //String <em>sql</em>="select *from tb_booktype";rn PreparedStatement pstmt=con.prepareStatement(sb.toString().replaceFirst("and", "where"));rn return pstmt.executeQuery();rn这样子写SQL<em>语句</em>不可以吗,检查了好几遍整个程序的上下文逻辑,以及异常分析,基本确定应该是这个<em>语句</em>出了错 导致<em>运行</em>过程中抛异常 求助大神修改 就是指定条件(书名)的从数据库中查找 谢啦rn
JdbcTemplate执行sql语句报错
今天执行一个<em>sql</em><em>语句</em>,<em>报错</em> java.<em>sql</em>.SQLSyntaxErrorException: ORA-00942,这是<em>sql</em><em>语句</em>:rnSELECT p.proj_id As PROJECTDBID,rn proj.PROJ_SHORT_NAME PROJECTID,rn p.wbs_name PROJNAME,rn P0.UDF_TEXT As MRPNumber,rn e.EPS,rn SUBSTR(e.EPS, instr(e.EPS, '.', -1) + 1) AS EPS_NODErn FROM PROJWBS prn INNER JOIN PROJECT proj ON p.proj_id = proj.proj_idrn INNER JOIN (SELECT pc.proj_id,rn pv.proj_catg_short_name,rn pt.proj_catg_type_id,rn pv.proj_catg_idrn FROM PROJPCAT PCrn INNER JOIN PCATVAL PV on pc.proj_catg_id = pv.proj_catg_idrn INNER JOIN PCATTYPE PT on pt.proj_catg_type_id =rn pv.proj_catg_type_idrn WHERE pt.proj_catg_type =rn 'Mandatory Integration - SyncProject') pcvt1 on p.proj_id =rn pcvt1.proj_idrn AND pcvt1.proj_catg_short_name = 'Y'rn LEFT JOIN (SELECT FK_ID, UDF_TEXT, UDF_DATE, UDF_NUMBER, 'Y' AS UDF_EXISTSrn FROM UDFVALUE UVrn JOIN UDFTYPE UT ON UT.UDF_TYPE_ID = UV.UDF_TYPE_IDrn AND UT.UDF_TYPE_LABEL LIKErn 'MAND INT- DS COMMOPS ERP PROJ#'rn AND UT.TABLE_NAME LIKE 'PROJECT') P0 ON P0.FK_ID =rn P.PROJ_IDrn INNER JOIN (SELECT p.WBS_ID,rn REPLACE(trim(leading '\' FROMrn sys_connect_by_path(p.wbs_short_name, '\')),rn '\',rn '.') EPS,rn LEVELrn FROM PROJWBS prn INNER JOIN PROJECT proj ON p.proj_id = proj.proj_idrn START WITH p.parent_wbs_id IS NULLrn CONNECT BY PRIOR p.wbs_id = p.parent_wbs_idrn AND proj.project_flag = 'N') e ON e.WBS_ID =rn p.parent_wbs_idrn WHERE proj.project_flag = 'Y'rn AND p.proj_node_flag = 'Y'rn AND proj.orig_proj_id IS NULLrn AND (UPPER(proj.PROJ_SHORT_NAME) like ? or UPPER(p.wbs_name) like ?)rn ORDER BY EPS, EPS_NODE, PROJNAME rn rnjava调用:rnString projectUp = "%" + project.toUpperCase() + "%"; rnStringBuffer totalSQL = new StringBuffer(" SELECT count(*) FROM (");rn totalSQL.append(getProjects);rn totalSQL.append(") temp");rn System.out.println("totalSQL="+totalSQL); return jdbcTemplate.queryForInt(totalSQL.toString(),new String[]projectUp,projectUp);rn其中project是从页面传递的参数,getProject就是指向如上<em>sql</em><em>语句</em>的属性,有setter,getter方法,希望大家帮忙解决,不胜感激
为什么这个SQL语句报错
select id from table1 where id not in ;rnrn<em>报错</em>:rnERROR 位于第一行:rnORA-00936:缺少表达式rnrnrn是什么原因?这个句子有什么错误?
SQL语句报错!急求!
PS:由于我的电脑是国内买的,我输入美国老师的代码,时间<em>语句</em>:rnINSERT INTO PROJECT VALUES(rn'2010 Q3 Product Plan', 'Marketing', 135.00, '[b]10-MAY-10[/b]', '15-JUN-10'); <em>报错</em>;rnrn所以我想把时间格式改为美国:rnSQL> alter session set nls_date_language='american';rnSession alteredrnrn但<em>报错</em>如下rn消息 102,级别 15,状态 1,第 1 行rn'>' 附近有语法错误。rnrn本人新手,<em>语句</em>是通过新建查询输入的。 求大神啊!
一个很简单的sql语句报错
[code=SQL] create table test1 ( rncolumn1 varchar2(100) rn , id varchar2(40) not null rn , column2 number(10) rnrn ) rntablespace jzsoft pctfree 10 pctused 40 initrans 1rn maxtrans 255 storage ( initial 64K minextents 1 maxextents unlimited )rn;rn comment on table test1 is '测试1' ;rn comment on column test1.column2 is '字段2';[/code]rn这个是我在procedure中生成的<em>sql</em><em>语句</em>。rn存在一个变量(ls_create)中。rnexecute immediate ls_create;时 会报ORA-00911: 无效字符;rn但是我copy出来直接执行又不<em>报错</em>。请问这个是怎么回事。
android SQL TOP语句报错
![图片说明](https://img-ask.csdn.net/upload/201505/12/1431395746_423893.png)n我用top<em>语句</em>,<em>报错</em>,请问要怎么写?
Oracle SQL语句编写报错
INSERT INTO temp_v_road_dist rn (row_id,created,CREATED_BY,LAST_UPD,LAST_UPD_BY,MODIFICATION_NUM,CONFLICT_ID,DISTRICT_ID,ROAD_ID,EVEN_START_NUM,EVEN_END_NUM,GATE_ODD_START_NUM,GATE_ODD_END_NUM,TYPE,DESCRIPTION)rn select rn s_sequnce_pkg.get_next_rowid,SYSDATE - 1 / 3,C.CREATED_BY,SYSDATE - 1 / 3,C.LAST_UPD_BY,C.MODIFICATION_NUM,0,s_sequnce_pkg.get_next_rowid,C.X_ROAD_ID,:P2_EVEN_START_NUM,:P2_EVEN_END_NUM,:P2_GATE_ODD_START_NUM,:P2_GATE_ODD_END_NUM,'PrivateBroadband',C.NAMErn from dualrn union allrn select s_sequnce_pkg.get_next_rowid,SYSDATE - 1 / 3,C.CREATED_BY,SYSDATE - 1 / 3,C.LAST_UPD_BY,C.MODIFICATION_NUM,0,s_sequnce_pkg.get_next_rowid,C.X_ROAD_ID,:P2_EVEN_START_NUM,:P2_EVEN_END_NUM,1,9999,'PrivateBroadband',C.NAMErn from dualrn where :P2_EVEN_START_NUM is not null and :P2_GATE_ODD_START_NUM is null; rnrnrn为何会<em>报错</em>PL/SQL: ORA-01790: expression must have same datatype as corresponding expression ORA-06550: line 23, column 6: PL/SQL: SQL Statement ignoredrn这个<em>语句</em>是在Oracle apex上开发<em>运行</em>的
java执行sql语句报错
一条简单的sql语句报错
环境:delphi6,dbf数据库rn目的:从表tb的列path中提取文件名并替换:c:\mydoc\1213\abc.jpg得到abc.jpgrn实现:rnq<em>sql</em>:='update tb set path=right(path,7)';rnquery1.<em>sql</em>.add(q<em>sql</em>);rnquery1.exec<em>sql</em>;rn结果出错:rninvalid use of keyword token: right(path,7)rnrn但是这条<em>语句</em>单独<em>运行</em>在<em>sql</em> server环境中则没有问题
请教SQL的UPDATE语句报错
strSQL = "UPDATE [qxsz] SET [客房预定]= [color=#FF0000]'[/color]"& Check1(0).Value ,住宿登记= '"& Check1(1).Value"rn<em>报错</em>,请教应如何改
adoquery1使用的sql语句报错
adoquery1.Close;rnadoquery1.SQL.Clear;rnadoquery1.SQL.Add('select 姓名 as 姓名,max(case when 课程='语文' then 分数 else 0 end)语文,max(case 课程 when '数学' then 分数 else 0 end)数学,max(case 课程 when '物理' then 分数 else 0 end)物理 into #tb1 from tb group by 姓名');rnadoquery1.open;rnrn<em>报错</em>内容:rn[error]unit1.pas[74]:illegal character in input file:'语'[$D3EF]rn[error]unit1.pas[74]:illegal character in input file:'数'[$CAFD]rn[error]unit1.pas[74]:illegal character in input file:'物'[$CEEF]rn[Fatal error]project1.drp[5]:Could not compile used unit 'unit1.pas'
sql 语句报错 很奇怪
[code=<em>sql</em>]alter proc AnnualReportAuditing @year intrnasrnbeginrn create table #person(rn _index int IDENTITY (1,1) not null,rn personId varchar(50))rn insert into #person select p.PersonID from base_Person p where p.PersonStatus = 'MZT0'rn rn declare @count intrn set @count = (select COUNT(*) from #person)rn declare @i intrn set @i = 1rn declare @personId varchar(50)rn while(@i <> 0)rn beginrn --需要处理的内容rn endrn set @i = @i + 1rn endrnend[/code]rn[code=<em>sql</em>]消息 156,级别 15,状态 1,过程 AnnualReportAuditing,第 26 行rn关键字 'set' 附近有语法错误。rn消息 102,级别 15,状态 1,过程 AnnualReportAuditing,第 28 行rn'end' 附近有语法错误。[/code]rn[img=https://img-bbs.csdn.net/upload/201504/10/1428648108_759292.png][/img]
执行sql语句报错,求助!
if exists(select * from dbo.sysobjects where id=object_id(N'[dbo].[NN_QR_DELETE]')and objectproperty(id,N'IsTrigger')=1)rn在查询分析中执行提示“第2行:‘)’附近有语法错误。”rn哪位大侠知道问题出在哪了??
关于sql语句报错问题
string fileExt = upFileName.Substring(upFileName.Length - 4, 4);rn string fileName = dt.Year.ToString() + dt.Month.ToString() + dt.Day.ToString() + dt.Hour.ToString() + dt.Minute.ToString() + dt.Second.ToString() + dt.Millisecond.ToString();rn string <em>sql</em> = "insert into web_picture (picinfo,picname,picaddress) values('"+TextBox1.Text.ToString()+"','" + fileName + fileExt + "','" ../Images/" + fileName')";rn'" ../Images/" + fileName'问题rn错误 30 应输入标识符 C:\Inetpub\wwwroot\DGWebSite\Manage\PictureInfo.aspx.cs 75 152 http://localhost/DGWebSite/rn
Sql语句的Exec中加like语句报错
Create proc Testrn(rn@PageSize int,rn@PageNumber int,rn@Name NVarchar(20),rn@Count int outputrn)rnASrnDeclare @Size intrnSet @Size = @PageSizernDeclare @Rest intrnSet @Rest = @PageSize * (@PageNumber - 1)rnDeclare @UserName NVarchar(20)rnSet @UserName = @Namernif @PageNumber > 0 rnBeginrnselect @Count = count(*) from t_User where State = 1rnexec('select top '+@Size+' * from t_Userrnwhere (state = 1 and UserId not in (rn select top '+@Rest+' UserId from t_User where State = 1 and UserName like %'+@UserName+'% rn order by CreateTimern))rnorder by CreateTimern')rnendrnrnrnexec Test 1,1,'a',nullrnrnrn会报一下错误rnrn消息 102,级别 15,状态 1,第 3 行rn'a' 附近有语法错误。rnrnrn我在想是不是like<em>语句</em>不能加在里面呀
ADO 这样的sql语句报错。。。。。。。。。。。
用ADO执行这个<em>语句</em><em>报错</em>:ORA-00937: 非单组分组函数rnselect max(length(a.right_name)) from tright a where a.type = '1';rnrn我记得之前还是可以的,而且pl<em>sql</em>里是没有问题的,不知道驱动变了还是什么环境变了会引起这个问题???
简单的SQL语句报错!!
我现在在程序中有这样一条SQL<em>语句</em>:select * from person,程序执行时<em>报错</em>,我想是不是<em>语句</em>中包含了Oracle的关键字(person),不知如何处理? rn我用的是Oracle9通过它的JDBC驱动(classes12.zip)进行连接的,连接其它数据库没有任何问题。 rnrn<em>报错</em>:rnjava.<em>sql</em>.SQLException: ORA-00600: ?部錯誤代碼,參數: [ttcgcshnd-1], [0], [], [], [], [], [], [] rnrnrnat weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:85) rnrnat weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:133) rnrnat weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35) rnrnat $Proxy3.executeQuery(Unknown Source) rnrnat weblogic.jdbc.rmi.internal.StatementStub.executeQuery(StatementStub.java:66) rnrnat weblogic.jdbc.rmi.SerialStatement.executeQuery(SerialStatement.java:80) rnrnat com.hkelect.util.EJBUtil.main(EJBUtil.java:104) rnrnrn源代码如下:rnimport java.<em>sql</em>.*; rnimport java.util.*; rnimport javax.naming.*; rnimport javax.rmi.PortableRemoteObject; rnimport javax.<em>sql</em>.*; rnimport java.math.*; rnrnimport java.io.*; rnimport java.util.Hashtable; rnimport java.util.HashSet; rnimport java.util.Enumeration; rnimport java.util.Iterator; rnrnpublic class EJBUtil implements java.io.Serializable rn private static final String DB_NAME="jdbc/hkelect"; rn private boolean standAlone = true; rnrn public void setStandAlone(boolean standAlone) rn this.standAlone = standAlone; rn rn public boolean isStandAlone() rn return standAlone; rn rnrn public Connection getConnection() rnrn try rn InitialContext ic = this.getInitialContext(); rn DataSource ds = (DataSource)ic.lookup(this.DB_NAME); rn return ds.getConnection(); rn catch (Exception ex) rn System.out.println("[exception is from EJBUtil]="+ex.getMessage() + "\n[ex]="); rn ex.printStackTrace(); rn return null; rn rnrn rnrn public InitialContext getInitialContext() rn if(this.isStandAlone()) rn String url = "t3://localhost:7001"; rn String user = null; rn String password = null; rn Properties properties = null; rn try rn properties = new Properties(); rn properties.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"); rn properties.put(Context.PROVIDER_URL, url); rn if (user != null) rn properties.put(Context.SECURITY_PRINCIPAL, user); rn properties.put(Context.SECURITY_CREDENTIALS, password == null ? "" : password); rn rn return new InitialContext(properties); rn rn catch(Exception e) rn System.out.println("Unable to connect to WebLogic server at " + url); rn System.out.println("Please make sure that the server is running."); rn rn else rn try rn return new InitialContext(); rn rn catch (Exception ex) rn return null; rn rn rn return null; rn rnrn public static void main(String[] args) rn EJBUtil ejbUtil = new EJBUtil(); rn try rn Connection connection=ejbUtil.getConnection(); rn System.out.println("Connection = " + connection ); rn Statement statement=connection.createStatement(); rn String <em>sql</em>="select * from person"; rn ResultSet resultSet=statement.executeQuery(<em>sql</em>); rn catch(Exception ex) rn ex.printStackTrace(); rn rnrn rnrn rn
sql语句报错,怎么修改?
select a.*,b.*, c.*,d.* from dghouseinfo a,dghouseprice b left join (select top 1 * from dghousepic e where e.newcode = a.newcode) c on c.newcode=a.newcode left join dghousepeitao d on d.newcode=c.newcode where a.newcode=b.newcode order by a.id descrn在查询分析器里<em>运行</em>老是<em>报错</em>rn服务器: 消息 107,级别 16,状态 2,行 1rn列前缀 'a' 与查询中所用的表名或别名不匹配。rn服务器: 消息 107,级别 16,状态 1,行 1rn列前缀 'a' 与查询中所用的表名或别名不匹配。
sql语句执行报错问题
在PL/SQL 中执行以<em>语句</em>rnCREATE TABLE OrderFormrn( OFID number NOT NULL primary key,rn CustomerID number NOT NULL,rn CustomerName nvarchar2(50) collate Chinese_PRC_CI_AS NOT NULL,rn CustomerTel nvarchar2(50) COLLATE Chinese_PRC_CI_AS NULL,rn Corporation nvarchar2(50) COLLATE Chinese_PRC_CI_AS NULL,rn BrandName nvarchar2(50) COLLATE Chinese_PRC_CI_AS NULL,rn OrderDate nvarchar2(50) COLLATE Chinese_PRC_CI_AS NULL,rn)rn/rnrnORA-00907: 缺失右括号rnrn
SQL语句报错,关于ROW_NUMBER()
select *,row_number() over(order by gameid desc) from 表名rnrnpostgreSQL中的row_number()该如何使用?
SQL语句修改字段类型报错
Sybase 12.5数据库执行   alter   table    test01  modify    username  varchar(35) null   alter   table    test01  modify    username  varchar(15) null   执行两遍后会<em>报错</em> 如下图   则需要打开 select into 的权限 ,如下...
sql语句报错,帮帮看看!!
select distinct(B.ID),A.JJ,B.WenHao,B.JSTime,rn[color=#FF0000]case when d>0 then d else 0 end from( rnselect datediff(day,case when datepart(dw,FSTime)=6 then DATEADD(day, 2,FSTime) rnelse FSTime end, getdate()) as d,id from GW_LZ) c[/color]from GW_XJ A,GW_LZ B rnwhere (B.State=2 or B.State=1) and B.FSBM='01' and B.BH=A.WBianHaorn红色那部分,是查看,从FSTime到现在过了多少天(除去双休日)rn可是,他为什么<em>报错</em>呢!rn[color=#FF0000]在关键字 'from' 附近有语法错误。[/color]
sql语句含双引号报错
各位大侠好,为什么在<em>sql</em>服务器执行存储过程,其中包含双引号,能够执行成功。但是在程序中,放到<em>sql</em><em>语句</em>里面怎么就<em>报错</em>了?谁知道的希望尽快给我解答,谢谢!rn
sql语句拼接后报错
sSQL = sSQL+" WHERE "+sWhere+" "+sOther //这后面是修改过的rn +"AND FINANCE_MAIN_ENTITY_ID ="+ Module->Params->ParamByName("FINANCE_MAIN_ENTITY_ID")->AsIntegerrn +"AND FINANCE_ENTITY_ID = "+ Module->Params->ParamByName("FINANCE_ENTITY_ID")->AsIntegerrn +"AND EXISTS (SELECT 1 FROM T_SM_USER_CUSTOMER_ALL WHERE USER_ID = "rn + Module->Params->ParamByName("USER_ID")->AsInteger+")";rnrnrn就拼了这一点,然后就<em>报错</em>rnrn"变量或者类型不正确,或者不在可以接收的范围内,要不就是与其他数据冲突."rnrn请达人指教
sql语句执行为什么报错
SQL> select nvl(da_xh.lsh,daml.lsh), nvl(da_xh.pid,'124660121304260011') from daml,da_xh rn 2 where daml.lsh = da_xh.lsh(+) and daml.pid = da_xh.pid(+);rn rn错误位于第1行:rnORA-01114: 将块写入文件 201 时出现 IO 错误 (块 # 2097033)rnORA-27069: skgfdisp: 尝试在文件范围外执行 I/OrnOSD-04026: 传递的参数无效。 (OS 2097039)rnORA-01114: 将块写入文件 201 时出现 IO 错误 (块 # 2097033)rnORA-27069: skgfdisp: 尝试在文件范围外执行 I/OrnOSD-04026: 传递的参数无效。 (OS 2097039)rnrn
一个简单的SQL语句报错
'Select * from gongsi where id = '''+'****'+''''rn我一<em>运行</em>就提示ID VARCHAR(10)转换成SMALLINT时错误,
数据库关键字问题mysql 运行sql语句check关键字报错
my<em>sql</em> <em>运行</em><em>sql</em><em>语句</em>check关键字<em>报错</em>。出错:因为check为 my<em>sql</em>的保留关键字,改名即可。 遇到数据库<em>语句</em>问题可以参考下这个问题,之前的access数据库用的check作为表明,代码迁移到my<em>sql</em>中,出现错误。 数据库的关键字问题----------------------------  ...
sql语句在查询分析器中可以运行,php的mssql_query却报错
请大家帮忙看一下:rn<em>sql</em><em>语句</em>在查询分析器中可以<em>运行</em>,php的ms<em>sql</em>_query却<em>报错</em>:rnrn<em>sql</em>:rnrnselect distinct authorId from (SELECT top 100 b.name as authorName,b.id as authorId,b.ticket as ticket FROM table2 a left join table3 b on a.authorId=b.id where a.name='今天的作业' order by a.id desc)rnrnrn错误信息:rnrn[function.ms<em>sql</em>-query]: message: 在关键字 ')' 附近有语法错误。 (severity 15)rnrnrn<em>sql</em>server中可以<em>运行</em>的<em>语句</em>,php 中应该也可以吧?
关于VFP9运行SQL语句select报错的问题
select dept_id,dept3_name from '.\data\dept_info' into cursor dept_cursor group by dept_id order by dept_idrnrn以上命令行在VFP6<em>运行</em>正确,在VFP9里<em>运行</em><em>报错</em>:“SQL:缺少GROUP BY 子句或GROUP BY子句无效。”rn请问哪位朋友知道是什么问题吗?先谢谢了!
为什么在mysql数据库可以运行的SQL语句,在java里却报错!!
一,解决方法 为尽快解决问题, 其他代码省略,直接说明解决发String <em>sql</em> = "select * from tablename"; //引发java虚拟机<em>报错</em>却在数据库正确<em>运行</em>;为得到正确结果改为:String <em>sql</em> = "select * from tablename "; //可以正常<em>运行</em>两句一样吗,请仔细看哦? NO,可以正确<em>运行</em>的<em>sql</em>的tablename 和 ”
sql语句 navicat里运行成功 myeclipse却报错
这是<em>sql</em><em>语句</em> rnselect a.*,b.tel,b.name from t_info a LEFT JOIN t_mtsx_user b on a.open_id=b.open_id where a.shop_name=? GROUP BY open_id having timernmyeclipse<em>报错</em>rnPage list = Db.paginate(offSet, pageSize, <em>sql</em>,shop_name);//执行代码rn[img=https://img-bbs.csdn.net/upload/201611/28/1480321495_520288.png][/img]rn可是在navicat 却正常rn[img=https://img-bbs.csdn.net/upload/201611/28/1480321659_997426.png][/img]rnrn这是a表 [img=https://img-bbs.csdn.net/upload/201611/28/1480321719_505642.png][/img]rn用的是jfinal框架rn求老司机指路 谢谢了
mysql 运行sql语句 order,return,check关键字报错
drop table if exists order; /*==============================================================*/ /* Table: order                                             */ /*=====================================
sql语句在数据库上可运行,asp报错什么原因
[code=VBScript]rnset rs=server.createobject("adodb.recordset")rn<em>sql</em>="select * from [iyu_Notice] where cmsStep = 1 and year(cmsAddTime) = '"&years&"' and month(cmsAddTime) = '"&months&"' "rnrs.open <em>sql</em>,conn,1,3rn[/code]rnrn输出的<em>sql</em><em>语句</em>为rnselect * from [iyu_Notice] where cmsStep = 1 and year(cmsAddTime)='2010' and month(cmsAddTime)='3'rnrn我把输出的放到<em>sql</em>查询里面<em>运行</em>是正常的,但是不知道为什么asp里<em>运行</em>不正常,<em>报错</em>“参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。”rn请大家帮忙看看,多谢。
运行数据里SQL语句
Id SQLrn0 select count(*) from Table1 where Type = @Type rn1 select count(*) from Table2 where Type = @Typern2 select count(*) from Table3 where Type = @Typernrn结果rnID SQLrn0 3rn1 4rn2 2rnrn@Type 是我传进去得一个制,我该怎么查询这个SQL
如何正确的运行sql语句
请各位帮忙看看rnrn要想正确的<em>运行</em>SQL<em>语句</em>如下代码要做什么修改,目前中提示"update <em>语句</em>中有语法错误":rnrn ADOQuery1->SQL->Add("Update Result Set Max = ");rn ADOQuery1->SQL->Add(edMax->Text.ToDouble());rn ADOQuery1->SQL->Add(", Min = ");rn ADOQuery1->SQL->Add(edMin->Text.ToDouble());rn ADOQuery1->SQL->Add(" Where Type = '" + cbType->Text +"'");rnrn如果把第三行的逗号换成and,<em>运行</em>可以通过,但数据表中字段的值就不是预期的了,比如,把Max改为11.53,最后只能是11而已。总是不正确啊,为什么,怎么改?谢谢。
asp运行sql 语句的问题
beforecount=(trim(request("page")-1))*pagesizernrn StrSQL="select top 20 * from xxxx where item_id not in (select top "&beforecount&" item_id from xxxx)"rnrn在第二条<em>语句</em>"&beforecount&" 出错!将"&beforecount&" 换成数字则<em>运行</em>通过rnrn在线等rn
sqlite3可直接运行的SQl语句
int ret = <em>sql</em>ite3_open(&quot;628demo.db&quot;,&amp;amp;datb1);打开628demo.db数据库,datb1为句柄char str3[1024] = {&quot;create table &quot;};char * str11 = &quot;Listqwe&quot;;strcat(str3,str11);char *str2 = &quot;(id int primary key,name text,age ...
datagrip中运行sql语句
datagrip中<em>运行</em><em>sql</em><em>语句</em>在上面写完<em>sql</em><em>语句</em>后,点击下面的图片中的绿色按钮就可以<em>运行</em>datagrip的破解(2018年10月份前有效)如下:http://blog.csdn.net/u014044812/article/details/78727496...
AnyView 网络警 4.87 专业版 无限用户 破解版下载
网络警 4.87 专业版 无限用户 破解版 相关下载链接:[url=//download.csdn.net/download/zjeff/3119877?utm_source=bbsseo]//download.csdn.net/download/zjeff/3119877?utm_source=bbsseo[/url]
jquery Ajax下载
jquery Ajax js javascript 相关下载链接:[url=//download.csdn.net/download/baiawquqf/2005366?utm_source=bbsseo]//download.csdn.net/download/baiawquqf/2005366?utm_source=bbsseo[/url]
综合布线设计方案(学校)下载
依据Avaya Technologies 结构化布线系统特点及越秀区政府采购教育信息化工程(广大实验中学)具体情况,本方案依据以下原则设计: 1)标准化设计: 本设计系遵循EIA/TIA-568B要求,并符合国内现行通用的通信电气标准; 2)开放式设计和兼容性: 整个布线系统的接口全部采用国际标准,能连接各厂家不同型号的电脑、交换机、传真机及其它电子设备终端,并且能支持不同的网络结构及应用。 3)灵活性应用: 整个系统采用先进的跳线管理, 终端的改位、移位只需在配线架上进行简单的跳线即可实现。 4)应用可靠性: 本设计中所应用的产品都是经国际权威机构认证并严经考验的材料。 5)投资经济性: 采 相关下载链接:[url=//download.csdn.net/download/wilsonshen11/3303141?utm_source=bbsseo]//download.csdn.net/download/wilsonshen11/3303141?utm_source=bbsseo[/url]
我们是很有底线的