sql-server-2005

    0热度

    3回答

    我有以下情况需要解决。我有一个带有产品信息的表A,我有一个带有客户购买历史的表B。现在我需要在一个新的专栏“Sum_product_X”中计算购买次数的总和与每个ClientID的产品价值。所以在这种情况下,我们知道一个客户买了Product A 5倍,所以我们需要在列sum_producta计算的5 * 5$ Table A (Product Price Table) --------

    1热度

    1回答

    您好,我需要一些关于如何在select语句中选择所有行的电话号码作为“区分”的措施。 我的例子。我想要什么 |ID |Name |Phone Number| Address | | | | | | |1 |John | 1234567 | A.Road 1 | |1 |John | 1234567 | B.Road 2 | |2 |Jane | 7654321 | C.Road

    0热度

    1回答

    有表1提供产品信息和表2与客户信息 Table 1 (Product Information) --------------- product | value --------------- Product_A | 5 Product_B | 10 Table 2 (client Information) ----------------

    0热度

    1回答

    我有以下代码: SELECT ConsumerID, Product, (frequency * Product_Value) as Value_productA (frequency * Product_Value) as Value_productB (frequency * Product_Value) as value_productC

    0热度

    1回答

    我有2个xml变量(@ xml1 & @ xml2),我需要比较每个节点中的值并返回一个只包含不同节点的xml 。 所以说,我有这2 XML变量: declare @xml1 xml = N'<row> <id>1</id> <name>record title</name> <description>sample description</description>

    0热度

    2回答

    我想知道这是否可能:我想在Azure SQL数据库中创建2个表,我想用它作为临时表从一些选定的数据内部部署服务器上的SQL Server 2005数据库。 有没有这样做的好方法? 更新: 紧随其后的链接服务器指南和得到这个错误:I need to add a linked server to a MS Azure SQL Server 奇怪的是,我只是设法登录到Azure的DB与那些确切证书。我在

    1热度

    2回答

    我的问题是,只有MainRule表的ID与Table1表匹配时,此查询才有效。即使MainRule表没有匹配的ID,我也需要查询才能工作。即使MainRule表中没有匹配的记录,Table1中的记录也应该显示。 这里是我的代码: SELECT Person, OrderNum, Name, County, SubmitDate, Days1, SUM(Date_Diff) - 1 AS

    0热度

    1回答

    我正在使用symfony 3.3.10,php5.6.31,我尝试了几次将原则连接到SQL Server 2005数据库。我已经安装了驱动程序以使用sqlsrv和pdo_sqlsrv。下面是我的配置文件: 的php.ini extension=php_sqlsrv_56_ts.dll extension=php_pdo_sqlsrv_56_ts.dll symfony的config.yml

    0热度

    3回答

    如何选择所有代码值不是651,652,655,656的唯一ID的所有记录。 3列 ID Line Code 1 1 651 1 2 652 1 3 655 2 1 650 2 2 652 3 1 651 3 2 655 3 3 651 3 4 658 4 1 651 4 2 651 我想要检索的所有记录不是所有的代码是651/652/655/656之一的ID 结果数据集合

    3热度

    2回答

    列我试图转动2周的cols到行 NO Code Amount -- ---- ------- 1 61 1714.00 1 23 95.79 1 80 31.00 1 61 45.00 2 61 1714.00 2 23 95.79 3 80 31.00 4 61 45.00 4 61 1714.00 4 23 95.79 4 80 31.00 4 61 45.00