Forum Replies Created

Viewing 15 posts - 5,581 through 5,595 (of 13,460 total)

  • RE: can we use data mining for simulating football game?

    what would the function do? generate random events? ie PASS 4 YARD GAIN,RUN -1 GAIN,FUMBLE ,INCOMPLETE PASS etc?

    are the teams supposed to be weighted , ie one has great offense,...

    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: Issue with Identity Specification on Primary Key column...table has millions of rows

    how much of an impact would it be to change the column to big_int?

    if there's an application that consumes the data, that would need to change to use int64,...

    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 rows based on code

    ok, then if you were searching email addresses for example, and you want to find items with teh @ symbol,then it's like this:

    DECLARE @var varchar(10)

    SET @var ='%' + '@'...

    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 rows based on code

    hbtkp (4/11/2012)


    ok i need to match @% in my query ,how to do that

    if i do using like '@%' its not working

    There's no such thing as just [@] in SQL....

    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: junk characters in a field

    drew.allen (4/11/2012)


    SELECT *

    FROM YourTable

    WHERE YourField LIKE '%[^A-Z0-9]%'

    Drew

    i missed that the question was how to clean them as well as how to find them, thanks!

    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: junk characters in a field

    here's one way: a scalar function that strips out the non-compliant characters:

    I've got the same functionality as a CLR, which uses Regular Expressions, but I've never tested which performs better.

    SELECT...

    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 rows based on code

    hbtkp (4/11/2012)


    i havent done anything for this ,trying to use case but doesnt work

    well until you provide concrete details we've asked for for 3 forum pages so far, none of...

    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 rows based on code

    hbtkp (4/11/2012)


    it doesnt matter , how do i get those value in select stm

    lol . if it doesn't matter, well...whatever.

    I'll ask again for some specific code: show us what you've...

    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 help

    you'll have to join the table agaisnt itself wiht an alias:

    something like this:

    select * from product_to_cat t1

    left outer join product_to_cat t2

    on t1.product-id = t2.product_id

    where t1.cat_id = 69

    and t2.catid = 30

    cuteprabakar...

    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 rows based on code

    i didn't even read your reply.

    you have got to do your part first.

    help us help you!

    1. provide a CREATE TABLE example representative of what you are using.

    2. provide INSERT...

    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 INDEXING

    well entire books have been written on indexing and improving performance;

    i think you'll need to read up via a google search first, and come back with specific questions.

    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 rows based on code

    hbtkp (4/11/2012)


    no,

    this is select statement in my sp,

    i need to supply one parameter @name

    this contains 2 item suppose pen and pencil,

    and it gives me that 2 item ,

    now in table...

    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 rows based on code

    i read your post twice, and I cannot visualize it;

    is this your what your data would look like?

    CREATE TABLE [dbo].[MYTABLE] (

    VARCHAR(10) ...

    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: Cursor alternatives

    Sean Lange (4/11/2012)


    Mine is incredibly close to yours Lowell. Instead of stuffing with dept I stuff arrive and just concatenated dept to the derived column.

    {snip}

    sheesh Sean; now that YOU did...

    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: Cursor alternatives

    my example is close by using FORXML, but i don't get the "ending/last" airport.

    flight_tran_idSkills

    1234MAN-LHR-JFK-LHR

    and my code example:

    ;WITH flight_tran_table (flight_tran_id , [(Other Tran Data)])

    AS

    (

    SELECT 1234, '(Other Tran Data)'

    ),

    flight_sectors_table(tran_id,sector_id,dept,arrive)

    AS

    (

    SELECT 1234,1,'MAN','LHR' UNION ALL

    SELECT...

    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 - 5,581 through 5,595 (of 13,460 total)