|
wow thax!
I got it.
million thax!
brilliont idea!
thanks Gautham
regards
Ruwandi
rkherath
|
|
|
|
|
hi again,
nother small thing. is there a way that i can format the 17/05/2007(dd/mm/yyyy) in to 05/17/2007(mm/dd/yyyy)
simply what i am asking is format the date
regards
ruwandi
rkherath
|
|
|
|
|
convert(nvarchar, YourColumnName, 101)..
To know more about these formats just go to sql books online and search for Convert..
Gautham
|
|
|
|
|
i tried but the same reult comes
CONVERT(NVARCHAR,TFRTTV.OUT_DATES,101)
regards
ruwandi
rkherath
|
|
|
|
|
set dateformat 'dmy'
select convert(varchar(10),cast(columnName as datetime),101)
Regards,
Arun Kumar.A
|
|
|
|
|
No problem! You got to help me when iam stuck some where too!!
Gautham
|
|
|
|
|
Sure!
U can count on me
Regards
Ruwandi
rkherath
|
|
|
|
|
Gautham
|
|
|
|
|
Thisis when i execute the procedure , it gives me nothing but one nullvalue and the second one show me more than a 1000 records. what is the difference between these two.
"Does not show results"
declare @test varchar(15)
exec SearchGEOCode '0196','2',@test
select 'Geocode is'= @test
"Showw Resuls"
select Geocode from property
where Num_key = '0196' and Extension = 2
"the code for Procedure"
Create Procedure SearchGEOCode (@Num_key varchar(10),@Extension int,@GeoCode varchar(15) Output)
with Recompile
as
select @GeoCode= Geocode from Property
where Num_key = @num_key and Extension = @Extension
Help
Vuyiswa
|
|
|
|
|
Vuyiswamb wrote: select 'Geocode is'= @test
You are attempting to assign the value of @test to a literal. Try
SELECT 'Geocode is ' + @test
|
|
|
|
|
ok i have change like this
declare @test varchar(15)
exec SearchGEOCode '0196','2',@test
SELECT 'Geocode is ' + @test output
Results are:
--------------------------
NULL
(1 row(s) affected)
Here is the Select that returns Good results, but still i want only one Row, but even many rows come i doent matter. check this out
select Geocode from property
where Num_key = '0196' and Extension = 2
Results are:
Geocode
---------------
ETSX02
ETSX02
ETSX02
they are many, this is what i want to see in that stored Procedure. here is the code Below again
Create Procedure SearchGEOCode (@Num_key varchar(10),@Extension int,@GeoCode varchar(15) Output)
with Recompile
as
select @GeoCode= Geocode from Property
where Num_key = @num_key and Extension = @Extension
Vuyiswa
|
|
|
|
|
The output param has to be used in the exec statement, not the select statement:
declare @test varchar(15)<br />
exec SearchGEOCode '0196','2',@test output<br />
SELECT Geocode = @test
Wout Louwers
|
|
|
|
|
Thank my man you a Star
Vuyiswa
|
|
|
|
|
Vuyiswamb wrote: exec SearchGEOCode '0196','2',@test
You have to mark the @test variable as an output variable:
exec SearchGEOCode '0196', '2', @test output
But even then it will only return one value. But that is to be expected...
Wout Louwers
|
|
|
|
|
How can I Retrieve table name from a sql connection?
|
|
|
|
|
SELECT * FROM INFORMATION_SCHEMA.TABLES
|
|
|
|
|
Thanks.I found another way.
Datatable dt=SqlConn.GetSchema("Tables");
it returns a table that have table name of Database used in Sqlconn.
|
|
|
|
|
Or
select * from sysobjects where type='U'
Regards,
Arun Kumar.A
|
|
|
|
|
|
Hi
I am using a custom Validator for a text box and I want to fire that validation when value given in the text box fetches any any value from the database.
I am doing select operation with value given in the text box.If it return any records then the validation should fire.
I'm using C#
Thank U
Chandu
|
|
|
|
|
On the databinding for the textbox, create Format and Parse event handlers.
Syntactically, this may be off a bit, but it is something like this:
textBox1.DataBindings[0].Format += ....
textBox1.DataBindings[0].Parse += ....
if you look these up in help, you'll get some good examples.
|
|
|
|
|
I'd a problem
i 've a Composite PK table in dataset
i can't catch the row i want by this method
Dataset.table.rows.find(PK);
does any boduy know why?
|
|
|
|
|
We have two databases built out on a database engine server. Sql Server 2005.
We have our client communicating to the database via a WCF service.
The service has a Windows Security ID that it logs in with for startup.
The service's ID is created in the Data Engine / Security Settings / Users.
The user is created and the two databases are checked.
When I look under the databases, the user shows in both databases.
The problem:
when I connect to my first database ( Guide ) I connect without a problem.
when I connect to my second database ( Talker ) I get a signin failure.
The log states that it is Error: 18456, Severity: 14, State: 16
This state event says that I did not grant login access for that user to the Talker database. However it is checked and the user exists in both the Guide database and the Talker database.
I am at a loss. Please help!
Thanks,
Michael
|
|
|
|
|
Create Procedure SearchGEOCode (@Num_key varchar(10),@Extension int,@GeoCode varchar(15) Output)
with Recompile
as
@GeoCode=select * from Property
where Num_key = @num_key and Extension = @Extension
Error:
Server: Msg 170, Level 15, State 1, Procedure SearchGEOCode, Line 4
Line 4: Incorrect syntax near '@GeoCode'.
Vuyiswa
|
|
|
|
|
You are attempting to assign a result set to a VARCHAR(15). Also, the syntax for the assignment is incorrect.
SELECT @GeoCode = <ColumnNameHere> FROM Property<br />
WHERE Num_key = @num_key AND Extension = @Extension
You'll have to fill in <ColumnNameHere> becuase you've not supplied enough information.
|
|
|
|