|
Hi,
Thanks for the willingness to help. I dont know what the problem was, but I deleted the report table, recreated it and then it worked fine.
Elizma
|
|
|
|
|
|
Hi mates , i am a new joinee...need guidance .....it's a SOS...
These days i am busy implementing Data Mining/Data Warehousing issues for clients.I am facing a critical issue regarding Ab Initio.
I need guidance regarding it's licensing issues and comparitive analysis with other ETL products...
|
|
|
|
|
|
Your image link doesn't work.
Can you post your error message or post once again your image error.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
|
How you try to connect in that sql server? Remotely? If yes then that Server must login with username SA and password SA.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
SQL server does not exist or access denied.
What part of that error message is unclear?
|
|
|
|
|
|
thx for all
the problem was solved
BESHOY
FACULTY OF COMPUTER AND INFORMATION
COMPUTER SCINCE DEPARTMENT
|
|
|
|
|
Hello all,
I have a table in which I have added new one column and now I want to add data to it. What I want is that column starting values should be from some number and end with the number of rows.
Like if I have 1000 records in by table then I want this column to have values from 2200 to 2200 + 1000.
I hope I made myself clear.
Please help me.
Thanks in advance.
|
|
|
|
|
declare @newValue as int<br />
set @newValue = (selex max(colname) from tablename)<br />
<br />
insert into tablename ColumnName <br />
values (@newValue+1)
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Thanks for the reply but I dont want to insert the records. I want to update one columns values which null now.
How can we do this??
|
|
|
|
|
I don't understand good ur questions.
To update columns which have null value then simple use Update tablename where colname=null and coname=anothercondition
If this is again not help then describe in detail your case.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Well what I want is:
Table Name: tb_Data
Columns: Name1, Name2, ID
Number of Records : 1000
Something like this:
Name1 Name2 ID
----------------------------------------
N1 N2 null
N3 N4 null
N3 N4 null
N3 N4 null
Like wise....
N3 N4 null
Now ID Column has null values and in ID Column I want it to get values starting from 2200 to 3200 that is records should be now as:
Name1 Name2 ID
----------------------------------------
N1 N2 2200
N3 N4 2201
N3 N4 2202
N3 N4 2203
Like wise....
N3 N4 3200
Is there anyway to do it by Query as Im having records in lakhs.
Thanks again.
|
|
|
|
|
hi,
Well based on your last post I have more clear your situation.
It seems that you dont have increament column in table and i make fast solution,maybe is not the best solution but it will work.
here is code down below,just copy-modify-paste and use in your real data
create table #TempTable <br />
(<br />
IdentValue int IDENTITY(1,1),<br />
Name1 varchar(255),<br />
Name2 varchar(255),<br />
ID Int<br />
)<br />
<br />
insert into #TempTable <br />
select name1,name2,id from tabela<br />
<br />
<br />
declare @i as int<br />
set @i=0<br />
<br />
declare @startValue as int<br />
set @startValue =2200<br />
<br />
declare @endValue as int<br />
set @endValue=3200<br />
<br />
while @i<(select count(*) from #temptable)<br />
begin<br />
set @i=@i+1<br />
set @startValue=@startValue+1<br />
update #tempTable set ID=@startValue where identValue=@i<br />
end<br />
<br />
delete from tabela<br />
insert into tabela <br />
select name1,name2,id from #temptable<br />
<br />
drop table #temptable<br />
select * from tabela
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Thanks in adv.
Hello,
I want to change the filed length of a fields let suppose item_Name which is in more then 1 table
let suppose 10
the below query will give me the names of those tables
select sysobjects.name from syscolumns
left join sysobjects on sysobjects.id = syscolumns.id
where syscolumns.name like 'Item_Name' order by 1
now i want to update all those table having that field , length to more but i could not even while using cursors
Regards ,
mirza Rahman
|
|
|
|
|
use Alter Table to change the column widths.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
But in Alter table i have to specify the Name of the table one by one i want that it will take table name automatically from some cursor or some other way
in yours case if have to write this query more then 50 times
like
alter table SalesMaster
alter table PurchaseMaster
alter table ItemMaster
alter table ItemDetail
i want it will check the field automatically in those table and will update the field length
Thanks
Best Of Regards,
Mirza Rahman
|
|
|
|
|
Use your select from systobject to identify the tables, you know the column name and create dynamic SQL to execute the alter table.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Based on some business objects, I need a database model to store generic property values.
The range of possible value types is known (no binary types).
What I already have:
CREATE TABLE ObjectOne
(
Id int, -- primary key
... -- more fields
)
CREATE TABLE ObjectOneProperties
(
ObjectOneId int, -- primary key, foreign key to the object one
ObjectPropertiesId int, -- primary key, foreign key to the properties
)
CREATE TABLE ObjectTwo
(
Id int, -- primary key
... -- more fields
)
CREATE TABLE ObjectTwoProperties
(
ObjectTwoId int, -- primary key, foreign key to the object two
ObjectPropertiesId int, -- primary key, foreign key to the properties
)
CREATE TABLE ObjectProperties
(
Id int, -- primary key
PropertyType varchar(255) -- property business type
??? -- property value ? foreign key(s) ?
)
Until now, I have found two possible approaches:
Store value in one table
CREATE TABLE PropertyValues
(
Id int, -- primary key
ValueInt int, -- value as int
ValueText varchar(x), -- value as text
ValuedateTime datetime, -- value as datetime
... -- all other value types
) Store value in multiple tables
CREATE TABLE PropertyIntValues
(
Id int, -- primary key
Value int -- value as int
)
CREATE TABLE PropertyTextValues
(
Id int, -- primary key
Value varchar(x) -- value as text
)
CREATE TABLE PropertyDateTimeValues
(
Id int, -- primary key
Value datetime -- value as datetime
)
CREATE TABLE PropertyXxxxValues -- for any other value types
(
Id int, -- primary key
Value xxx -- value as xxx
) I have the following selection criteria:
- High performance is required
- Database neutral (if possible)
- Stored Procedures allowed
- No Triggers
- Storage amount is not critical
Any help, suggestion or alternative solution is greatly appreciated.
|
|
|
|
|
Hmm, why not use XML as datatype for properties and store them in the same table as the main entity?
|
|
|
|
|
Hi Mika,
I never used a XML field in a table. How is the performance of such a XML field?
Is it possible to make indexes or type specific queries (for example values within a date range)?
I have found further information on this topic Entity-attribute-value model[^].
|
|
|
|
|
Jani Giannoudis wrote: How is the performance of such a XML field
This depends on what database you use. For example SQL Server 2008 has: CREATE XML INDEX[^] on the other hand SQL Server 2005 has a bit different approach: Indexes on xml Data Type Columns[^]
But in both cases I think the performance is quite good.
Jani Giannoudis wrote: Is it possible to make indexes or type specific queries
Both would be possible. You could for example store the type in schema or in the xml itself.
The link you found also seems quite good.
|
|
|
|