Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
i am new to qv and i hope you can help me again.
I want to write in a SQL Table like:
write_table:
LOAD
Ratenschema,
lieferant as lieferant_1,
reason as reason_1,
AVG(Erlös / cost) as faktor1,
AVG((DB_neu + Erstattung) / cost) as faktor2,
Datum_Datenbank as datum_test
resident write_faktor
WHERE
YEAR(Datum_Datenbank) = 2015
GROUP BY
Ratenschema,
lieferant,
reason,
Datum_Datenbank;
For i= 0 to NoOfRows('write_table') -1
LET V_FIELD1 = peek('Ratenschema',$(i),'write_table');
LET V_FIELD2 = peek('lieferant_1',$(i),'write_table');
LET V_FIELD3 = peek('reason_1',$(i),'write_table');
LET V_FIELD4 = peek('faktor1',$(i),'write_table');
LET V_FIELD5 = peek('faktor2',$(i),'write_table');
LET V_FIELD6 = peek('datum_test',$(i),'write_table');
SQL INSERT INTO dba.faktor_ratenschema VALUES(NULL, '$(V_FIELD1)', '$(V_FIELD2)', '$(V_FIELD3)', replace('$(V_FIELD4)', ',' , '.') , replace('$(V_FIELD5)', ',' , '.') , '$(V_FIELD6)');
NEXT;
But the restriction for the year doesnt work!
Any idea how to input data from year 2015 into the database?
Thanks and regards
Sabrina
the first and the second idea doesn't work and the third is still running...
are u tried tis way?
Year(Date(Datum_Datenbank,'YYYY-MM-DD'))=2015
with out #.
Yes, did it! But nothing works...
can u create a text object on ur sheet with tis expression and let me know what is the output ur getting?
What do you mean by doesn't work? Is it fetching all data or nothing?
Can you try below expr in Load statement and check the result instead of mentioning it in where clause?
Year(Date#(Datum_Datenbank,'YYYY-MM-DD'))
If nothing works, can you post QVW with sample data using below statement?
Load * From Qvd.qvd(qvd) Where RecNo() < 10;
try this one:
Year(Date#(Datum_Datenbank,'YYYY-MM-DD'))=Year(Date#(Today(),'YYYY-MM-DD'))
sorry takeout the hash
Year(Date(Datum_Datenbank,'YYYY-MM-DD'))=Year(Date(Today(),'YYYY-MM-DD'))
and also the below seems to work for me too.
Date(Datum_Datenbank,'YYYY'))=Date(Today(),'YYYY'))
subfield(Datum_Datenbank,'-',1)=2015
is the solution!
Thank you so much!!!!!
subfield(Datum_Datenbank,'-',1)=2015
is the solution!
Thank you so much!!!!!