...problem like this:
there are two fields in the table, type, duedate and postdate.
If type (field) is X then query should looklike this:
Select * from Table where duedate < 'DATE'
else query should looklike this:
Select * from Table where postdate < 'DATE'
Can I do it in one query...
...SELECT I.ACCOUNT, C.NAME1 AS STEXT,C.COUNTRY,
(CASE WHEN EXTPAYDOCNUM IS NOT NULL AND PAYMDOCKEY = '3' THEN
NVL((SELECT SUM(HPOSTAMNT * (POSTWAY * 2 - 1)) AS OPENAMNT1
FROM IASFINITEM
WHERE (CLIENT = '00') AND (COMPANY = '01') AND (ACCTYPE = 'T') AND (ACCOUNT =...
My Bad... :)
SELECT DISTINCT CONVERT(varchar(8), DTime, 108) AS DTime2, DTime FROM EventsL
WHERE (Site = 'BAK AMBALAJ') AND (Door = 'TURNiKE GiRiS') AND (DTime BETWEEN '07.01.2005' AND '07.30.2005') AND (CONVERT(varchar(8), DTime, 108) BETWEEN '18:00:00' AND '19:00:00')
Hi All,
I have table called Eventsl with four fields;
DTime: 01.07.2005 18:36:00
Name: Name
Surname: Surname
CardNo: 1234324
and I need to get all the records between 18:00:00 and 19:00:00 between the given date parameters.
Below is my query that does not work :(
SELECT DISTINCT...
The relation is the material fields.
First I get the Materials and Sold Quantities like:
Material Quantity
X 100
Z 500
K 1000
my color table:
COLOR MATERIAL
Blue X
Red X
Black Z
Blue K
Yellow K
So I need:
COL Material
2 X
1 Z
2 K
And last stage:
COL...
Hi all,
I can not run this Query :(
SELECT SUM(I.QUANTITY), (SELECT DISTINCT COUNT(COLOR) FROM COLORTABLE WHERE I.MATERIAL = MATERIAL GROUP BY MATERIAL, REVISION) as COL
FROM SOLDITEMS I, COLOR C WHERE I.QUNIT = 'KG' AND I.CREATEDAT > '01.06.2005' AND I.CREATEDAT < '30.06.2005'
GROUP BY COL...
I Hope this will explain what I'm trying to do...
I know this is not SQL forum but...
SELECT SUM(I.QUANTITY), (SELECT DISTINCT COUNT(COLOR) FROM COLORTABLE WHERE I.MATERIAL = MATERIAL GROUP BY MATERIAL, REVISION) as COL
FROM SOLDITEMS I, COLOR C WHERE I.QUNIT = 'KG' AND I.CREATEDAT >...
Hi,
I got Listboxs like this:
First Second
1 3
1 4
1 3
2 5
3 4
3 2
4 1
5 7
5 5
What I need is to remove the duplicate items from the first one and sum all the corresponding values in the second one, so the example become:
1 10
2 5
3 6
4 1
5...
Problem solved..
.
.
.
(X.LANGU = 'T') AND
(X.CLIENT = C.CLIENT) AND
(X.COMPANY = C.COMPANY) AND
(X.ACCOUNT = C.CUSTOMER) AND
(C.COUNTRY = 'TR') AND
(C.ADVPACC <> '120-15') AND
(C.ISDELETE =0)
GROUP BY I.CLIENT, I.COMPANY, I.ACCTYPE, A.ACCIND, I.ACCOUNT, X.STEXT
ORDER BY
case...
...(as fieldnames) in Reporting services?
I'm putting a combobox and field names in it and let the user select the order type of the report
for example:
Select * from X order by @param
where param is a field name.
BTW I'm connecting to an Oracle DB so the format must be:
Select * from X...
Let me do a little change:
A material - 300Kg (300 Kg from IBI.QUANTITY)
B material - 200Kg (200 Kg from IBI.QUANTITY)
C material - 500Kg (500 Kg from IBI.QUANTITY)
is being used for 1000kg (from IBH.BaseQuan) of D product and if I sell 300 Kg of D product how much the raw materials cost?
...FROM BOMITEM IBI WHERE IBI.MATERIAL = '" & MatNum & "' "
/
"SELECT IBH.BASEQUAN FROM BOMHEAD IBH WHERE IBH.MATERIAL = '" & MatNum & "' "
*
MatQuan) * (SELECT IMF.PRICE FROM MATFMS IMF WHERE IMF.ComponentID = IBI.ComponentID ))
As you can see there are 3 selects,
First one selects the...
There are there fields that holds the IDs of Department, Acc. Group and Workgroups in the Card table and I use them to get the Department, Acc. Group, WorkGroup names from other tables
and if a DeparmentID or AccID or WorkgroupID is NULL then there will be a Null "NAME" field on the DBGrid..
I...
There are five tables; CARD, AGRECS, PersonelWG, WorkGroups, C_Grp
I have a DataGrid like this
CARD.LNAME | CARD.MNAME | CARD.CNUM | CARD.CNAME | Deparment | Access Group | Workgroup
if there are no Department, Access Group or WorkGroup then these fields will be empty and as you can see from...
I'm trying to run a select query on 5 tables but it seems my code is not efficient enough :( please help... BTW it gives me a timeout error. I don't know but maybe the problem is that there are 2500 records on my card table...
SELECT CARD.LNAME, CARD.MNAME, CARD.CNUM, CARD.CNAME, (CASE...
Hi,
I'm creating a number of radiobuttonlists at runtime and assign them different IDs but when I try to access them using FindControl, it can not find them:
This is what I'm trying to do
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
I'm creating a button at runtime and It will insert the radiobuttons (from dynamic radiogroups) values to table:
But I can not implement the click event, here is my code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim...
I wrote a simple query (not a storedproc) with an order by but it does not work :(
SELECT *
FROM EventsL
WHERE (Door = 'yemekhane') AND (Site LIKE @Site) AND (CONVERT(CHAR(10), DTime, 110) = @Tar)
ORDER BY @Ord
I tried things like
SELECT *
FROM EventsL
WHERE...
I'm using a matrix;
Row=Name,Surname
Cols=Site
Data=DateTime
The problem is when two or more names match it only shows 1 name and hide the others like this
--------------------
Name Surname
--------------------
Surname
--------------------
I want to make the other lines (Names)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.