all groups > sql server mseq > august 2005
YTD Last year
Posted by Benedikt F at 8/31/2005 8:41:04 PM
Hi there, I'd like to ask you for help with following:
I am trying to select YTD for last year in my sales table.
select *
from Salestable
Where Postingdate > "first day of 2004" and
Postingdate < "today last year"
best regards,
Benedikt F.
Computer Department
Iceland Seafood Int.
... more >>
about query
Posted by Daniel at 8/31/2005 7:06:01 AM
Hi all,
Does anyone know what is the following query mean:
select * from abc,def where abc.xx(+) = def.xx
i have no idea about the (+) symbol..what it represent?
Thank you in advance
Best regards,
Ocurnos... more >>
about query ..
Posted by Daniel at 8/31/2005 7:04:02 AM
Hi all,
Does anyone know what is the following query mean:
select * from abc,def from abc.xx(+) = def.xx
i have no idea about the (+) symbol..what it represent?
Thank you in advance
Best regards,
Ocurnos... more >>
Join syntax?
Posted by DonSQL2222 at 8/29/2005 1:56:36 PM
I'm not sure if this is a join problem or even if it can be done.
The english part of the query will be requesting cagegoires="Cat2"
and return the matching records in table1, plus return all the other
categories that belong to the set in table 2.
should return two records..
1 document1 ... more >>
Query needs to loop?
Posted by DonSQL2222 at 8/25/2005 2:55:34 PM
Is this possible?
A char variable length field contains this data: (for example)
ABC,XYZ,GEF,CAB
I need to query another table on the contents of each of these names that
are separated by comma.
I need to read ABC and then query another table for ABC in field1 and pick
up some fields.
Then... more >>
How to Join a table with Other (result) Tables ? Complex one !
Posted by velu at 8/25/2005 2:40:34 AM
Here is the situation
Table 1 : tbl_documents
docID docName
1 aaa
2 bbb
3 ccc
Table 2 : tbl_Rating
ratID rating docID
1 3 1
2 5 1
3 2 1
4 3 2
The queary I need is to display the result in this form. must be like this
docID docName Avaragerating
1 aaa 3
2 bbb 3
3 ccc ... more >>
Ordering Results
Posted by Wes at 8/24/2005 4:41:03 AM
Hi,
I have a result set that returns Loctation Codes.
Each location code is the following format: [Letter][2 Digit Number].
For example,
A10
B13
D04
What I would like to do is if the letter is either A, C, E, G then order the
results by the letter, then by the 2 digit numbers in asc... more >>
Where and Union Clauses
Posted by Fez at 8/23/2005 1:17:08 PM
I am having a little problem creating this query.
I have a stored procedure that accepts 4 parameters.
One of the parameters tells the query which column to sort on.
Select
Case
When @ReportParam = 'Col1' Then Col1
When @ReportParam = 'Col2' Then Col2
End as ReportOrder,
Col... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Column description
Posted by Gerko at 8/22/2005 4:26:04 AM
Is it possible to add a column description when creating a table? An example
would be great.... more >>
how to write query
Posted by Yoshitha at 8/19/2005 1:04:04 PM
I have a table with the fileds empid,empname,designation,branch.. etc I
have 5 types of designations CEO,BM,PL,Tester,and PRG and the two branches
those are Hyderabad and Visakhapatnam i need the query like
first CEO name next Hyderabad BM Name next Hyderabad PL name next Hyderabad
Testername ... more >>
GROUP BY's on 3 tables in one SELECT?
Posted by Martin S. at 8/18/2005 12:51:03 PM
Hi there, I'd like to ask you for help with following:
having 3 tables:
T1 (Person_ID, Product_ID, Costs)
T2 (Person_ID, Product_ID, Balancies)
T3 (Product_ID, Product_Type)
I have simple GROUP BY query:
SELECT T1.Person_ID, T1.Product_ID, MAX(Costs)
FROM T1, T2
WHERE (T1.Product_ID = T3... more >>
Having a stored procedure copy tables & also preserve indexing/sch
Posted by Peter S. at 8/18/2005 6:35:03 AM
Hello,
I created a stored procedure that renames a table to OLD_xxxxx and replaces
that table with another (copy) that resides on a different database. I pull
the
tablename names through the use of a cursor table and construct a SELECT INTO
statement as follows
'SELECT * INTO DB1.dbo.' + ... more >>
Security Implementation???
Posted by Dimitrios Tanis at 8/13/2005 1:29:19 PM
I have a adp that I want to protect. Because of my recent upsizing to MSDE,
I am kind of lost!
I got Andrea Montanari's Dbamgr2k to handle security issues but still...
In the logins node of my MSDE instance I have 2 users: sa and
BUILTIN\Administrators both pointing to the "master" database of... more >>
Query help !
Posted by Ronny de Jong at 8/12/2005 1:30:02 AM
Dear all,
I'd like to display the result of this query in percentage:
SELECT SYS.Client_Version0, SYS.Client_Type0, count(*) as 'Count'
FROM v_R_System as SYS
WHERE SYS.Client0=1
group by SYS.Client_Version0, SYS.Client_Type0
order by SYS.Client_Version0, SYS.Client_Type0
Any idea... more >>
Query returning multiple rows
Posted by Jig Bhakta at 8/11/2005 10:30:02 AM
Hi,
I have a query that returns back rows that have multiple entries for a given
UniqueID. I want the query to be expanded so that it then only returns 1 of
the multiple rows based on the maximum date. Thefore, my return set looks
like this:
UniqueID Name Date
----------------... more >>
TABLE Joins Problem
Posted by Jan S via SQLMonster.com at 8/11/2005 12:00:00 AM
I have two sets of Data. For example Sales And Purchasing.
SALES(ISAL)
PURCHASING(IPUR)
-------------------------------
------------------------------------
ItemGroup
ItemGroup
ItemCode
ItemCode
DocDate
DocDate
Quantity
Quantity
Total
Total
The data mentioned above are all differ... more >>
EXEC (select... ) problem Help!
Posted by Scagnetti at 8/6/2005 8:20:03 AM
How can I get this to work?
declare @WkEmpID
declare @sql varchar(1000)
set @sql = 'select distinct @WkEmpID = EmpID from Employee'
exec (@sql)
Now this is a simplified version of a more comples query which is forcing me
to use this method rather than a simple SQL query. The big problem i... more >>
Extracting Latest Date
Posted by Jan S via SQLMonster.com at 8/4/2005 7:31:53 AM
I have a db which stores all my sales transactions.
The task is to extract the buy price(price) for each item(ItemCode) where the
date is the latest for each item.
For Example:
Sales Table
ItemCode Qty Price Date
-------------- ----- -------- --------
XYZ ... more >>
Find Duplicate Data
Posted by Travis at 8/3/2005 12:23:02 AM
Hi ,
Can someone help me to build a query base on :
SELECT Full_Name,FLT_ID, FLT_DT_ID,PNR_ID
Where Full_Name,FLT_ID, FLT_DT_ID is duplicate in the same table
Thank You very much
--
Travis Tan... more >>
|