Query Questions


Is there a query to search text of all SQL Server database objects that reference a specific table/instance?
We want to migrate to SQL Server 2005. We need to find all database objects such as Stored Procedures, Views, Triggers, User Defined Functions accessed specific tables, DTS packages that reference a specific table/instance. Is there a query that will allow me search the text of all?

Answer Question   |  May 9, 2013  3:49 PM
Database objects, Query, SQL Server migration
2,585 pts.

Query Criteria question
I am designing a query. One of the fields in the query is “department”. In my form there is a pull down menu with about 20 departments. In my query, I am making the department field have a criteria so that when you run the query, it asks for which department. However, if you do [...]

Answer Question   |  October 10, 2008  12:08 PM
Query
asked by:
5 pts.

Oracle Query: Return a date eg 29 February 2008
Hi How can I return the last day of the second month of the current year in Oracle Thanks in advance

Answer Question   |  May 12, 2008  11:45 AM
Oracle, Query
asked by:
5 pts.

AS400 Qry – Is there a way to trick qry into treating blanks as null?
The data I need to sort on is in either field A or B depending on the transaction type. It could be accomplished by using the “value” expression if qry would consider a blank field as null. Any ideas?

Answer Question   |  April 20, 2010  7:42 PM
AS/400, QRY, Query
asked by:
5 pts.

Difficult SQL query, is this possible?
Two tables, First Table –FN—LN—-Reasons John | Doe | 6 | Jane | Doe | 2 | —————– That’s the end of the first table. Second Table —Reason—-Reason Detail—– 2 | Invalid SSN 4 | Invalid Date Of Birth ————————————– That’s the end of the second table. (*Note, there is NO value of ’6′ in [...]

Answer Question   |  April 20, 2012  11:37 PM
Database, Developers, Development, Query, Query tuning, SQL, SQL Query
asked by:
35 pts.

How to make a single row in SQL
Dear all, Please help me I am not good in sql queries. I have a view like this. SNo Employee title Cdate IN TIME OUT TIME 258 john accountant 27/01/2008 7:28:12 258 john accountant 27/01/2008 7:28:30 258 john accountant 27/01/2008 16:03:42 258 john accountant 27/01/2008 16:03:48 258 john accountant 28/01/2008 7:36:42 258 john accountant 28/01/2008 [...]

Answer Question   |  February 20, 2008  6:31 AM
Query, SQL, SQL Query
asked by:
10 pts.

a query
I have query of Placement. as fallow: client OpenedDate ClosedDate 1 1/2/05 1/20/06 1 2/05/06 3/2/06 1 4/2/07 2 1/2/06 I want to add another field to this query to tell me each time how long a take this client to open again. and another field to tell me this is his 1st or 2nd [...]

Answer Question   |  February 5, 2008  5:26 PM
Query
asked by:
5 pts.

oracle multi-field row query with more than one row
I have a table that specifies the year, and a quantity for each month, in the same row. I need to get a 12 month rolling average, which involves particular fields from one row, and addition fields from another, based on the sysdate. There are several tables that need to be joined to ensure I [...]

Answer Question   |  May 1, 2008  5:38 PM
Oracle, Query, SQL
asked by:
150 pts.

MS Access Query
I have a table that has item information by store. I am looking to get back the top 25 items in each store. I can’t figure out how to run this. If I use the “Top 25″ tag I only get the top 25 through all stores, not by store. Anyone have any suggestions?

Answer Question   |  February 1, 2008  4:03 PM
Microsoft Access, Query
asked by:
5 pts.

Query Criteria
Hello. I have a report with multiple subreports. User enters date range when prompted from query in main report. I want to refer the subreport date criteria to the date range the user enters for the main report, via the query. I used this in the query criteria under the date field[reports]![mainreport].[fieldname], but the criteria [...]

Answer Question   |  February 21, 2008  7:24 PM
Query, SQL
asked by:
Bec
10 pts.

SQL Query that only Returns the Newest Invoice date for an ITem
I am try to write a query that will give me a list of ITems that have a a quanity of greater than 0 on hand and only latest date and Item was invoiced. Here is what i have come up with so far SELECT IV00101.ITEMNMBR, IV00101.ITEMDESC, IV00101.CURRCOST, IV00102.QTYONHND,SOP30200.SOPNUMBE, SOP30200.INVODATE FROM IV00101 INNER JOIN IV00102 [...]

Answer Question   |  January 29, 2008  5:44 PM
Query, SQL
asked by:
20 pts.

Scheduling queries in AS/400
What is the easiest way to schedule several queries to run several times throughout the day??? Will the Advanced Job Scheduler accomplish this or would writing a simple CL program be easier? Or is there any other methods?

Answer Question   |  January 2, 2008  11:22 PM
Advanced Job Scheduler, CL, Query, Scheduling
asked by:
20 pts.

SQL query – Unique item with latest date of entry
Hey guys, I have been working on the query running against MS access database. The table has multiple columns and two of them (which are vital to this query) are Date and ItemN ( suggesting Item number). There are multiples which show multiple entries for single itemN, for example. item 1 has three date entries [...]

Answer Question   |  April 18, 2013  6:44 PM
Aggregate function, Distinct, MAX, Microsoft Access, Query, SQL, Subquery
asked by:
15 pts.

Julian to Gregorian Date Conv. in DB2 Web Query
I have a julian dates stored in the format YYDDD numeric, 5 positions, zero decimal. How do I convert to a true Gregorian date in DB2 Web Query for iSeries?

Answer Question   |  November 15, 2010  4:22 PM
DB2, iSeries, Query, web query
asked by:
0 pts.

Oracle table column names starting with a number
Hello, I just finished creating MANY tables that have column names starting with a number. I didn’t realize it was an issue until I started trying to select data from my tables using the column names in the where clause. Inserts work. Selects without where work. Is there any way to keep the column names [...]

Answer Question   |  November 7, 2007  12:56 AM
Oracle, PL/SQL, Query
asked by:
0 pts.

How to write the query
How to write the query from one table.(i don’t want first row and second row)

Answer Question   |  October 29, 2007  11:10 AM
Query, SQL Server 2000
asked by:
0 pts.