Forum Replies Created

Viewing 15 posts - 10,771 through 10,785 (of 13,460 total)

  • RE: Can any of you optimize the SQL query..?

    lots of possible improvements i think are possible.

    first, you can get rid of the cursor. that will be a massive improvement.

    to help, we need a few things to get 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: trim blank spaces permanently

    it sounds like you have two issues;

    first issue, if you have trailing spaces that won't go away,

    I'm thinking that the table wce_ilr has two columns Student_Forename and Surname with 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: Passing Stored Procedures "values" for IN

    head_contusion (7/23/2009)


    In your first response, was I reading your code too literally? I was expecting the string splitting funcition to put strings into the IN keyword. Your second...

    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: Passing Stored Procedures "values" for IN

    here is a specific example with a specific version of a Split() function:

    note it returns a table.

    Declare @MyString varchar(max)

    Set @MyString = 'Amanda,Devin,Sydnee,Valery,Gloria,Cecelia,Caroline,Estevan'

    select * from dbo.split(@MyString,',')

    --another example

    select * from firstnames where...

    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: ANyOne know why figure why my 1st Cursor is not updating anything

    i've been in the same situation that you are in; the lead programmer only believed that the data was right if he KNEW each row was handled.

    For the first couple...

    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: update table with split function

    it's just syntax; when you need to update and join on a table, you need an alias and an xplicit FROM:

    declare @CustomerList varchar(max)

    Set @CustomerList='IBM,Dell,Google'

    UPDATE MyAlias

    SET Delivered= 1

    From purchases MyAlias...

    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: Select integer ranges

    bmoynihan way to go for posting the CREATE TABLE and INSERT INTO statements! you are providing a great example for others to emulate! Thank you!

    i came late to the party,...

    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 Trace and Transaction Logs

    computer forensic investigator KEWL;

    obviously I don't need to tell you to only perform work on copies of the mdf and ldf files.

    i would definitely grab a trial version of 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: How to find a COLUMN name and the Condition Existing...

    i read the requirement a bit different; that the table in question had to have two specific column names in it to build the sql: I added a where...

    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: Passing Stored Procedures "values" for IN

    this is a very common requirement; what you want to do is search the scripts section for the "split" function, there's several version out there, all can do what 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 taking long

    i rewrote your query to use the standard INNER JOIN syntax, but I'm confused a bit about the subquery to get the count from LessOrder

    take a look at this and...

    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 help with SQL statement

    CREATE TABLE #WHATEVER(

    BranchID int,

    ClientID int,

    ClientActivity varchar(30) )

    -------------------------------------

    INSERT INTO #WHATEVER

    SELECT 1, 135,'Open Account' UNION ALL

    SELECT 1, 135,'deposit' ...

    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: Is the no.of users in each database must be equal or less the no.of logins in the Security tab ?

    each login could connect to your database an unlimited number of timse; as an example, if you've ever had two or more queries going on in SSMS, each "page" has...

    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: Transaction log "sniffer"

    I need to do more research on some of the log applications and how they work, but I was always under the impression that they use a live database to...

    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: I have been hacked; how to strip values

    Sample value before attack:

    101 main street

    Same field now:

    101 main street

    I need to know how to remove the from the thousands of affected rows without losing 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!

Viewing 15 posts - 10,771 through 10,785 (of 13,460 total)