Forum Replies Created

Viewing 15 posts - 6,121 through 6,135 (of 13,460 total)

  • RE: Am I missing something....

    yep you are missing the #1 fix to SQL injection: using parameters instead.

    generally, you never want to change users data. using it for comparisons, maybe...but even then, you want 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: How to do bitwise operation between strings? Thanks.

    this was interesting...

    not sure if you want to get the data as rows or columns, you might need to pivot this data if you need it as columns, see what...

    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 do bitwise operation between strings? Thanks.

    ugg; except for building a presentation string for binary,

    i always leave my values as integers for data manipulation...very easy to test each column for whatever it represents them.

    any chance...

    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: Checking and removing trailing zeros in varchar field

    does a SKU have a standard length, like 6 characters?

    do you have a lookup table of all skus so you could look up whether it is valid before or after...

    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: Trigger based on .cmd file

    well, first, a .cmd file is just the renamed verison of a .bat file...something you might typically call via command line / xp_CmdShell (if that is even enabled)

    that .cmd...

    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: Converting UTC time in GETDATE clause

    there's another function for the UTC date you cvan use: GETUTCDATE()

    select (UTCOccurrenceDateTime >= DATEADD(day, DATEDIFF(day, 0, GETUTCDATE()), 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: Unable to install SQL Server Business Intelligence Development Studio

    i'm guessing someone may have installed the full version of Visual Studio, which would supercede the BIDS version...could that be true?

    in that case, there's nothing to do...just open visual studio...

    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: pivoting a simple table

    i tried to help and started scripting, but you simply didn't provide enough data.

    you originally posted sample data with two columns...i had to dig thru your post to figure out...

    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: db_datareader allow alter permissions

    try this: maybe the login is a sysadmin:

    you'll need to change the name of the login to your specific login/sql user in question:

    EXECUTE AS LOGIN='ThatSpecificSQLUser';

    --the auditing snippet below...

    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: Problem during inserting row in a table ( sql server 2005)

    Dave Ballantyne (1/4/2012)


    Sounds to me like an unindexed foreign key lookup, trigger activity, blocking or indexed views.

    Take a look at the plan and the active processes to see if 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: How do I get the table definition ?

    sysobjects :

    you can either use SCHEMA_NAME(sys.objects.

    object_id) from sys.objects

    OR

    JOIN sys.schemas ON sys.objects.schema_id = sys.schemas.schema_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: view definition from sys.sql_modules -- How does SSMS know how to format it?

    DavidL (1/4/2012)


    Lowell: I will experiment a little with that. However, when I run your query as you've written it, the copy a definition into SSMS it comes through...

    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 do I get the table definition ?

    via TSQL, it's one of those really difficult things to do on your own.

    Like Gus said, all the data is out there in the sys.tables/sys.columns metadata views, but it's up...

    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: Shuffle Names (Update Query)

    something like this should do it in a single statement;

    see if this does what you would like:

    With FNames AS (

    select distinct firstname from Customer),

    LNames AS (

    select distinct lastname from Customer),

    Randomized...

    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: view definition from sys.sql_modules -- How does SSMS know how to format it?

    David, i think it has to do with CHAR(10) vs CHAR(13) + CHAR(10) as the line terminator.

    SSMS will show you the definition the "right" way, regarless of the terminator, 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!

Viewing 15 posts - 6,121 through 6,135 (of 13,460 total)