Forum Replies Created

Viewing 15 posts - 1 through 15 (of 61 total)

  • RE: Query Help

    David Webb-200187 (11/7/2012)


    Tempting to just say:

    select ano from #x1 where ano <> 4

    order by ano

    but there must be some rule involving the 'dept' column in play here. What...

  • RE: Monitor Table Grow

    Thanks

    This is Awesome, help me a lot.

  • RE: T-SQL help

    Ray M (10/5/2012)


    Ya, looks like it is satisfying your request. Is it the output you want?

    Now, when using the query on your "Real" Table you may need to look at...

  • RE: Query Help

    Sean Lange (10/3/2012)


    select *, ROW_NUMBER() over (PARTITION BY cStudentId Order by dtEnrollmentDate) as RowNum

    from #temp1

    ok, i got it.

    But in my requirement, I insert the output to another table and i...

  • RE: Query Help

    @SQLFRNDZ (10/3/2012)


    Can you tell me where is the difference in your 2 outputs above ?

    The difference is an additional column(RowNumber) in second output.

  • RE: Query Help

    Sean Lange (10/3/2012)


    This should do it.

    ROW_NUMBER() over (PARTITION BY cStudentId, Order by tEnrollmentDate)

    Thanks for Your reply

    My question is,

    Is it possible in SQL, I increment Row Number while i am inserting...

  • RE: SQL Job Fails !!!

    anthony.green (10/1/2012)


    Without data it is hard to trouble shoot, run the procedure with the parameters that where passed in and it should error at the same point, and then you...

  • RE: SQL Job Fails !!!

    anthony.green (10/1/2012)


    Find out what the job runs and debug it, could be SSIS packages, stored procs etc.

    Yes, The Job running with Stored Proc

    Here is that sql command in that job.

    Please...

  • RE: Disk Used by Tables

    anthony.green (9/24/2012)


    compression, sparse columns, different columns have data populated (e.g 9 out of 10 columns are null in archive, but 0 out of 10 columns are null in the main...

  • RE: 'PRIMARY' filegroup is full.

    tim_harkin (9/20/2012)


    surma.sql (9/20/2012)

    That table has all historic info.

    that table contains all user archive log entries for application. and it will starts from last 2 years. I already put red flag...

  • RE: 'PRIMARY' filegroup is full.

    anthony.green (9/20/2012)


    yes it will work after the ghost cleanup task has gone in and removed the data but your only buying yourself some time, you will need to get more...

  • RE: 'PRIMARY' filegroup is full.

    anthony.green (9/20/2012)


    You will have to do 1 or more of the below

    Drop objects

    Delete data

    Add more drive space

    Enable AutoGrowth if disabled

    Remove unnessesary files from the file system

    right now i am deleting...

  • RE: .csv format from ssms

    anthony.green (8/17/2012)


    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

    Thanks for...

  • RE: .csv format from ssms

    Please help me too this

    How i dump into csv file using Export Wizard

    declare @CurrentSchoolYear int

    select @CurrentSchoolYear = iCurrentSchoolYearCode from [STARS-DAYB-SRV.PGHBOE.LOC].STARS.dbo.tblSysVariables

    ; WITH Students AS

    (

    SELECT DISTINCT

    cStudentId

    FROM [STARS-DAYB-SRV.PGHBOE.LOC].STARS.dbo.tblStudentSchoolHistory...

  • RE: .csv format from ssms

    anthony.green (8/16/2012)


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

Viewing 15 posts - 1 through 15 (of 61 total)