小编Nic*_*ToD的帖子

开头的标识符太长。最大长度为 128

我参考了其他一些博客,但无法将问题与此逻辑隔离开来。代码如下。抛出附加的错误消息。

            -- 1.   Import Multiple Delimited Text Files into a SQL Database

            -- 1.1  Define the path to the input and define the terminators


            USE [Openair_Integration]
            DECLARE @Path NVARCHAR(255) = 'C:\\Users\nicolas.gutierrez.su\Downloads\\'
            DECLARE @RowTerminator NVARCHAR(5) = CHAR(13) + CHAR(10)
            DECLARE @ColumnTerminator NVARCHAR(5) = CHAR(9)

            -- 1.2  Define the list of input and output in a temporary table


            IF OBJECT_ID('[dbo].[Files_Temporary]', 'U') IS NOT NULL
            DROP TABLE [dbo].[Files_Temporary];
            CREATE TABLE [dbo].[Files_Temporary]
            (
            [ID] INT
            , [FileName] NVARCHAR(255)
            , [TableName] NVARCHAR(255)
            );

            INSERT INTO …
Run Code Online (Sandbox Code Playgroud)

sql-server identifier

-1
推荐指数
1
解决办法
3999
查看次数

操作数类型冲突:int 与 datetime2 不兼容

下面的代码有问题。

错误:

Msg 206, Level 16, State 2, Procedure usp_TRAC_PSE_Step_12_Resource_Request_OBJECT-Production-Part1, Line 93
Operand type clash: int is incompatible with datetime2
Run Code Online (Sandbox Code Playgroud)

代码:

insert into [dbo].[pse__Resource_Request__c_LOAD]
    (OwnerId, pse__End_Date__c, pse__Milestone__c, pse__Percent_Allocated__c, pse__Planned_Bill_Rate__c,
     pse__Practice__c, pse__Project__c, pse__Region__c, pse__SOW_Hours__c, pse__Request_Priority__c,
     pse__Resource_Request_Name__c, pse__Resource_Role__c, pse__Start_Date__c, pse__Status__c,
     Partner_Requested__c, OA_Migration_ID__c, CurrencyIsoCode, Percent_Onsite__c)

    select (select [OwnerId] from [dbo].[pse__Proj__c_LOAD] where [OA_Migration_ID__c] = p.id) 'OwnerId'
          , case when case when p.custom_35 is null then ISNULL(b.startdate, '01/01/1900 23:59:59.999') + 180 else p.custom_35 end  <  ISNULL(b.startdate, '01/01/1900 23:59:59.999')  then  ISNULL(b.startdate, '01/01/1900 23:59:59.999') + 180 else …
Run Code Online (Sandbox Code Playgroud)

sql-server datetime2

-1
推荐指数
1
解决办法
7866
查看次数

标签 统计

sql-server ×2

datetime2 ×1

identifier ×1