Forum Replies Created

Viewing 15 posts - 7,861 through 7,875 (of 13,469 total)

  • RE: Need Cascade Delete like Stored Procedure

    francissvk (3/29/2011)


    Hi Lowell,

    thanks for your reply. I want to go all levels. but ur proc will go still Grand child level. Can u have any other...

  • RE: CREATE new table in a new schema: SQL Server 2008 R2

    could it be this simple?

    i didn't see enough details to directly emoulate the error, so as i was trying something to recreate teh issue, i got this;

    similar to the behavior...

  • RE: Convert from DATETIME to DATE

    to update from another table, you have to establish the relationship betweent he two tables...typically it's a column that has a common value betweent eh two tables:

    Update T2

    Set CallDate =...

  • RE: Convert from DATETIME to DATE

    show us your query; what part is failing? what specific error are you getting?

    are you using CONVERT(DATE,Yourdatetimefield)?

  • RE: Add Extended property to every column in every table...

    you want to create empty extended properties?

    instead of the select i used, you could use sys.tables and sys.columns this to generate the commands:

    WITH myCTE AS

    (

    SELECT

    ...

  • RE: NEW SEQUENCE NUMBER DAILY?

    also, along the lines of what Gus said about the row_number() function, I would leave the identity key in a table, and create a view, featuring the row_number() function in...

  • RE: Add Extended property to every column in every table...

    have you put together a spreadsheet that has the description you want to add yet?

    you can create a cell calculation in excel to generate the required statements, or do it...

  • RE: how to trim only the leading zeros in the tsql query

    I like srikant maury's a method of searching for the patindex; nice and clean.

    If you are sure no dashes or parenthesis are stored in the string,

    yet another way is convert...

  • RE: Script to grant user permission

    well adding a user and granting permissions are a three part process.

    first you really needed to already have a ROLE in your specific database that has the permissions you want...

  • RE: Discovering Table Order Precedence

    yes, there is a built in stored procedure that will give the hierarchy of the schema based on foreign keys and dependencies.

    this is what i typically use:

    ...

  • RE: synonyms' for multiple sql instances in my procedure

    your if statement stuff would work, absolutely;

    what i was implying, is you could possibly rebuild the synonym every time, something like this:

    --Usage EXEC GetData 'SERVERNAME'

    Create Procedure GetData(@WhichServer varchar(30))

    AS

    BEGIN --PROC

    ...

  • RE: synonyms' for multiple sql instances in my procedure

    whole (3/25/2011)


    hi,

    i would like to create a synonym for all my sq server instances. which i can use them in my procedure to reference.

    but my question is...

  • RE: Syntax error

    I'm sure dan is right...you can only test for a single value in the IIF condition, so you need nested IIf's to do the OR:

    =iif(Parameters!PUBLICATION.value = 304,round(Fields!LASTWEEK.Value/5),IIF(Parameters!PUBLICATION.value = 305,round(Fields!LASTWEEK.Value/5),round(Fields!LASTWEEK.Value)

  • RE: Need Cascade Delete like Stored Procedure

    very similar to your other thread; not sure why you want to dynamically delete stuff, but here's an ugly example.

    right ow, this is only printing the commands it might execute;...

  • RE: how to replace multivalue

    diboy79 (3/25/2011)


    my bank has change their account from 5 digit to 8 digit.

    every account has been changed by adding '212' in the end of account number.ex:

    11111 ----> 11111212

    22222 ---->...

Viewing 15 posts - 7,861 through 7,875 (of 13,469 total)