Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

Krish KP

@Krish KP
About
Posts
267
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Sql server 2005
    K Krish KP

    You need to write a procedure for getting your required output

    Regards KP

    Database help tutorial database sql-server sysadmin

  • Can we restrict the number of maximum records inserted in a particular table?
    K Krish KP

    this can be done using either with Check Constraint or Trigger

    Regards KP

    Database database help tutorial question

  • File size
    K Krish KP

    check this for more details on Maximum Capacity Specifications for SQL Server 2005 http://msdn.microsoft.com/en-us/library/ms143432.aspx[^]

    Regards KP

    Database question

  • Best practice?
    K Krish KP

    Can be done only using corelated subqueries

    SELECT Distinct SalesID FROM fky a WHERE
    EXISTS (SELECT * FROM fky b WHERE a.SalesID = b.SalesID AND fkey = 12345)
    AND
    EXISTS (SELECT * FROM fky c WHERE a.SalesID = c.SalesID AND fkey = 775)

    Regards KP

    Database database sales question discussion

  • convert
    K Krish KP

    Use Convert or Cast functions

    SELECT Convert(VarChar(10), IntValue) + VarcharValue .....

    SELECT Cast(IntValue, VarChar(10)) + VarcharValue .....

    in the example I've used 10 characters i.e. max 10 degit number

    Regards KP

    Database database tutorial

  • Can it Joined two tables like this?
    K Krish KP

    Yes. This usage is porper, to check for multiple columns.

    Regards KP

    Database database question

  • adding column names using the stored procedure.error in the @ character
    K Krish KP

    in SQL 2000 syscolumns contains all column names of each table and sysobjects contains all table names Value 'U' in the column sysobjects.xtype indicates the objects is user table id column in both tables are common which to be used for joining the two tables.

    Regards KP

    Database database css sql-server sysadmin help

  • adding column names using the stored procedure.error in the @ character
    K Krish KP

    try replacing this line alter table tblMaster add @less varchar(500); with SET @Str = 'alter table tblMaster add ' + @less ' varchar(500);' Exec (@Str) also need to declare @Str variable at the begining

    Regards KP

    Database database css sql-server sysadmin help

  • getting the value in variable
    K Krish KP

    DECLARE @TotalPublicationsViews AS VarChar(100) DECLARE @Author AS VarChar(100) SELECT DISTINCT TOP 1 @TotalPublicationsViews = dbo.FnGetNoOfPublicationViewsByAuthor(C.CUSTOM2), @Author = C.CUSTOM2 FROM HDS_CUSTOM C GROUP BY C.CUSTOM2 SELECT @TotalPublicationsViews, @Author Declare variables as per their respective DataTypes

    Regards KP

    Database question sharepoint database

  • Automatic record insertion depends on system date sql server 2000?
    K Krish KP

    From SQL Enterprise Manager, select your server instance and go to Management -> SQL Server Agent -> Jobs right click "New Job" write your SQL query under "step" then schedule the job

    Regards KP

    Database question database sql-server sysadmin

  • Automatic record insertion depends on system date sql server 2000?
    K Krish KP

    Create a job to fetch all rows from first table that matches to the current date and copies to second table Schedule the job to execute daily

    Regards KP

    Database question database sql-server sysadmin

  • counting in SQL server 2000??
    K Krish KP

    SELECT ColA, Count(*) FROM TblA GROUP BY ColA

    Regards KP

    Database tutorial database sql-server sysadmin question

  • Why is this a syntax error?
    K Krish KP

    column name Guest ID is having space so it cannot be used directly use it like this command = "INSERT INTO Guest([Guest ID]) VALUES('1111')"

    Regards KP

    Database help question

  • A domain error occurred in SQL
    K Krish KP

    Check whether column yield contains any -ve value this might result in domain error

    Regards KP

    Database help database tutorial question

  • retrieve current week's data
    K Krish KP

    DATEPART() function should solve your problem Ex. WHERE DatePart(wk, Convert(DateTime, ColA)) = DatePart(wk, Convert(DateTime, getdate())) AND Year(ColA) = Year(GetDate())

    Regards KP

    Database database help question

  • convert EMPTY fields to NULL?
    K Krish KP

    UPDATE TableA SET ColA = NULL WHERE LEN(ColA) = 0 this works for string data even recollect reading IsEmpty() function in SQL Server you may even try with this. I've never used this function.

    Regards KP

    Database database sql-server sysadmin help tutorial

  • convert EMPTY fields to NULL?
    K Krish KP

    UPDATE SET = NULL WHERE LEN() = 0 this works for string data even recollect reading IsEmpty() function in SQL Server you may even try with this. I've never used this function.

    Regards KP

    Database database sql-server sysadmin help tutorial

  • Getting StartDate and EndDate using SQL query
    K Krish KP

    Getting End Date 1. Add 1month to the given date taking 1st day and year of given date 2. which returns 1st of next month from given date 3. subtract 1day which returns last day of given month DECLARE @GivenDate AS DateTime SET @GivenDate = GetDate() SELECT DateAdd(DD, -1, DateAdd(MM, 1, Cast(Month(@GivenDate) AS VarChar(2)) + '/01/' + Cast(Year(@GivenDate) AS VarChar(4)))) Getting Start date similar to the end date take day as 1 with month & year from given date

    Regards KP

    Database database sql-server sysadmin help tutorial

  • Need to execute a very time consuming Stored procedure on a remote machine.
    K Krish KP

    Try creating a job. so that the same will be executed at server and need not have an active connection from client.

    Regards KP

    Database database sharepoint help

  • xls
    K Krish KP

    hi 123, excle file should have sheet with name "sheet1" i.e. excluding $ sign.

    Regards KP

    Database database com sysadmin debugging help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups