Showing posts with label type. Show all posts
Showing posts with label type. Show all posts

Friday, March 30, 2012

I had set my Windows service's Startup Type as Automatic but it is not starting up Automaticall

Hello,

I had created a windows service using C#. I set its Startup Type as Automatic but it is not getting started automatically when my System Starts.

I checked the Event Viewer and it has the following message related to the Windows Service :

Service cannot be started. The service process could not connect to the service controller.

What Does This mean am I missing something.

|||I think the C# forums might be more useful for answering this particular question unless you have a SQL Server Question related to this?|||

Thanks John Gordon,

I had posted it again to the C# Section. By Mistake I had posted it in this section.

Thanks and Regards

Sunil Dutt

I got error when installing MSDE

I got a message when I type in :
setup SAPWD=abc SECURITYCODE=SQL
and setup the MSDE, there is an error said
"Unable to determine system default collatution."
What can I do?
Bill,
I think you cannot use abc, password, or anything that easy as pwd.
"Bill" wrote:

> I got a message when I type in :
> setup SAPWD=abc SECURITYCODE=SQL
> and setup the MSDE, there is an error said
> "Unable to determine system default collatution."
> What can I do?
>
|||Bill,
check MSDN knowledge base article 823466... may be able to help... also
check knowledge base articles for "Unable to determine system default
collation", there were several articles...
hope this helps!
wardeaux
"Bill" <vbpro@.hgcbroadband.com> wrote in message
news:017a01c48b9b$b6d04230$a401280a@.phx.gbl...
> I got a message when I type in :
> setup SAPWD=abc SECURITYCODE=SQL
> and setup the MSDE, there is an error said
> "Unable to determine system default collatution."
> What can I do?
sql

Wednesday, March 28, 2012

I don't suppose BULK UPDATE exists?... like BULK INSERT?

I have to update a field within a table of 60 records or so. Each record has a different field value. it's type varchar. i was given an excel file with the field values and was thinking of a bulk update like bulk insert, but i don't recall that it's possible that way.

Is the only way to create a table, bulk insert, then merge the two tables together with UPDATE?

Just wanted to see if there was an easier way to do it, otherwise i'll take the latter route. Thanks!

You'll need to bulk insert into a work table, then do the update.

Unfortunately (or maybe, fortunately ) there's not Bulk Update.

Or, you could do the processing with SSIS....

I don't remember...

Dear folks,
Could you please so kind to tell me where the fixed type data stored are? I
mean, in what system table are available these data?
"bigint, binary, float, decimal", and so on
Thanks in advance and regards,
Enricsystypes
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Enric" <Enric@.discussions.microsoft.com> wrote in message
news:0FEAE3E6-C6D8-400E-B210-F999DEBE6D17@.microsoft.com...
> Dear folks,
> Could you please so kind to tell me where the fixed type data stored are?
I
> mean, in what system table are available these data?
> "bigint, binary, float, decimal", and so on
> Thanks in advance and regards,
> Enric|||thanx
"Tibor Karaszi" wrote:

> systypes
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Enric" <Enric@.discussions.microsoft.com> wrote in message
> news:0FEAE3E6-C6D8-400E-B210-F999DEBE6D17@.microsoft.com...
>
>

Friday, March 23, 2012

I cant get the xml data type

I have just installed SQL server 2005 - Developer edition and the problem i get is: i dont have xml datatype available to me. I was able to use the xml datatye as long as i was using SQL server Express edition on a different machine. Please note that i have also applies SQL server 2005 SP-1 aswell but found no change in the datatypes available. I need urgent help in this regard.

During the installation i didnot install the reporting services as i did not need them.Has it something to do with it?XML datatype is avaiable for all SQL Server 2005 variation and service packs. Can you be more specific about "i dont have xml datatype available to me" ?|||

Well I meant that when i create a new table through design or query and type xml it generates and error message that xml datatyope is not defined. And here are the configuration of my machine:

OS: Windows XP - SP2

Hardware check: Intel Pentium 3 GHz processor 1 GB DDR RAM

I installed SQL server 2000 first and then SQL server 2005 dev. edition.

|||

Are you sure that you run the script against your SQL Server 2005 instance and not the SQL Server 2000 instance? What do you get if you say

select @.@.version

?

Thanks

Michael

Wednesday, March 21, 2012

I cannot transfer column DEFAULT values from old table to new table

