Forum Replies Created

Viewing 15 posts - 301 through 315 (of 907 total)

  • RE: Null Value Query

    You could build some dynamic SQL like this. Run this code in the database you are looking for null columns. Be aware this might run awhile, depending on...

  • RE: Retieving default values from a table

    You can get the description for each field in a table using the following TSQL:

    select objname column_name, value Description from ::fn_listextendedproperty(NULL, N'user', N'dbo', N'table', N'<your table>', 'column',default)

    Gregory Larsen, DBA

    If you...

  • RE: right justified values

    You can find a couple of examples on how to pad with zeros here:

    http://www.geocities.com/sqlserverexamples#string4

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

  • RE: Retieving default values from a table

    I tried it with a user that had no permissions to anything, and it still seems to return data. What version of SQL Server are you running? I...

  • RE: Deny writes to tables (securing a table)

    Anyone that has execute permissions on a stored proc can update the tables the SP updates, even if the user does not have permissions to update the table.

    Gregory Larsen, DBA

    If...

  • RE: backup

    Is it a SQL Agent job that runs the script?

    Or something else. Why is it currently not working?

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out...

  • RE: var char field length

    Cross-post, check out my comment in this thread:

    http://www.sqlservercentral.com/forum/link.asp?TOPIC_ID=11294

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

  • RE: varchar length

    How are you displaying the results? If you are using QA then you might need to adjust the "maximum characters per column" on the results tab on the options...

  • RE: Retieving default values from a table

    Might try something like this:

    insert into <your table> select column_name, column_default from information_schema.columns

    where table_name = '<table with default values>'

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my...

  • RE: xp_cmdshell to zip files?

    Type the complete path name to the exe. I think somethjng like:

    exec xp_cmdshell 'c:\program files\pkzip.pkzipc -add c:\test.zip c:\test.txt'

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out...

  • RE: run xp_cmdshell as different user

    As far as I know, XP_CMDSHELL will only run under the account that MSSQLSERVER is running under.

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at...

  • RE: Most Recent Date

    Took CQL's concept and created solution without union. Don't try this at home......it is not as fast, and I pulled a little hair out trying to write this weird...

  • RE: Most Recent Date

    Now there is an interesting twist to get the max date between two different dates. Great way to eliminate multiple pass of the data.

    Gregory Larsen, DBA

    If you looking for...

  • RE: Most Recent Date

    Here is the test I ran. The memory table consistantly takes longer. Now this is only on a small set of records. I replicated the insert statements...

  • RE: Most Recent Date

    Your method works as well and might be easier to read, but my quick test suggests it takes about twices as long as the set based UNION example.

    Guess it depends...

Viewing 15 posts - 301 through 315 (of 907 total)