Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)

  • RE: Correlate dbname and his dbfile (data+log)

    instead of sysfile select the name from master.sysdatabases

  • RE: Sending results of a querry via email

    xp_sendmail takes the @query argument. Check it out on BO , i hope this will help you.

     

  • RE: Variable column names in a table and or view

    I'm not sure if this is what are you trying to do but i hope it will help you

    declare @M1 char(6)

    declare @M2 char(6)

    declare @M3 char(6)

    declare @tmp_sql char(1000)

    select @M1 = '200506'

    select @M2...

  • RE: hours and minutes calculation

    if you change Phil's variables with your table fildes i think you get the right resuls

    for example

     

    create table dt (hhmm decimal(4,2)

    insert into dt values (3.30)

    insert into dt values (4.45)

    select rtrim(cast(cast((sum(floor(hhmm))*...

  • RE: Should be an easy Select, shouldn''''t it?

    try this

    select applicantid from aa

    where skillid = 1 and applicantid = (select applicantid from aa where skillid = 3)

  • RE: String manipulate

     try this one

    declare @STR char(50)

    select

    @STR = "

  • RE: String manipulate

    declare  @STR char(50)

    set @STR = "  where strs in ('40301','40301.16')   "

    select substring(@str,patindex('%(%',@str) + 1,patindex('%)%',@str) - patindex('%(%',@str) - 1)

  • RE: Displaying Dates in particular format

    select replace(convert(char(11),cast('2005-09-23' as datetime),13),' ','')

  • RE: Calculating percentages

    i think that this is the correct select

    select (426.0/852.0)/100.0

  • RE: Alter column

    try with the following code

    if you have constraints don't forget to add them

    BEGIN TRANSACTION

    SET QUOTED_IDENTIFIER ON

    SET TRANSACTION ISOLATION LEVEL SERIALIZABLE

    SET ARITHABORT ON

    SET NUMERIC_ROUNDABORT OFF

    SET CONCAT_NULL_YIELDS_NULL ON

    SET ANSI_NULLS ON

    SET ANSI_PADDING ON

    SET...

  • RE: Text search Problem - part 2

    try this one

     

    create function select_points(@points char(3)) returns @tmp_table TABLE (RoutingString char(2000))

    as

    begin

     declare @point char(1)

     while len(@points) > 1

     begin

      select @point = substring(@points,patindex('%,%',@points) - 1 ,1)

      select @points = substring(@points,patindex('%,%',@points) + 1, len(@points))

      insert into @tmp_table...

  • RE: Text search Problem - part 2

    Try to use PATINDEX for example

    select RoutingString

    from routing

    where PATINDEX('%C%' , RoutingString) > 0 or PATINDEX('%K%' ,RoutingString) > 0

Viewing 12 posts - 1 through 12 (of 12 total)