Viewing 15 posts - 2,386 through 2,400 (of 2,458 total)
Each database has a unique identifier. The system databases are always 1-4: Master: 1, TempDB: 2, model: 3, msdb: 4. You see get them all with:
select database_id, name from sys.databases
DBAs...
-- Itzik Ben-Gan 2001
September 6, 2012 at 10:38 am
My experience has been the same as Ryan's... Indexes not getting moved into prod and they would not be much help without rebuilding your stats as previously mentioned.
Take a...
-- Itzik Ben-Gan 2001
September 6, 2012 at 10:15 am
Shadab Shah (9/5/2012)
Hi Alan,
I tried your solution also but 🙁 your solution is also not working.I tried to find out what was wrong with your query but as far...
-- Itzik Ben-Gan 2001
September 6, 2012 at 9:46 am
Eugene Elutin (9/5/2012)
-- Itzik Ben-Gan 2001
September 5, 2012 at 3:00 pm
This should do the trick (building on Robert's query and Luis's suggestion) :
-- pass the query text as search string variable
DECLARE @query varchar(1000)
SET @query =' INSERT ...
-- Itzik Ben-Gan 2001
September 5, 2012 at 11:52 am
I think this is what you are looking for (if not exactly, should be close enough):
-- test table and test data
--CREATE TABLE ssc_test
--(
--x int,
--y int,
--z varchar(20)
--)
--INSERT INTO ssc_test
--SELECT 1,1,'old value'
--UNION
--SELECT...
-- Itzik Ben-Gan 2001
September 5, 2012 at 11:15 am
wayne_hudson3 (9/3/2012)
Access will only display the first record from a table on a form.You will have to add a grid or some other mechanism to show all records.
Just to clarify:...
-- Itzik Ben-Gan 2001
September 5, 2012 at 10:46 am
mrwillcostello (9/2/2012)
...I want to use this Access form (which contains all columns from 5 tables) to enter data into the SQL Server database. Please a little guidence would be greatly...
-- Itzik Ben-Gan 2001
September 5, 2012 at 10:29 am
I concur 100% with grant. You can do a ton with TSQL, use Powershell for stuff you cant do with TSQL.
Redgate tools are awesome too: The comparison utilities (schema...
-- Itzik Ben-Gan 2001
August 31, 2012 at 6:41 pm
I have used policies to ensure developers create objects in the correct schema. E.g. We want stored procs in environment X to go into schema xxx.
-- Itzik Ben-Gan 2001
August 31, 2012 at 6:06 pm
Sean Lange (8/30/2012)
And it won't work if the OriginalAircraftNumber should be 847 and the FinalAircraftNumber should be 55. Also I am not quite sure the case statement will work exactly....
-- Itzik Ben-Gan 2001
August 30, 2012 at 1:50 pm
Based on your sample data and DLL this should work:
SELECTFlightDate,
FlightNumber,
ScheduleOrder,
MIN(AircraftNumber) OriginalAircraftNumber,
MAX(AircraftNumber) FinalAircraftNumber,
ChangeOfAircraftIndicator=
CASE
WHEN COUNT(ScheduleOrder)=1 THEN 'N' ELSE 'Y'
END
FROM [dbo].[DailySchedule]
GROUP BY FlightDate, FlightNumber, ScheduleOrder
ORDER BY FlightDate, FlightNumber, ScheduleOrder
This will...
-- Itzik Ben-Gan 2001
August 30, 2012 at 1:29 pm
also, if the stored procs are spread accross multiple databases you could use this:
-- create temp table for result set
IF OBJECT_ID('tempdb..#sprocSearchResults') IS NOT NULL
DROP TABLE #sprocSearchResults
CREATE TABLE #sprocSearchResults (StoredProc...
-- Itzik Ben-Gan 2001
August 30, 2012 at 10:30 am
Someone beet me to it but you can also use:
SELECT DB_NAME()+'.'+ROUTINE_SCHEMA+'.'+ROUTINE_NAME [Stored Proc]
FROM INFORMATION_SCHEMA.ROUTINES
WHERE CHARINDEX('@prmSorted',ROUTINE_DEFINITION)<>0
AND ROUTINE_TYPE='PROCEDURE'
-- Itzik Ben-Gan 2001
August 30, 2012 at 9:17 am
The stairways are great. I also use Microsoft E-Learning; there is ton's of free stuff there.
-- Itzik Ben-Gan 2001
August 21, 2012 at 3:30 pm
Viewing 15 posts - 2,386 through 2,400 (of 2,458 total)