Forum Replies Created

Viewing 15 posts - 18,796 through 18,810 (of 18,926 total)

  • RE: many to many query question

    Even I don't like to be wrong 🙂

  • RE: corrupt table???

    if that doesn't help then you can have a look at DBCC CHECKTABLE (but I never used it so I can't provide much info).

  • RE: many to many query question

    Of course it should be what you said... must mean you're catching on.

  • RE: Login to Truncate Certain Tables

    I don't see the issue.. if the application can create/truncate it then they "should be able to" destroy it (unless denied permission is in place). But that's why stuff...

  • RE: Extended Stored Procedures question

    Check in the books online under sysobjects / sysobjects

    C = Constraint CHECK

    D = Default value or DEFAULT constraint

    F = FOREIGN KEY Constraint

    FN = Scalar User defined function (returns interger or...

  • RE: many to many query question

    Small fix (maybe it'll clear it up too 🙂 ) :

    SELECT artists.artistID,

    artists.firstName,

    artists.lastName,

    products.productID,

    products.name,

    products.price

    FROM artists inner join artistsProducts

    on artists.artistID = artistsProducts.productID inner join products on artistsProducts.artistID = products.productID

    basically you are...

  • RE: Extended Stored Procedures question

    Select * from master.dbo.sysobjects where XType = 'X'

  • RE: Login to Truncate Certain Tables

    can't you create a sp that does the truncating job and then grant to that sp only when needed to only the users that need to execute it?

  • RE: SELECT AND UPDATE

    I think something like this would work.

    SELECT identity (int, 0, 6) as salesseq, SeqNumberTemp.ProductNameFull, (CASE WHEN OrderTotal > 0 THEN (SalesTotalTemp.OrderTotal * SeqNumberTemp.margin) ELSE SeqNumberTemp.margin END) AS Total into #SomeTempTable...

  • RE: SELECT AND UPDATE

    Can't do it before monday morning. But i promess I'll do it then.

  • RE: select and update table

    I already gave you an answer for this question at this adress

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=148386

    also read Yoda's answer as he completes mine very well (talking about not inserting presentation data when not necessary).

  • RE: SQL Injection in stored procedure

    SET @sql = 'SELECT JOB_id, job_desc

    FROM JOBS WITH (NOLOCK)

    WHERE JOB_id IN (' + @JobIDs + ')' +

    'ORDER BY JOB_id'

    Execute (@SQL)

    consider this

    Set @JobIDS = '''; Drop DATABASE master --'

    or

    Set @JobIDS...

  • RE: SQL Injection in stored procedure

    Dude it's the other way around.

    The only time you'll ever be safe from sql injection using dynamic sql is when you do dba tasks (like for each databases in each...

  • RE: SQL Injection in stored procedure

    Listen to Yoda you must, far better and safer his solution is.

  • RE: SELECT AND UPDATE

    You'll need to do the update in only 1 query. The tricky part is that you seem to need to set a counter in the update query.

    to do this...

Viewing 15 posts - 18,796 through 18,810 (of 18,926 total)