Forum Replies Created

Viewing 15 posts - 1,561 through 1,575 (of 2,062 total)

  • RE: Optional DateTime parameter stored procedure.. HELPPP!

    CREATE PROCEDURE TimeSheet

    (

    @company_name varchar(50) = '%',

    @employee_name varchar(50)= '%',

    @work_no varchar(50)= '%',

    @work_type varchar(50)= '%',

    @time_type varchar(50)= '%',

    @work_date1 datetime = NULL,

    @work_date2 datetime = NULL,

    @date_operator as varchar(2000) = '='

    )

    AS

    SET NOCOUNT ON /*skip a roundtrip*/

    IF (@work_date1...

  • RE: Login database access

    sp_helplogins

  • RE: Permissions on view overridden by table permissions?

    Sure they aren't accessing the tables directly instead of using the view?

    Cross database ownership enabled?

  • RE: alter view

    *DROP TOP 100 PERCENT

    *I've rewritten it a bit. Check if the outcome is the same.

    SELECT

     dbo.tblOrganization.OrganizationTitle AS Organizatie

    , dbo.tblInstallation.InstallationTitle AS Instalatie

    , dbo.tblForm.FormTitle AS Formular

    , dbo.tblParam.ParamTitle + '[' + ISNULL(dbo.tblValue.MeasUnit, '')...

  • RE: OleDbProvider doesn''''t support that type

    Have you declared all sizes in your stored procedure?

    Like convert(varchar(mylength),my variable) instead of convert(varchar, myvariable)?

  • RE: Ordering a string field with different lenghts

    if you know the maximum length of the column

    select myfield

    from mytable

    order by convert(char(maxlen),myfield)

  • RE: query question

    all those brackets are confusing me

    but the subselect in ON=

    LEFT JOIN    [SELECT description, id, type, call_req_id, last_mod_dt FROM act_log] ON call_req.persid = [SELECT description,id,type,call_req_id,last_mod_dt].call_req_id) 

    looks like a weird construction

  • RE: ALTER TABLE ...ADD new_column - Table locking

    from the books online

    The changes specified in ALTER TABLE are implemented immediately. If the changes require modifications of the rows in the table, ALTER TABLE updates the rows. ALTER TABLE...

  • RE: Cannot create more than 249 nonclustered indices or column statistics on one table

    There could be too many statistics.

    sp_helpstats shows the statistics on the table.

  • RE: Removing High Ascii (>128)

    (n)textfields or (var)char fields?

    If varchar you can write an user defined function

    Either with the function ASCII (returns int value of the first character)

    or with calling REPLACE  x times.

     

  • RE: Launch sqlagent.exe

    Try

    You need to check the configuration for the service. Go to

    Services(from Control Panel or Administrative Tools -

    depending on your OS).

    Go to the sqlserveragent service and view the properties for

    the...

  • RE: Select DISTINCT question...

    *rewritten with joins

    *group by takes care of distinct

    SELECT B.BookingID,

    ISNULL(UPPER(C.CustomerSurname),'') AS CustomerSurname

    FROM tbl_hp_bookings B WITH (NOLOCK)

    INNER JOIN tbl_hp_bookings_transactions BT WITH (NOLOCK)

     ON B.BookingID = BT.BookingID

     AND BT.TransactionTypeID <> 1001

    LEFT JOIN tbl_hp_customers C WITH...

  • RE: Update statement

    *convert the int properly with convert(varchar(length_of_field),code)

    *another way of updating

    UPDATE OccRadiology

    SET OccRadiology.Ipsil= goodcodes.code

    FROM OccRadiology

    INNER JOIN /*only the ones who match*/

    (select convert(varchar(30),CodeLookUp.Code) as code /*ipsil is varchar*/

    FROM CodeLookUp

    WHERE CodeLookUp.CType = 93

    ) AS...

  • RE: Launch sqlagent.exe

    That's odd.

    How do you start sql server agent? From services.msc ?

    What sql server version are you using?

    Does the path in services.msc ->services-> SQLSERVERAGENT path to executable is correct?

    Mine is sql...

Viewing 15 posts - 1,561 through 1,575 (of 2,062 total)