Forum Replies Created

Viewing 15 posts - 3,931 through 3,945 (of 6,401 total)

  • RE: .csv format from ssms

    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

  • RE: Down grade from sql 2008r2 Enterprise to Standard

    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...

  • RE: only get data with special pattern

    bitbucket-25253 (8/16/2012)


    Be very, very careful about using ISNUMERIC .. for example, altering your input data slightly to more readily see the possible problem.

    DECLARE @Codes TABLE (Code VARCHAR(100),LineNr...

  • RE: Adding/subtracting columns to get 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

  • RE: .csv format from ssms

    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 =...

  • RE: .csv format from ssms

    please provide your query

  • RE: .csv format from ssms

    select column1,',',column2,',',column3 from #temp

    then export query results to file using ssms

  • RE: Down grade from sql 2008r2 Enterprise to Standard

    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...

  • RE: Error: 18456, Severity: 14, State:38

    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?

  • RE: Error: 18456, Severity: 14, State:38

    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.

  • RE: .csv format from ssms

    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...

  • RE: create new database

    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...

  • RE: only get data with special pattern

    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

  • RE: convert row to column in plsql

    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...

  • RE: convert row to column in plsql

    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 <>...

Viewing 15 posts - 3,931 through 3,945 (of 6,401 total)