Hi all,
SQL 2000
I am doing :
SELECT *
INTO NewTable
FROM OldTable
WHERE 1 =0
The NewTable has the same :
column names, Data Type and Length BUT the column DEFAULT VALUES
don't get transferred , I always have te reenter them manually.
Does any one have a quick solution? Thanks a millionDefaults is a type of constraint, and those are not carried over with SELECT
INTO. For this, you
have to script the table...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
<placidite1@.yahoo.com> wrote in message news:1178732983.525139.93780@.u30g2000hsc.googlegroup
s.com...
> Hi all,
> SQL 2000
> I am doing :
> SELECT *
> INTO NewTable
> FROM OldTable
> WHERE 1 =0
> The NewTable has the same :
> column names, Data Type and Length BUT the column DEFAULT VALUES
> don't get transferred , I always have te reenter them manually.
> Does any one have a quick solution? Thanks a million
>|||Thanks Mr Tibor Karaszi
I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
formation
and it doesn't carry over the Default Constraint either...I have the
CREATE TABLE script, but
no default values.
Is there any tool within SQL 2000 that will do it (ie carry over the
default values)?
Thanks a million.
On May 9, 1:54 pm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> Defaults is a type of constraint, and those are not carried over with SELE
CT INTO. For this, you
> have to script thetable...
> --
> Tibor Karaszi,SQLServer MVPhttp://www.karaszi.com/sqlserver/default.asphtt
p://sqlblog.com/blogs/tibor_karaszi
>
> <placidi...@.yahoo.com> wrote in messagenews:1178732983.525139.93780@.u30g20
00hsc.googlegroups.com...
>

>
> - Show quoted text -|||> I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
> formation
You need to configure this to include constraints.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<placidite1@.yahoo.com> wrote in message
news:1178748995.880148.288630@.e65g2000hsc.googlegroups.com...
> Thanks Mr Tibor Karaszi
> I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
> formation
> and it doesn't carry over the Default Constraint either...I have the
> CREATE TABLE script, but
> no default values.
> Is there any tool within SQL 2000 that will do it (ie carry over the
> default values)?
> Thanks a million.
>
> On May 9, 1:54 pm, "Tibor Karaszi"
> <tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
>
>

I cannot transfer column DEFAULT values from old table to new table

Hi all,
SQL 2000
I am doing :
SELECT *
INTO NewTable
FROM OldTable
WHERE 1 =0
The NewTable has the same :
column names, Data Type and Length BUT the column DEFAULT VALUES
don't get transferred , I always have te reenter them manually.
Does any one have a quick solution? Thanks a millionDefaults is a type of constraint, and those are not carried over with SELECT INTO. For this, you
have to script the table...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
<placidite1@.yahoo.com> wrote in message news:1178732983.525139.93780@.u30g2000hsc.googlegroups.com...
> Hi all,
> SQL 2000
> I am doing :
> SELECT *
> INTO NewTable
> FROM OldTable
> WHERE 1 =0
> The NewTable has the same :
> column names, Data Type and Length BUT the column DEFAULT VALUES
> don't get transferred , I always have te reenter them manually.
> Does any one have a quick solution? Thanks a million
>|||Thanks Mr Tibor Karaszi
I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
formation
and it doesn't carry over the Default Constraint either...I have the
CREATE TABLE script, but
no default values.
Is there any tool within SQL 2000 that will do it (ie carry over the
default values)?
Thanks a million.
On May 9, 1:54 pm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> Defaults is a type of constraint, and those are not carried over with SELECT INTO. For this, you
> have to script thetable...
> --
> Tibor Karaszi,SQLServer MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
>
> <placidi...@.yahoo.com> wrote in messagenews:1178732983.525139.93780@.u30g2000hsc.googlegroups.com...
> > Hi all,
>
> >SQL2000
> > I am doing :
> > SELECT *
> > INTO NewTable
> > FROM OldTable
> > WHERE 1 =0
> > The NewTable has the same :
> >columnnames, Data Type and Length BUT thecolumnDEFAULTVALUES
> > don't get transferred , I always have te reenter them manually.
> > Does any one have a quick solution? Thanks a million- Hide quoted text -
> - Show quoted text -|||> I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
> formation
You need to configure this to include constraints.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<placidite1@.yahoo.com> wrote in message
news:1178748995.880148.288630@.e65g2000hsc.googlegroups.com...
> Thanks Mr Tibor Karaszi
> I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
> formation
> and it doesn't carry over the Default Constraint either...I have the
> CREATE TABLE script, but
> no default values.
> Is there any tool within SQL 2000 that will do it (ie carry over the
> default values)?
> Thanks a million.
>
> On May 9, 1:54 pm, "Tibor Karaszi"
> <tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
>> Defaults is a type of constraint, and those are not carried over with SELECT INTO. For this, you
>> have to script thetable...
>> --
>> Tibor Karaszi,SQLServer
>> MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
>>
>> <placidi...@.yahoo.com> wrote in
>> messagenews:1178732983.525139.93780@.u30g2000hsc.googlegroups.com...
>> > Hi all,
>> >SQL2000
>> > I am doing :
>> > SELECT *
>> > INTO NewTable
>> > FROM OldTable
>> > WHERE 1 =0
>> > The NewTable has the same :
>> >columnnames, Data Type and Length BUT thecolumnDEFAULTVALUES
>> > don't get transferred , I always have te reenter them manually.
>> > Does any one have a quick solution? Thanks a million- Hide quoted text -
>> - Show quoted text -
>

