Forum Replies Created

Viewing 15 posts - 1,606 through 1,620 (of 13,460 total)

  • RE: data type conversation

    the convert function has an optional parameter when you are converting dates;

    112 will give you the eight digit format you are looking for:

    SELECT CONVERT(VARCHAR,getdate(),112) --20150803

    SELECT Sub_date = CONVERT(VARCHAR,annual_date,112)

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: In which book is log shipping .wrk files mentioned?

    coolchaitu (8/2/2015)


    Lowell Sir,

    If these info are not found any books, how does the person who answers the question gets to know such things? Just curious to know. Please share the...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: 18456 error with state 38

    this is usually because the user was once assigned to have a default database that has been renamed or deleted. it's possible that the database exists, but permissions prevent the...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: can I safely use top n for select/delete in a while loop?

    sqlguy-736318 (7/28/2015)


    My question is more specific: For a given result set in a temp table, will "select top 1" and "delete top 1" operate on the same row in...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: list store procedures contents

    SQL does not have anything native to send anything to file.

    something external like bcp or sqlcmd, a Common Language Runtime Procedure, Powershell or a proper programming language have the ability...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Drop Database - Can it Fail ?

    yeah, i know....

    it has a purpose, really!

    it comes from a big ol data warehouse db that gets copied once a month.; a previous job step deleted a ton of data,...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Drop Database - Can it Fail ?

    homebrew i do something very similar as far as restoring an existing database.

    i have a SQL job with the steps to handle the takeover and restore as separate steps; this...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Finding the last records inserted into all tables in a database

    bryan.holmstrom (7/27/2015)


    Thank you for the quick reply but I need the actual tables not the system tables.

    Database = 'xxxCRM'

    Example table = accountbase (field = 'modifiedon' or even 'createdon' for each...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Finding the last records inserted into all tables in a database

    i would use the table and column metadata to generate the desired queries,a nd run them individually.

    select

    'SELECT TOP 10 * FROM '

    + quotename(object_name(object_id))

    ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Fliter MS objects out of select statement

    does filtering on the is_ms_shipped column work for you? it sems to remove things like MSreplication_options and spt_values and stuff for me.

    select *

    from sys.objects

    where is_ms_shipped = 0

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: User Can delete rows from a table by Calling Stored procedure SP While User doesn't Permission To delete from Table

    that is normal, expected behavior.

    by design, you can grant a person access to a stored procedure which may affect objects the enduser does not have access to. .

    using ownership chaining,The...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Project Deployment Model - Multiple Projects in a Solution

    Adam McArdle (7/27/2015)


    Phil Parkin (7/27/2015)


    You have not explained why there is password protection on the project files ...

    We have our packages password-protected because they have credentials in them, and Project...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to determine SQL Security Login group for windows login when user is member of active directory security group.

    i've put together this cursor in the past that iterates through all windows groups in SQL, and enumerates their members.

    finally, i account names that were found for admin vs user...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: SQL server email in table format

    quite a few issues there.

    when you call sp_send_dbmail, you cannot append stuff togetierh for the paramters, you have to do that in advance, it has to be a single assignment,...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: In which book is log shipping .wrk files mentioned?

    it might not be mentioned, as it's a transitory file extension:

    [http://fileinfo.com/extension/wrk


    File TypeSQL Server Log Shipping File

    DeveloperMicrosoft

    Popularity

    2.0 (1 Vote)

    CategoryDatabase Files

    File Format Description

    Database backup file created by SQL Server, a relational database...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 1,606 through 1,620 (of 13,460 total)