i get timestamp.
Is the query below the correct syntax though?
insert into Table (A, A1, A2, A3, A4, A5)
select 'pear',A1, A2, A3, 'XXX', 'YYY', 'default'
from Table
where A=apple
How can you do the above if 'XXX', 'YYY', 'default' does not come from table Table?
When i do:
insert into Table (A, A1, A2, A3, A4, A5)
select 'pear',A1, A2, A3, 'XXX', 'YYY', 'default'
from Table
where A=apple
I get:
Incorrect syntax near the keyword 'default'.
How can you do the above if 'XXX', 'YYY', 'default' does not come from table Table?
Hi,
I need to copy data from one table into the same table but with some different values as well. Also i'm having trouble since row_timestamp cannot be null.
Example: Table has columns A, A1, A2, A3, A4, A5
I need columns A1, A2, A3 to be copied and i also want to insert new values into A4...
I have 2 columns from an excel sheet that is in the order that i want to reorder my table into.
Example:
my current table A:
pat 2
ryan 33
bob 45
chris 6
My excel sheet has the correct sequence:
pat 33
ryan 6
bob 2
chris 45
How can i update my table A so that it matches my excel sheet...
Hi,
I need to convert a date 20091011 to 10/11/2009.
This is how i'm converting it:
convert(varchar,cast(ap.appt_date as dateTime),101) as Date
but my return is 10/11/20
it keeps leaving out the last two numbers of the year.
hum..i guess it will..i was sure i did that previously and i still had duplicates. I guess i didn't go that route because i needed to do a stored procedure with a union and that didn't work.
Hi,
I need a way to eliminate data from table A if it exists in table B. I need to combine these two tables but show their similar data only once..how can i do that?
Example:
Table B data:
john 10/11/2008 book
john 5/10/2008 novel
table A fields:
john 10/11/2008 book
Results...
Thanks for the link, i'll try that. I did think about isnumeric() but wasn't sure if that was what i needed..unfortunately i can't change the database architecture :(
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.