I cannot transfer column DEFAULT values from old table to new table

Hi all,
SQL 2000
I am doing :
SELECT *
INTO NewTable
FROM OldTable
WHERE 1 =0
The NewTable has the same :
column names, Data Type and Length BUT the column DEFAULT VALUES
don't get transferred , I always have te reenter them manually.
Does any one have a quick solution? Thanks a million
Defaults is a type of constraint, and those are not carried over with SELECT INTO. For this, you
have to script the table...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
<placidite1@.yahoo.com> wrote in message news:1178732983.525139.93780@.u30g2000hsc.googlegro ups.com...
> Hi all,
> SQL 2000
> I am doing :
> SELECT *
> INTO NewTable
> FROM OldTable
> WHERE 1 =0
> The NewTable has the same :
> column names, Data Type and Length BUT the column DEFAULT VALUES
> don't get transferred , I always have te reenter them manually.
> Does any one have a quick solution? Thanks a million
>
|||Thanks Mr Tibor Karaszi
I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
formation
and it doesn't carry over the Default Constraint either...I have the
CREATE TABLE script, but
no default values.
Is there any tool within SQL 2000 that will do it (ie carry over the
default values)?
Thanks a million.
On May 9, 1:54 pm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> Defaults is a type of constraint, and those are not carried over with SELECT INTO. For this, you
> have to script thetable...
> --
> Tibor Karaszi,SQLServer MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
>
> <placidi...@.yahoo.com> wrote in messagenews:1178732983.525139.93780@.u30g2000hsc.go oglegroups.com...
>

>
> - Show quoted text -
|||> I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
> formation
You need to configure this to include constraints.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<placidite1@.yahoo.com> wrote in message
news:1178748995.880148.288630@.e65g2000hsc.googlegr oups.com...
> Thanks Mr Tibor Karaszi
> I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
> formation
> and it doesn't carry over the Default Constraint either...I have the
> CREATE TABLE script, but
> no default values.
> Is there any tool within SQL 2000 that will do it (ie carry over the
> default values)?
> Thanks a million.
>
> On May 9, 1:54 pm, "Tibor Karaszi"
> <tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
>
>

Monday, March 12, 2012

I can not insert CURRENT_TIMESTAMP into column type timestamp

I can not insert CURRENT_TIMESTAMP into column type timestamp

I defined a data Table that has column type timestamp.

I did not achieve insert CURRENT_TIMESTAMP data into column typed timestamp.

My statement is below.What is wrong with it? Thanks

set@.cmdS2 ='Insert Into TABLOLAR Values('+CHAR(39) + @.TABLO +CHAR(39) +','+CHAR(39) + @.TABLO_ACIKLAMASI +CHAR(39) +','+CHAR(39) +CURRENT_TIMESTAMP+CHAR(39) +','+CHAR(39) + @.KLLNC +CHAR(39) +')'

Hello my friend,

This is a common misconception. The timestamp type is not a date field, it is a binary reference. When you update any field in the record, the value of the timestamp field changes. It has its uses. For example, if I take a copy of your data, work on it and then wish to update your data with my changes, the first thing I would do is check that your timestamp value is the same as the one I have (the same as when I took it). If it is, I know it is safe to update your record. If not, then someone has changed the record at your end since I took a copy of it to work on so I do not update it. In your example that requires dates, just use a DATETIME or a SMALLDATETIME field.

Kind regards

Scotty

Wednesday, March 7, 2012

Hypothetical indexes

