SQL

Discuss RoboTask here
NvM
Posts: 7
Joined: Mon Aug 18, 2014 9:28 am

Re: SQL

Post by NvM »

I made a test with your SQL-statment. The only thing is changed is one more "(" and ")":

Your source:

Code: Select all

SELECT Belegnummer, Belegart FROM KHKVKBelege WHERE (Periode = 2014006) AND ((Belegart = 'Sofortrechnung' OR Belegart = 'Direktrechnung' OR Belegart = 'Rechnung'))
My source:

Code: Select all

SELECT Belegnummer, Belegart FROM KHKVKBelege WHERE (Periode = 2014006) AND (Belegart = 'Sofortrechnung' OR Belegart = 'Direktrechnung' OR Belegart = 'Rechnung')
In my case it does not work? What could be another reason?
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: SQL

Post by Oleg »

I'm sorry. I don't know.
It's necessary to analyze the real data of the table.

I used your SQL query exactly. The query is correct. Otherwise the database engine should return an error.
Oleg Yershov
NvM
Posts: 7
Joined: Mon Aug 18, 2014 9:28 am

Re: SQL

Post by NvM »

Maybe I could give you an SQL-Statement, which creates the table structure. Other thing to know is, that every system here is working with english versions. But this - in combination with german region settings - should not make trouble, right?
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: SQL

Post by Oleg »

Also pay attention that you use TestDB tablespace (Initial Catalog=TESTDB;)
Maybe you need to use another Database?

You can send SQL for creation of this table (with data) for investigation to my email (oleg (at) robotask.com).
Oleg Yershov
Post Reply