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
N

neeraj_indianic

@neeraj_indianic
About
Posts
9
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Create Table statement
    N neeraj_indianic

    Actually you are not giving the size of varchar so by default it will take varchar(1) and you will not be able to insert the record which is greater than 1 character. You have to do like this:- Create Table Purchase (Name varchar(50),Amount numeric(10,2))

    Database database

  • datetime problem
    N neeraj_indianic

    This is because of format of date is different in your table column field(i.e. CreateDate and you are comparing this date with another format which is mm/dd/yyyy. If you want to do it then you have to convert your format and you will sure get result. Now use this query to get the result. select tU.UserID,tU.FirstName,tU.LastName, tU.LastName+''+ tU.FirstName'UserId', tA.UserID,tA.CreateDate, tA.UpdateDate from tAnalyst tA, tUser tU where tU.UserID=tA.UserID and convert(varchar,tA.CreateDate,101)='07/25/2007'

    Database database help tutorial

  • Cursor_sql server 2005
    N neeraj_indianic

    Instead of using select * from #temp21 specify the each column name and in the date column use convert function. now your select query will be like this. select convert(varchar,Ason,101),SubScriberEmailfrom, convert(varchar,SvcActivationDate,101),convert(varchar,PkgActivationDate,101), convert(varchar,RenewalDate,101) from #temp21

    Database sysadmin learning

  • Doubt in StoredProcedure [modified]
    N neeraj_indianic

    ok, Now i got your problem and your solution is given here. set @sql='select *from tblname where '+@columnname+' = '+''''+@value+'''' I have tried it and its working.

    Database sharepoint database help

  • Doubt in StoredProcedure [modified]
    N neeraj_indianic

    Just check your table detail. It will be because of you have defined the column name as int while creating the table.

    Database sharepoint database help

  • in sql server 2005 i need to send e mails periodically.
    N neeraj_indianic

    Using db you can not send the mail periodically. But this method will help you. Create an excutable file which contains sending mail code. Schedule this excutable file using windows scheduler from control panel. Now your executable file will check the pending mails from your db and will send the mail. Once mail is sent then set the flag sent so that it will not sent again.

    Database database question sql-server sysadmin

  • select statement to another database on another server
    N neeraj_indianic

    I have seen that to use OPENROWSET command the first parameter should be MSDASQL the SQLOLEDB is used for OPENDATASOURCE. i have tried this query and working perfectly. Also i hope that you have already enabled the OPENROWSET and OPENDATASOURCE command from the SQL server surface area configuration wizard. SELECT * FROM OPENROWSET('MSDASQL', 'DRIVER={SQL Server};SERVER=yourremoteserver_name;UID=your_remote_user_id;PWD=your_remote_password', your_remote_database_name.dbo.remote_table_name) Neeraj Gupta

    Database database help question com sysadmin

  • how to capture count of records from stored procedrure
    N neeraj_indianic

    You can use @@ROWCOUNT in your stored procedure and take the value returned by @@ROWCOUNT as output parameter of stored procedure.

    Database sharepoint database help tutorial

  • cursors in functions
    N neeraj_indianic

    You have not specified that which type of function you want to create means scalar valued function or table valued function. I suppose that you want to create table valued function. For that your code is wrong in the starting line. Look at the below code. Hope it will guide you. CREATE FUNCTION [dbo].[waste]() RETURNS @student1 TABLE ( student_rec int, St_name nchar(10) ) AS Begin declare @a int declare @b nchar(10) declare cur cursor for select Id,name from student open cur fetch next from cur into @a,@b while @@FETCH_STATUS =0 BEGIN INSERT @student1 values(@a,@b) --SELECT @a as a1 , @b as a2 fetch next from cur into @a , @b END close cur deallocate cur RETURN end Neeraj Gupta IndiaNIC Infotech Ltd.

    Database help question
  • Login

  • Don't have an account? Register

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