小编Aru*_*nam的帖子

如何在字符oracle之后获取字符串

我有VP3 - 艺术与设计和HS5 - 健康与社会关怀,我需要在Oracle之后获得字符串' - '.这可以使用子串实现吗?

谢谢,Ar

sql oracle substring

6
推荐指数
2
解决办法
4万
查看次数

在yql中将yyyy-mm-dd hh:mm:ss转换为yyyy-mm-dd

我需要在sql中将yyyy-mm-dd hh:mm:ss.msec转换为yyyy-mm-dd.

我试过了

CONVERT(DATETIME,MIN(Vdaily_calender.VDC_day_date),120)
Run Code Online (Sandbox Code Playgroud)

但得到相同的结果.

请指教

谢谢Ar

sql t-sql datetime date converter

5
推荐指数
1
解决办法
7451
查看次数

连接到SSRS中的数据源时出错

我正在尝试连接到Datasource,但收到此错误:

An error occurred during local report processing. 
An error has occurred during report processing. 
Cannot create a connection to data source 'PO'.
You have specified integrated security or credentials in the connection string for the data source, but the data source is configured to use a different credential type. To use the values in the connection string, you must configure the unattended report processing account for the report server.
Run Code Online (Sandbox Code Playgroud)

知道如何解决这个问题吗?

谢谢Aruna

connection-string datasource credentials reporting-services ssrs-2008-r2

5
推荐指数
1
解决办法
3385
查看次数

无法在表空间TEMP中将临时段扩展128

我试图在Oracle中执行以下查询:

SELECT DISTINCT
   t4.s_studentreference "Student ID",
  t3.p_surname "Surname",
  t3.p_forenames "Forenames",
t1.m_reference "Course",
 t2.e_name "Enrolment Name"
 FROM student t4,
  person t3,
  enrolment t2,
  course t1
WHERE t4.s_id(+) =t3.p_id
AND (t2.e_student=t3.p_id)
AND (t2.e_course =t1.m_id)
AND (t1.m_reference LIKE 'LL563%15')
OR (t1.m_reference LIKE 'LL562%15')
OR (t1.m_reference LIKE 'LL563%16')
OR (t1.m_reference LIKE 'LL562%16')
Run Code Online (Sandbox Code Playgroud)

但是,我得到以下错误:

ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
01652. 00000 -  "unable to extend temp segment by %s in tablespace %s"
*Cause:    Failed to allocate an extent of …
Run Code Online (Sandbox Code Playgroud)

oracle temp segment tablespace oracle-sqldeveloper

2
推荐指数
1
解决办法
5683
查看次数

nvl不是公认的内置函数名称

我在SQL Server上执行以下查询,但出现错误:

SELECT DISTINCT t1.p_id "Id",
(TO_CHAR("sysdate", 'YYYY') + least(SIGN(("sysdate" - to_date('01-Aug-' | | TO_CHAR("sysdate", 'YYYY'), 'DD-Mon-RRRR'))), 0)) "Year"

FROM 
   t1,
   t7,
   t9
WHERE 
   t9.ei_id(+)          = t7.e_id
AND (t7.e_student        = t1.p_id)
AND (t7.e_module         = t8.m_id)
AND (NVL(t9.ei_q18m06, t7.e_end) > '31-Jul-' | | (TO_CHAR("sysdate", 'YYYY') + least(SIGN(("sysdate" - to_date('01-Aug-' | | TO_CHAR("sysdate", 'YYYY'), 'DD-Mon-RRRR'))), 0) + - 5))

Error:

'nvl' is not a recognized built-in function name. 
Run Code Online (Sandbox Code Playgroud)

知道如何避免这种情况吗?

sql-server function isnull built-in nvl

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

案例表达式只能嵌套到SQL查询中的10级错误

我在server1上有原始查询,需要在服务器2上创建它。我能够创建View,但是在执行该视图时,在CASE语句中遇到错误,如下所示:

Error:

    Msg 8180, Level 16, State 1, Line 1
    Statement(s) could not be prepared.
    Msg 102, Level 15, State 1, Line 1
    Incorrect syntax near 'Qry1097'.
    Msg 125, Level 15, State 4, Line 1
    Case expressions may only be nested to level 10.
Run Code Online (Sandbox Code Playgroud)

查询:SELECT

ID, Forename, Surname, 

Code, Description, 

Grade, Dept,

Course, Title, 

CASE WHEN Code IN ('VJ028') THEN 'FUNCTIONAL SKILLS - LEVEL 1 & LEVEL 2' 

WHEN Code IN ('VE203', '22877C')  THEN 'WRITING - LEVEL 2' 

WHEN Code …
Run Code Online (Sandbox Code Playgroud)

sql nested view case reporting-services

0
推荐指数
1
解决办法
2820
查看次数

“to_char”不是可识别的内置函数名称

    (to_char(sysdate,'YYYY')+least(sign((sysdate-to_date('01-Aug-'||
to_char(sysdate,'YYYY'),'DD-Mon-RRRR'))),0)) "AcYear"
Run Code Online (Sandbox Code Playgroud)

错误:

'to_char' is not a recognized built-in function name.
Run Code Online (Sandbox Code Playgroud)

我尝试将 to_char 和 to_date 更改为 CONVERT 但出现错误。

我期待 2016 年 AcYear

有人可以帮忙吗?

sql sql-server date type-conversion to-char

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