Jump to content

Sql Guys Ravali


Recommended Posts

Posted

i have a simple query

 

declare @id int
 
using a select statement     select top 1 @id = Id from <table>  where <conditions>   undi
 
table empty so  aa @Id lo empty vasthundi 
 
then I am selecting     Select somedate from <table> where id = @id ani chesthe response empty string vasthundi but i want NULL
 
ala empty string vachinappudu  NULL ela theppinchali ..   due to some reasons i cannot join those two queries..
 
  • Replies 56
  • Created
  • Last Reply

Top Posters In This Topic

  • loveindia

    19

  • rikki

    13

  • lolbob_fan

    7

  • puli_keka

    5

Top Posters In This Topic

Posted

select coalesce((Select somedate from <table> where id = @id), NULL)

 

+1

Posted

Tamari bondha man... int declare chestey empty string ela vastadi man... ideally em lekapotey null ye vastadi .. née query lo idi oka part r full??

Posted

select coalesce((Select somedate from <table> where id = @id), NULL)

Very bad code man... serves the purpose but really bad way to write...
Posted

declared integer is not the output read question properly

Tamari bondha man... int declare chestey empty string ela vastadi man... ideally em lekapotey null ye vastadi .. née query lo idi oka part r full??

 

Posted

Very bad code man... serves the purpose but really bad way to write...

 

Help chesina kuda .. tidataava man.. 

2518468_o.gif

Posted

Very bad code man... serves the purpose but really bad way to write...

 

 

declared integer is not the output read question properly

 

table is new.. em rows levu.. first ID int ni techukuntunna..  malli second query lo aa id use chesthunte column kindha empty naaku NULL kavali  

Posted

hahaha u know sql? tats the whole purpose of expressions kid

Very bad code man... serves the purpose but really bad way to write...

 

Posted

hahaha u know sql? tats the whole purpose of expressions kid

 

Idhi antha teliyakundaane.. 150k earn chesthunadu antunnava man.. 2518468_o.gif

Posted

my boss earns more than me u

ameerpet hostel owner va nuvu 2518468_o.gif

Idhi antha teliyakundaane.. 150k earn chesthunadu antunnava man.. 2518468_o.gif

 

Posted

select coalesce((Select somedate from <table> where id = @id), NULL)

 

 

+1

 

 

Tamari bondha man... int declare chestey empty string ela vastadi man... ideally em lekapotey null ye vastadi .. née query lo idi oka part r full??

 

work aithe ayyindhi , so used COALESCE  ..  thanks much 

×
×
  • Create New...