简单的sql 问题
各位大哥帮帮忙分析一下。。。。
/* 借用SQL 77 的表结构*/
if object_id('tempdb.dbo.#TB') is not null drop table #TB
go
create table #TB([A] varchar(3),[B] int)
insert #TB
select 'bcd',1 union all
select 'bcde',2 union all
select 'cd',3
----------------------
/*
bcd 1
bcde 2
cd 3
*/
----------------------------
想要的结果是:
---------------------
b 1
c 1
d 1
b 2
c 2
d 2
e 2
c 3
d 3
表拆分,看精华
http://blog.csdn.net/ws_hgo/archive/2010/01/22/5224723.aspx
頂胡果~~
连续的 没有符号隔开?
SQL code:
拆分一个字符串
/*
****拆分一个字符串*********
问题描述:
@str='fds,bbbf,eee,ddd,fff,hhhfg,dddde' 拆分成
col
------------------------
fds
bbbf
eee
ddd
fff
hhhfg
dddde
*/
---方法1:动态
declare @str varchar(500),@aaa varchar(8000)
set @str='fds,bbbf,eee,ddd,fff,hhhfg,dddde'
set @aaa='select * from (select '''+REPLACE(@str,',',''' as str union all select ''')+''') a '
exec(@aaa)
go
--方法2:循环
create table #t(
id varchar(10))
declare @str varchar(
相关问答:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
protected void btnLogin_Click(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection("Server = (local);user id = sa;pwd = 1;database = Login");
&nb ......
tab1 字段:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 字段:goodsid,goodskind(商品类型)
tab3 字段:goodskind(商品类型),kindname
结果:
得到商品类型在一段时间 ......
刚刚接触MySQL,不知道该如何去查看数据,插入数据,创建数据库、表,用哪为前辈能指教一二?
MySQL 5.1参考手册
引用
兄弟你会结贴吗?
mysql 参考手册
baidu
MySQL官方文档 http://dev.mysql.com/doc ......
关于SQL Server Mobile Edition
用Microsoft SQL Server2005 Management Studio Express9.00.3042.00创建SQLCE数据库sqlmobile.sdf
在mobile系统终端上用SQL Server Mobile Edition3.0能查看sqlmobile.sdf里表数据 ......