oracle and sql problem

tvojmuc
04-20-2004, 01:25 AM
what is wrong?

SELECT left(VGSM.VERSIONED_C_L_ENTRY.COMP_LIST,7) AS SIFRA, VGSM.VERSIONED_C_L_ENTRY.ANALYSIS AS ANALIZA , VGSM.VERSIONED_C_L_ENTRY.NAME AS OPIS_ANALIZE
From VGSM.VERSIONED_C_L_ENTRY
GROUP BY VGSM.VERSIONED_C_L_ENTRY.COMP_LIST, VGSM.VERSIONED_C_L_ENTRY.ANALYSIS, VGSM.VERSIONED_C_L_ENTRY.NAME
HAVING (left(VGSM.VERSIONED_C_L_ENTRY.COMP_LIST,7)) like '0035076%'
:whoops:

Shurik12
04-20-2004, 01:58 AM
LEFT doesnt' exsit in Oracle, use SUBSTR() function instead.


Shurik.

tvojmuc
04-20-2004, 02:47 AM
LEFT doesnt' exsit in Oracle, use SUBSTR() function instead.


Shurik.
Nice! is work
but what is wrong ther

SELECT VGSM.JOB_RELEASE.RELEASED_ON, VGSM.JOB_RELEASE.JOB_NAME
From VGSM.JOB_RELEASE GROUP BY VGSM.JOB_RELEASE.RELEASED_ON, VGSM.JOB_RELEASE.JOB_NAME,VGSM.JOB_RELEASE.ARTICLE,VGSM.JOB_RELEASE.St atus
having VGSM.JOB_RELEASE.Status = 'A' And VGSM.JOB_RELEASE.ARTICLE = '0035076' and VGSM.JOB_RELEASE.RELEASED_ON > '4.2.2004'

"not a valid month" :confused: :confused:

Shurik12
04-20-2004, 02:53 AM
You have to use To_Date () function when working with dates in Oracle now you are just trying to compare the field to a string which is not a good idea.

Regards,
Shurik.

MKoslof
04-20-2004, 08:07 AM
And to add to that comment, if you are going to use To_Date you need to also pass in the required date format. Oracle will get pesky about dates, you need to explicitally tell the database engine the format to work with.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum