Forum Replies Created

Viewing 15 posts - 856 through 870 (of 907 total)

  • RE: insert fails with primary key constraint

    might try something like this:

    Create table yyy(x char(1) primary key, y char(1), z char(1))

    create table ddd(x char(1), y char(1), z char(1))

    insert into yyy values('A','B','C')

    insert into ddd values('A','B','C')

    insert into...

  • RE: Enterprise Manager, cannot restore

    Never had that happen before

    Have you tried the following:

    1) Change the view to "detail" and right click , and then select "all tasks", "restore database"?

    2) Issue a restore command via...

  • RE: Setting parameters

    Here is another example I have put together for my example website. Maybe someday I will put this on my site.

    This example shows how to use sp_executesql to set...

  • RE: Restoring a SQL2000 bkp on SQL7

    Can't use the backup to restore a 2000 DB to 7.0, but you can migrate all the objects back using DTS package. I know what a pain.

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

    Gregory Larsen,...

  • RE: Enterprise Manager, NT Auth, & Permissions

    Sounds like Brian is right on there with why you now don't have access. Have the SA's logon to SQL Server and add you NT account as a login...

  • RE: Building SQL with T-SQL

    Also it depends on how you plan to build dynamic sql in your sp. If the user is not submitting the sql to the sp, but your sp generates...

  • RE: Function to spell out numbers

    Don't suppose this is what you are talking about:

    declare @x money

    set @x = 123.45

    print cast (@x as decimal(9,2))

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

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website...

  • RE: Report Query

    Possibly something like this might work for you.

    create table company (id int identity, name char(10))

    create table users (id int identity, lastname char(10), company int, sex char(1), smoke char(1))

    insert into...

  • RE: Char to Date conversion

    Try reformatting the string you have into a valid SQL datatime string like follows:

    declare @d datetime

    declare @s-2 char(100)

    set @s-2 = '2001-03-25-02.27.55.365252'

    set @d = substring(@s,1,10) + ' ' + substring(@s,12,2) +...

  • RE: No osql User or Password?

    On the server is questrion, Click on the "Users and Passwords" under "Control Panel". Then Click on the "Advanced" tab, then click on the "Advanced" button, then expand the...

  • RE: No osql User or Password?

    If the user executing the "OSQL" command is a member of the administrator group for the server you are trying to connect, and the Builtin/Adminstrator login in sql server has...

  • RE: Foreign Key constraints problem

    Details......

    Check out this article for more information about your problem.....

    http://support.microsoft.com/default.aspx?scid=kb;en-us;q321843

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

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

  • RE: Foreign Key constraints problem

    Is this what you are looking for:

    create table t2 (id int identity primary key)

    create table t3 (id int identity,

    ...

  • RE: Select And Update Records

    Are you just asking how you might update the first 10,000 records? Is so try this:

    update tblEmails

    set Flag = 'P' where email in (select top 10000 email from...

  • RE: programmatically load and execute sql script

    You might try something like the script below. Hope this is what you where looking for:

    declare @file_size int

    Create table #Foo

    (

    Alternate_Name char(20),

    Size char(20),

    Creation_Date char(20),

    Creation_Time char(20),

    Last_Written_Date char(20),

    Last_Written_Time...

Viewing 15 posts - 856 through 870 (of 907 total)