Viewing 15 posts - 3,931 through 3,945 (of 6,401 total)
run query in ssms, results to grid, right click top left hand blank thing to select the whole result set including headers, then right click, save results as
August 17, 2012 at 1:38 am
MSDB you probably wont have any problems with, but master you might as thats the "server" db, unsure if there would be some flag or data in master to say...
August 17, 2012 at 1:35 am
bitbucket-25253 (8/16/2012)
DECLARE @Codes TABLE (Code VARCHAR(100),LineNr...
August 16, 2012 at 8:48 am
One or more of the columns must be null.
You can handle it by using ISNULL
Something like below
(ISNULL(Vehicle.value,0) + ISNULL(Vehicle.Extras_Value,0) + ISNULL(Vehicle.Expenses,0) + ISNULL(Vehicle.Another_Tax,0) + ISNULL(Vehicle.Other_Extras_Value,0)) AS NetCost
August 16, 2012 at 8:39 am
Make your inserts into your tempoary table a sub query
something like this
declare @CurrentSchoolYear int,
@dtBeginDateIA3 datetime,
@dtEndDateIA3 datetime,
@dtBeginDateIA2 datetime,
@dtEndDateIA2 datetime,
@dtBeginDateIA1 datetime,
@dtEndDateIA1 datetime,
@dtBeginDateIA datetime,
@dtEndDateIA datetime
select @CurrentSchoolYear = iCurrentSchoolYearCode from tblSysVariables
SELECT @dtBeginDateIA3 =...
August 16, 2012 at 8:34 am
select column1,',',column2,',',column3 from #temp
then export query results to file using ssms
August 16, 2012 at 8:10 am
Jobs, logins, linked servers, server side DDL triggers, logon triggers, SSIS packages, database mail etc etc will all be lost.
I have attached a powershell script which will export all SSIS...
August 16, 2012 at 7:53 am
Does the user have access to master
Remembers you detailed error exists if grant SA rights.
What is the default database for the user? Does that exist?
August 16, 2012 at 7:46 am
Run a trace for failed logins and see what database the failure is on.
Then check to see if the DB exists or if the user has access to the DB.
August 16, 2012 at 7:31 am
You can use the wizard to run a query to export to a flat file.
You can also run the query to file, but to save it as CSV, you would...
August 16, 2012 at 7:29 am
Speak to your DBA and ask them to create you a database and grant you the nessesary access to the database to perform your duties.
Your permissions are not high enough...
August 16, 2012 at 7:05 am
So the first 4 will always be ABCD, then anything after that should be numeric?
DECLARE @Codes TABLE (Code VARCHAR(100))
INSERT INTO @Codes VALUES
('ABCD000000001'),
('ABCD000000002'),
('ABCD000000003'),
('ABCDT000000001'),
('ABCD00000000T1'),
('ABCD00000T0001')
SELECT
Code
FROM
@Codes
WHERE
ISNUMERIC(RIGHT(Code,(LEN(Code)-4))) = 1
ORDER BY
Code DESC
August 16, 2012 at 5:21 am
raghuldrag (8/16/2012)
its k tell in server 2000 style
What you want in T-SQL is a cross tab or pivot query.
Two good articles for T-SQL Cross-Tabs and pivot queries in my signature.
If...
August 16, 2012 at 5:13 am
erics44 (8/16/2012)
the output would be the same using sql or plsql
Output would be the same yes you are correct.
The syntax to get the output will not be the same.
PLSQL <>...
August 16, 2012 at 5:10 am
Viewing 15 posts - 3,931 through 3,945 (of 6,401 total)