hi,
i found strange indexes on table..
index name : hind010,02,03,04 05...(something like this)
type : clustered hypothetical indexes...
can anyone help me wot all these are..
my table originally has only 3 indexes..and this table is linked with relation ship integrity with other 15 tables..
how come this indexes are created..there are total 15..hypothetical indexes...
any help would be appreciated..They were most probably created by the Index Tuning Wizard. I don't remember whether you delete
these using DROP INDEX or DROP STATISTICS but one of these should work.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"sanjay" <anonymous@.discussions.microsoft.com> wrote in message
news:F8EE1587-3A79-4E3A-85B8-BE0B5B2E3A59@.microsoft.com...
> hi,
> i found strange indexes on table..
> index name : hind010,02,03,04 05...(something like this)
> type : clustered hypothetical indexes...
> can anyone help me wot all these are..
> my table originally has only 3 indexes..and this table is linked with relation ship integrity with
other 15 tables..
> how come this indexes are created..there are total 15..hypothetical indexes...
> any help would be appreciated..|||Check out
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q293/1/77.ASP&NoWebContent=1
for more details.
--
HTH,
SriSamp
Please reply to the whole group only!
http://www32.brinkster.com/srisamp
"sanjay" <anonymous@.discussions.microsoft.com> wrote in message
news:F8EE1587-3A79-4E3A-85B8-BE0B5B2E3A59@.microsoft.com...
> hi,
> i found strange indexes on table..
> index name : hind010,02,03,04 05...(something like this)
> type : clustered hypothetical indexes...
> can anyone help me wot all these are..
> my table originally has only 3 indexes..and this table is linked with
relation ship integrity with other 15 tables..
> how come this indexes are created..there are total 15..hypothetical
indexes...
> any help would be appreciated..

Friday, February 24, 2012

Hyperlink on a report to download a file

I have an XML field (of type XML) in my report's underlying table. I want to
display a hyperlink in my report. When the user clicks on this hyperlink, I
want them to be able to save the xml value as an XML file on disk (i.e.
"Save File As" in MSIE). Has anyone tried this?
Thank you,
--
Alain Quesnel
alainsansspam@.logiquel.com
www.logiquel.comYou might be able to use javascript to make it open the file in a new
window.|||Any luck on getting this to work? I'm trying to do the same thing but can't
find any way to do it.|||Nope. I even reposted with the subject "XML field content to be downloaded
as a file" in case my first post wasn't clear enough. But no luck.
I'll keep watching and/or post the answer if I ever figure out a way of
doing it.
Alain Quesnel
alainsansspam@.logiquel.com
www.logiquel.com
"Elliott" <Elliott@.discussions.microsoft.com> wrote in message
news:A0650A48-7DAB-42AE-A300-8A9DA17E5401@.microsoft.com...
> Any luck on getting this to work? I'm trying to do the same thing but
> can't
> find any way to do it.
>|||This is the closest possible solution I've found so far and it's from a
Microsoft employee:
http://tinyurl.com/2gs6sp
Basically you'd just have to create a separate web page/site that serves up
the file/xml from a hyperlink in the report. Not quite as easy has getting
it right out of the report directly, but it's definitely doable for my
project.
I'd be happy enough if the report would let me just display the xml with an
associated xsl file.|||Displaying the XML content on your report is pretty easy. Just put the
field's value in a gird like you would any other field type (char, int,
float, etc.). It's just that the cell containing the XML gets pretty big.
--
Alain Quesnel
alainsansspam@.logiquel.com
www.logiquel.com
"Elliott" <Elliott@.discussions.microsoft.com> wrote in message
news:3EE4182B-7C2C-4A37-A71F-F007DE1D6A5C@.microsoft.com...
> This is the closest possible solution I've found so far and it's from a
> Microsoft employee:
> http://tinyurl.com/2gs6sp
> Basically you'd just have to create a separate web page/site that serves
> up
> the file/xml from a hyperlink in the report. Not quite as easy has
> getting
> it right out of the report directly, but it's definitely doable for my
> project.
> I'd be happy enough if the report would let me just display the xml with
> an
> associated xsl file.|||Yeah, I realized I could do that. However I need mine formatted for the
users; I didn't want them to see the raw xml. If they could download it
directly from the report and open it in IE (which is default), then they'd
see it formatted like a webpage since the xml references an xsl file. That
would have been my preference.
Anyway, I took Chris Hays' advice and implemented a small ASP.NET site that
serves up the xml file with the xsl. It was pretty painless and took about
an hour.

Sunday, February 19, 2012

Hyperlink

Hi All,
Silly question, but what is the best column type for hyperlinks?
Many thanksWE used varchar at our end without any issues.
--
--
Satya SKJ
Visit http://www.sql-server-performance.com for tips and articles on
Performance topic.
"GTN170777" wrote:

> Hi All,
> Silly question, but what is the best column type for hyperlinks?
> Many thanks|||thanks
"Satya SKJ" wrote:
> WE used varchar at our end without any issues.
> --
> --
> Satya SKJ
> Visit http://www.sql-server-performance.com for tips and articles on
> Performance topic.
>
> "GTN170777" wrote:
>