|
what do you mean by Resizing Identity column value?
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
If you are asking about reseting the table identity once you have deleted all the rows, then use DBCC CHECKIDENT to reseed or reset Identity column.
Regards,
Jaiprakash M Bankolli
jaiprakash.bankolli@gmail.com
http://jaiprakash.blog.com/
|
|
|
|
|
|
Can anyone tell me having known the table name, how can I get the column names and their datatype?
I am using the ojdbc14 driver to connect to my Oracle10g database.
My table name is 'orders' and I want to know how many columns it has and of what type.
Is there any query for this?
|
|
|
|
|
to know the column names:
select COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME ='orders'
all the related information would be present when you use
select * from information_schema.columns
try it out!!
Gautham
|
|
|
|
|
Good !!!!
Pavan Pareta
|
|
|
|
|
Dear All,
I am basically new as far as SQl server 2005 concern.
I want to try out reporting services provided by sql server 2005.
That is make report using sql server 2005 and call that report from web or window application.
Please guide me in doing so or give me some useful link.
Thanks
regards
imran khan
|
|
|
|
|
select distinct(ps.pax_id),ps.barcode_no,ps.modified_date,ps.passport_no,pd.pax_fname+' '+pd.pax_mname+' '+pd.pax_lname as pax_name,ps.fromBranch,ps.passport_status,ps.toBranch,ps.consulate,pv.travel_date,pv.tour_code,ps.entered_date,ps.branch_id,ps.status_type,bm.branch_name from passport_status_tran ps,pass_branch_mst bm,passport_details pd,pax_visarequirments pv where bm.branch_id=pd.branch_id and bm.branch_id='9' and ps.fromBranch='5' and ps.barcode_no=pd.barcode_no and pd.pax_id=pv.pax_id and ps.passport_status='out' and ps.entered_date between '03/24/2007' and '03/27/2007' order by ps.entered_date
This query is running but giving double entry.
Passport No Consulate
XYZ Belgium
XYZ Belgium
|
|
|
|
|
try following,
SELECT distinct * from (
select distinct(ps.pax_id),ps.barcode_no,ps.modified_date,ps.passport_no,pd.pax_fname+' '+pd.pax_mname+' '+pd.pax_lname as pax_name,ps.fromBranch,ps.passport_status,ps.toBranch,ps.consulate,pv.travel_date,pv.tour_code,ps.entered_date,ps.branch_id,ps.status_type,bm.branch_name from passport_status_tran ps,pass_branch_mst bm,passport_details pd,pax_visarequirments pv where bm.branch_id=pd.branch_id and bm.branch_id='9' and ps.fromBranch='5' and ps.barcode_no=pd.barcode_no and pd.pax_id=pv.pax_id and ps.passport_status='out' and ps.entered_date between '03/24/2007' and '03/27/2007')ttemp
order by ttemp.entered_date
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
can anyone tell me why the hell do I get up site down question marks when I try to save Arabic text in Oracle?? it's a simple database application created using VS 2005 wizard.
Please help guyz, I'm desperate
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
declare @query nvarchar(4000)
declare @orderids varchar(50)
declare @mainofficeid int
declare @ordersourceid int
set @orderids='109,110,111'
set @query = 'select' + convert(nvarchar(10),@mainofficeid)+'=lccofficeid from tblorders where orderid in (' + @OrderIds +')' + 'group by lccofficeid, ordersource'
print @query
However, no result is being displayed!
The motto is to execute the query and the result should be copied to a variable!
Gautham
|
|
|
|
|
What exaclty you want to achieve ? What shud the @query expects to hold?
try and explain your problem rather then telling the moto
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
Mubashir,
I have to execute a query and the query would get a value from the from end i.e. a string of ids, using this ids i would form a query and execute it, the outcome would be one row with 2 columns.
Now the values which resulted on the execution of the query should be assigned to two seperate variables
Hope you got my point?
Gautham
|
|
|
|
|
Got it,
use the following as a sample
<br />
declare @val1 varchar(10)<br />
declare @val2 varchar(10)<br />
<br />
select @val1 = YourCOL1, @val2 = YOURCOL2 from YourTable<br />
WHERE ....<br />
YourCOL1 and YOURCol2 are the columns from YourTable. This query will be executed and the reselt from the YourCOL1 will be assigned to @val1 and so on.
Hope it helps
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
I know that but the problem rises when iam trying to form a dynamic query for the same!
i.e. i have a condition to check and that value to be checked is a dynamic value!
Gautham
|
|
|
|
|
as per the code written, should display the select query as it is.
for getting the result by fetching data from table.
set @query = (select convert(nvarchar(10),@mainofficeid) from tblorders where orderid in (109, 110, 111) group by lccofficeid, ordersource)
Regards
KP
|
|
|
|
|
while i am trying to connect a database table in SQL server 2005. i get this Exception.
Under defaul settings SQL server 2005 doesnot allow remote connections.
|
|
|
|
|
Go to the "SQL Server Configuration Manager" and ensure that TCP/IP is turned on for your SQL Server in "SQL Server 2005 Network Configuration"
|
|
|
|
|
do it require administrator previlege to enable TCP/IP
|
|
|
|
|
Hello ALL!
i should write some little app for connection mssql+mysql. i should take data from mysql and put it into mssql. how can i do it? i guess i should use some additional components or dll but i'm not sure.
help me plz and explain how can i decide this task?
thax a lot!
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
If you need to copy data from MySQL into SQL Server, then I suggest you write this as a SSIS (DTS in SQL Server 2000) job in SQL Server and run it from there.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
can you explain more details? and how can I just connect to mysql server?
thanx!
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
|
may be it is a stupid question - but where can I download SSIS? can i use it if i have MS SQL EXpress edititon?
thanx
--
"Success is simple. Do what's right, the right way, at the right time."
best regards,
tradakad
|
|
|
|
|
Hi all,
i have one table, it does n't have identity column,primary key,foriegn key,unique key and no constraints.
Now i want to delete duplicate records.
ex: table : sample (before deletion)
cno cname salry
10 xxx 1000
10 xxx 1000
10 xxx 1000
20 yyy 2000
20 yyy 2000
i want the result like this after deletion:
cno cname salary
10 xxx 1000
20 yyy 2000
Please help me.
|
|
|
|