Forum Replies Created

Viewing 15 posts - 11,971 through 11,985 (of 13,460 total)

  • RE: Urgent, this script runs in a view and takes too long ,

    first thing I'fd suggest is avoiding trying to use NOLOCK;

    the NOLOCK in should only be used as a last ditch attempt to improve performance...you usually don't need to allow dirty...

    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: Error Code: -2139684860 on SQL Backup

    an OLD post for version 3.5 of Redgate implies that this error could occur if you are running out of disk space, or backing up over a network share...could that...

    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 add "dot" after every three digits in a number in sql 2005

    I've done something very similar with a tally table, where i wasinserting avbCrLf after a certain number of characters; I'm away from my hoe PC that has the code, but...

    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: Identify Unauthorised access.

    it sound's to me like you want to take Brian Kelly's suggestion one step further, and log successful logins as well...i think you are saying everyone is SUPPOSED to connect...

    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 query for removing records with special characters

    by "get rid of it" i assume you mean eliminate from the query, and not delete from the table...

    you want to use the LIKE operator: LIKE '%-%' means a...

    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: Need T-SQL to render timestamp with NO special characters

    the built in convert functions can give you the format you want: you'd end up with a varchar containing all the inf....is that goo?

    select convert(varchar,getdate(),112) ,

    convert(varchar,getdate(),114),

    replace(convert(varchar,getdate(),112) + convert(varchar,getdate(),114),':','')

    2008101708:57:54:45320081017085754453

    DBASkippack (10/17/2008)


    Need...

    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: Query to retrieve years till date starting from year 2004

    it's pretty simple...you'd use a BETWEEN statemnt for 2004 AND YEAR(GETDATE())...but you need to select it from a table, right?

    once again, Jeff Moden's Tally Table would be the ideal tool...

    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: Computed Column in Express 2005

    your going to be mad at yourself...you did everything except CAST/CONVERT your answer to the desired decimal:

    create table test(

    Price decimal(5,2),

    QuotedCost decimal(5,2),

    OrigCalc AS ([Price]-[QuotedCost])/[Price] *(100)...

    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: INSERTING VALUES IN A TABLE USING CHECK CONSTRAINT

    duplicate thread;

    follow the answered thread here:

    http://www.sqlservercentral.com/Forums/Topic587537-359-1.aspx

    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: Statement to return one column ony

    you've show us just part of your stored procedure, it looks like...the line you posted wil certainly only display a single column, "Records", so there must be a line 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: INSERTING VALUES IN A TABLE USING CHECK CONSTRAINT

    this sounds very much like a homework assignment....

    aside from that...

    you want to do a few things....

    you said only three specific values.... as you suspected, read about CHECK CONTRAINTS in you...

    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: Kindly help me in this simple query

    try something like this:

    select gpsdata_history.*

    from gpsdata_history

    inner join

    (SELECT

    REGISTRATIONNO, MAX(GPS_DATETIME)

    FROM ...

    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: Get number of records in a flat file

    here's how i would do it:

    first id read everything into a single string, instead of line by line.

    then i could use substring functions to find what we need instead.

    ...

    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 Profiler

    there is a free open source project that is a 2005 profiler, independant of MS;

    I use it all the time and it is very good.: very small footprint and you...

    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: Query Analyzer sends 'Results to File'

    i have this code saved in my snippets hat might help you; it featues two of the things you might want: BCP of data, and appending multiple files together.

    the original...

    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 - 11,971 through 11,985 (of 13,460 total)