Viewing 15 posts - 3,931 through 3,945 (of 6,397 total)
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
You need SysAdmin, explicit permissions to run CREATE DATABASE or the dbcreator fixed server roles assigned to the login trying to create the database in order for it to be...
August 16, 2012 at 5:09 am
Problem is that your appending to the same backup file which never gets purged.
Change the backup task to backup to a single file each time it runs, then you can...
August 16, 2012 at 3:08 am
Logon trigger logging to the event log.
Login auditing changed from "Both failed and successful logins" to "Failed Logins only" without restarting the SQL server.
August 16, 2012 at 2:57 am
Viewing 15 posts - 3,931 through 3,945 (of 6,397 total)