Forum Replies Created

Viewing 15 posts - 11,701 through 11,715 (of 13,464 total)

  • RE: GUID not unique

    wierd, i've always used a varchar(40) for GUIDS/NEWIDs, but when i run this code, you are right, they are always 36 characters:

    declare @newid varchar(200)

    select @newid = newid()

    select len(@newid) as...

  • RE: Can't create a function

    i get that error if the database is set to compatibility mode "70"; but at 80 or above it works fine....

    maybe the server you are playing with is an upgrade...

  • RE: why the insert statement not work

    i think the error is here:

    the select into would insert a column name dColumn_name:

    insert into #DISTINCTC SELECT Column_Name FROM INFORMATION_SCHEMA.COLUMNS WHERE Table_Name = 'AGEN'

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

    --select * from #DISTINCTC

    the cursor looks for...

  • RE: records with distinct IDs

    in that case, it is impossible, unless you modify your table to include an identity column.

    create table emp

    (

    empID int identity(1,1) not null primary key,

    emp_id char(4),

    emp_name char(15),

    emp_address char(15)

    )

    insert emp(emp_id,emp_name,emp_address) values('e001','A','x')

    insert emp(emp_id,emp_name,emp_address)...

  • RE: records with distinct IDs

    excellent!

    that helps a lot, thanks. I can script and test agaisnt your example data now.

    but what about the business logic?

    what makes the record "e001 ...

  • RE: records with distinct IDs

    not enough information;

    what makes the record e001 A valid,

    and the e001 I...

  • RE: SQL Proper Case Command

    OK in another shameless adaptation of Tally examples, I'll attempt to get Jeff Moden some more recognition.

    Here is a propercase function based on the Tally table. here I'm checking for...

  • RE: Show dummy row for query between 2 dates

    Typically, you want to use a Tally or Numbers table to "fill in the gaps" for sequences or dates.

    I couldn't get my mental arms around your example to change this...

  • RE: get hourly combine data

    lol I'm on the ball today...rare for me

  • RE: get hourly combine data

    SELECT CONVERT(VARCHAR,@YOURDATECOLUMN,101),HOUR(YOURDATECOLUMN)

    FROM YOURTABLE

    group by CONVERT(VARCHAR,@YOURDATECOLUMN,101),HOUR(YOURDATECOLUMN)

  • RE: Need to transfer videos (25 GB) from one server to an other

    403 is web page permissions....

    maybe you can FTP or SFTP to your server? since it's a web page error, i assume your other server is remote over the internet and...

  • RE: Need to transfer videos (25 GB) from one server to an other

    back up the database, zip, transfer to the new server, unzip and restore is sure to be the fastest way as well as the most dependable;

    transfering over the wire, for...

  • RE: Are the posted questions getting worse?

    my absolute favorite posts to read are the ones where they say "urgent" in the title.

    they are invariably from a poster who just joined, has less than 5 posts, and...

  • RE: Calling VBScript or command file from within T-SQL without xp_cmdshell??

    As Jeff said, chances are whatever you were going to do, you could do it in tSQL;

    outside of that, you can use sp_OACreate to run vbscripts, or an executable, or...

  • RE: Very Simple User Define Function Returning Zero

    SQL server doesn't bother with changing data tytpes when it sees integer divided by integer...it returns an integer value.

    change so that your 2 is 2.0:

    RETURN 2.0/(@Period + 1.0))

Viewing 15 posts - 11,701 through 11,715 (of 13,464 total)